7

Hashcat list FPGAs as OpenCL device type in its help.

- [ OpenCL Device Types ] -

# | Device Type

===+=============

1 | CPU

2 | GPU

3 | FPGA, DSP, Co-Processor

So can you really somehow connect and use an FPGA with hashcat?

UndercoverDog
  • 612
  • 2
  • 17

2 Answers2

8

Not yet (as of April 2022). The framework is there to support them - if there is OpenCL for the platform. But so far, there haven't been sufficiently usable implementations of OpenCL for any FPGAs (at least, not publicly).

Royce Williams
  • 9,128
  • 1
  • 31
  • 55
  • 1
    [John the Ripper can use FPGAs though](https://it.slashdot.org/story/19/05/18/1841245/new-john-the-ripper-cracks-passwords-on-fpgas), and it has been done [in practice](https://scatteredsecrets.medium.com/bcrypt-password-cracking-extremely-slow-not-if-you-are-using-hundreds-of-fpgas-7ae42e3272f6) successfully – belkarx Apr 17 '22 at 05:25
  • 1
    Indeed [it has](https://www.techsolvency.com/passwords/ztex/) ;) – Royce Williams May 02 '22 at 19:51
7

In theory yes, in practice, it's not well-supported. Here's what the creator said on the matter as of 2020 (and the situation doesn't seem to have changed)

There aren't FPGAs which have been proven to be able to compile our kernel source, including the ZTEX boards.

Those only work with the native ztex code written for JohnTheRipper. You would need to find an FPGA that can properly compile OpenCL. No current FPGAs, as far as I am aware, allow for JIT compilation of OpenCL kernels because compiling kernels for them can take hours/days/weeks to complete.

You would need to go through the process of manually precompiling the kernel source for your specific hardware, using the tool chain specific to your hardware (which can be quite expensive on its own), and then from there load the kernel into hashcat via the kernel folder or make some modification to the hashcat host code to select it specifically. This would also likely need to be done per attack given that some things are changed during compilation depending on attack settings.

belkarx
  • 1,207
  • 2
  • 18