This is a tool for solving 2-ROS instances for the following families of non-cryptographic hash functions:
- Affine (e.g.
$H(x,y) = ax + by + c$ ) - FNV32-1a
On a Mac, run brew install z3. Binaries are available here.
To solve a 2-ROS instance for a prime #xXXXXYYYYZZZZ), and an affine hash function, run: ./solve.sh affine p s. For example, to solve a affine 2-ROS instance with #x000100020003 (this will set ./solve.sh affine 1013 '#x000100020003'. You can do the same thing for FNV32-1a instead of affine by changing "affine" to "fnv32".
Tip: use printf '%x\n' 1234 to get the hexadecimal representation of a number.
To benchmark the tool for affine hash functions, run ./benchmark.sh affine. For FNV32-1a, run ./benchmark.sh fnv32. You can use Ctrl+C to skip a specific test.