Crate mostinefficientsha [] [src]

This crate tries to break SHA256. (But fails unfortunately).

It implements SHA-256 in the most inefficient fashion ever. Usually, SHA-256 operates on integers with 32 bits (u32). This implementation uses one double (f64) for each bit of each integer, thereby allowing to use 8 fuzzy input bits for each input byte.

Term represents a fuzzy bit either as a settable bit (constant or symbolic) or as a bitwise combination of other Terms, thereby creating a treelike graph of Terms. These terms are evaluated lazily.

U combines 32 Terms and represents a fuzzy integer. U also implements high level operations like shifting, rotating, adding. These operations will be transformed into fuzzy lazily evaluated bit operations.

Sha256 uses these Us to calculate the SHA-256 algorithm.

Linopt uses the fuzzy Sha256 to try to break it. No chance.

Modules

linopt

linopt::Linopt: Linear optimization

sha

sha::Sha256: Sha256 using Us.

term

term::Term: A fuzzy bit.

u

u::U: A fuzzy 32bit integer

util

Encoding helpers between ascii, u32 and f64 representations of 256 bit hashes.