cr-marcstevens / hashclash

Project HashClash - MD5 & SHA-1 cryptanalysis
Other
742 stars 87 forks source link

Project HashClash - MD5 & SHA-1 cryptanalytic toolbox

C/C++ CI

Feedback & pingback appreciated!

I'm always curious to hear where HashClash is used for! (@realhashbreaker on Twitter or let me know via Issues)

If you like HashClash and use it more often then please consider becoming a sponsor.

Requirements

Building (automatic)

Building (manual)

See details

- local boost C++ libraries (preferable version 1.57.0) `./install_boost.sh` Override default boost version 1.57.0 and/or installation directory as follows: `BOOST_VERSION=1.65.1 BOOST_INSTALL_PREFIX=$HOME/boost/boost-1.65.1 ./install_boost.sh` - Build configure script `autoreconf --install` - Run configure (with boost installed in `$(pwd)/boost-VERSION` by `install_boost.sh`) `./configure --with-boost=$(pwd)/boost-1.57.0 [--without-cuda|--with-cuda=/usr/local/cuda-X.X]` - Build programs `make [-j 4]`

Create your own chosen-prefix collisions

Create you own identical-prefix collision

$ xxd collision1.bin
0000000: 5445 5354 1789 6de2 c568 339d 8bbf 6269  TEST..m..h3...bi
0000010: 563a c4ab 2fba 7aba 6ec7 e182 8566 8883  V:../.z.n....f..
0000020: b0f2 d716 17d5 8f97 b244 b9ca dcaa af93  .........D......
0000030: 3a33 4552 a9fd 023b 7012 7e5c d644 9646  :3ER...;p.~\.D.F
0000040: 723e 737a 6c3a 66e5 5d51 8e7c 7bc2 ec4f  r>szl:f.]Q.|{..O
0000050: 95a2 349f 0f4b 2540 cbe6 5644 d113 104b  ..4..K%@..VD...K
0000060: 5c39 898d f19a f9e9 e2aa bbad e191 d2d3  \9..............
0000070: a25d 4df0 9058 a873 4ee8 9dc9 47a5 281c  .]M..X.sN...G.(.

Create you own text identical-prefix collision

md5("TEXTCOLLBYfGiJUETHQ4hAcKSMd5zYpgqf1YRDhkmxHkhPWptrkoyz28wnI9V0aHeAuaKnak")
=
md5("TEXTCOLLBYfGiJUETHQ4hEcKSMd5zYpgqf1YRDhkmxHkhPWptrkoyz28wnI9V0aHeAuaKnak")