Finding Nice MD5s Using Rust
blog.youmu.moe
blog.youmu.moe
Fun little tool, get ~900M/s after a couple minutes on a 5950X. As the article says though the GPU should clobber that, anyone know of a similar tool that uses the GPU?
Amusingly the tool was archived by the author years ago, and just last year a stupid bug in the random initialization code was found (32 bytes of state initialized with ~31 bits of entropy), leading to ~millions of $ in stolen ETH by exploiters.
I revisited the challenge some years later, and managed to achieve a little over 200 MH/s per core on a 2013 CPU. I'd expect (or at least hope) for modern very high-end CPUs to reach somewhere between 5000-10000 MH/s when using all cores, using a similar decently optimized solution. (The thing you want to optimize is the hashing part.) A high-end GPU from 2016 should manage at least 10000 MH/s and more modern ones are likely to be several times faster.
Suggestion for ergonomics:
#[cfg(target_arch = "x86")]
use std::arch::x86::* as simd;
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64::* as simd;
Then you can just use `simd::intrinsic` and you get the one appropriate to your platform.A little extra typing at point of use but solves editor slowness issues and automatically adding imports issue.
#[cfg(target_arch = "x86")]
use std::arch::x86 as simd;
#[cfg(target_arch = "x86_64")]
use std::arch::x86_64 as simd;
... is what I meant. Too late to edit now.