Crack hashes or find collisions for hashes hashed with the FNV-1a algorithm without full brute force
Huge thank you to ConnorM for his incredible writeup and writing the original python proof of concept of which this is based off of. He does some incredible work with cryptography and his writeups are worth a read.
This project requires the following libraries:
- mpfr
- gmp
- fplll
NOTE: This project uses the fplll library which does not support Windows. If you are looking to use this on Windows, look into WSL.
Run the following commands to get started
git clone https://github.com/Nico-Posada/fnv-hash-cracking.git
cd fnv-hash-cracking
If you do not have the fplll library installed, run the following:
sudo apt install fplll-tools
or if you want to build it from source (will probably be better optimized for your machine), run the following
chmod +x scripts/setup.sh
sudo scripts/setup.sh
conda install fplll
brew install fplll
More information on compilation and installation specifics can be found in the fplll repository.
To find examples for different use cases, check out the examples directory for some files with basic examples.
To compile and run the test script, run the following
make run-test
To compile and run the benchmark script, run the following
make run-benchmark
- Clean up code, add more tests
- Add multithreading support back in.
- Maybe add a python module for this?
- Benchmarks (WIP)
- Add support for setting the hash/prime/bit len dynamically to make this into a proper CLI
- If this happens, maybe add JIT compilation for some speedup?