:hammer: Some tools to (try to) break "Magic Hashes" https://git.forestier.app/HorlogeSkynet/MagicHashes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Samuel FORESTIER 25288d74db Fixes typo in LICENSE.md 5 months ago
.gitignore There is a first time for everything ; Finally publish this project 6 months ago
LICENSE.md Fixes typo in LICENSE.md 5 months ago
README.md There is a first time for everything ; Finally publish this project 6 months ago
magic_hashes_iterative.c Major optimization of the C "iterative" method, see details below : 5 months ago
magic_hashes_random.c There is a first time for everything ; Finally publish this project 6 months ago
magic_hashes_random.py There is a first time for everything ; Finally publish this project 6 months ago

README.md

MagicHashes

Some tools to (try to) break “Magic Hashes”.

Introduction

If you wonder what a “magic hash” is, please check this link.
At the time of writing, no such hashes have been found against the SHA-2 family.

This repository contains three different (pretty naive) brute-forcing implementations.

They have been developed to output exactly the same piece of information, when matching.

Usage

C

# Install dependency (Debian example) :
aptitude install libssl-dev

# Compilation time :
gcc -Wall -Wextra -O3 -std=c99 -o magic_hashes_random.out    magic_hashes_random.c    -lssl -lcrypto
gcc -Wall -Wextra -O3 -std=c99 -o magic_hashes_iterative.out magic_hashes_iterative.c -lssl -lcrypto

# Execution time :
./magic_hashes_random.out
./magic_hashes_iterative.out

Python

python3 magic_hashes_random.py

Performances

As far as I can tell, and on my setups only :

  • The random C implementation is ~75% faster than the Python one.
  • The iterative C implementation is ~10% faster than the C random one.

Improvements

If you wanna share your changes / improvements, please contact me.