5 ms·
Hashcat and oclHashcat have gone open source
- devnikor 11y agoOh, this switch https://github.com/hashcat/hashcat/blob/master/src/engine.c#L29 https://github.com/hashcat/hashcat/blob/master/src/engine.c#...
- meowface 11y agoWhat is the purpose of this, exactly? I assume it has to be some sort of performance optimization. Hashcat probably isn't the best model for clean code, since its primary goal is to squeeze every drop of performance it can get.
- pjc50 11y agoIt's a hardcoded map of int to string. That's a fairly reasonable way of doing it in vanilla C. How efficient it actually is is down to your compiler. And some compilers impose maximum limits on the size of `case` statements.. An alternative would be a precomputed hash table, similar to what `gperf` does. Requires more work in the build system though.
- fit2rule 11y agoBesides the curious length of the switch, I'm not seeing anything particularly 'bad' about this code .. sort of left wondering what the big deal is? This is perfectly reasonable code.
- deleted 11y ago[deleted]
- michael_h 11y agoIt doesn't look too terrible, but it looks like it is optimized for speed, not maintainability. I'm assuming that's why there is a lot of repeated code (instead of putting it into a function/loop). The comments are a little spartan.
- mkagenius 11y agoI am happy :) It would be great if someone(or me) could increase the length limit for sha512 hashes. Thank you.
- Tinyyy 11y agoI've tried hashcat before, but does anyone know if oclHashcat works on Intel GPUs? Specifically the Iris Pro 5200?
- semi-extrinsic 11y agoIf you're seriously interested in GPU acceleration, any reason not to spend $150 on a GTX 950 and get ~5x the performance of your Iris Pro 5200?
- Tinyyy 11y agoI'm just playing around with it for fun, not doing anything particularly important. Also, I don't think I can connect a GPU to my Macbook Pro :(
- semi-extrinsic 11y agoSure. And it's a no go on a laptop. Though you can probably get a ~5 year old desktop with PCIe for basically free if you ask around friends and relatives. If you ssh into it, no need for a monitor either.
- Tinyyy 11y agoMeh. That's a bit too much work for me.
- rincebrain 11y agoWell, with Thunderbolt enclosures, you _could_... http://www.sonnettech.com/PRODUCT/echoexpressse1.html http://www.sonnettech.com/PRODUCT/echoexpressse1.html
- revelation 11y agoI assume the OCL means OpenCL, in which case yes, Intel OpenCL support is very good (figures, since they have no GPGPU api of their own).
- 11y ago
- platz 11y ago> the kernel needs to be compiled at run time Are there examples of other programs that require this?
- runarb 11y agoI believe the Varnish cache server generates C code from its config rules and compile a new kernel based in it. This all rules are optimized binary code that work directly on the data stream instead if having a runtime that applies the rules.
- codezero 11y agoMany template engines do this.
- Gladdyu 11y agoAny OpenCL/CUDA program for GPGPU would require this. Different GPUs may have different characteristics (core count, available instructions, memory sizes and speeds), that need to be taken into account and can be optimized for. This can only be done when you know the run-time target device, which is only at run-time. This is the reason why for GPGPU programs, you often supply the kernel/shader as C code or another intermediate representation (vendor-specific assembly), and the final compilation step is done by the GPU driver.