1 unstable release
Uses old Rust 2015
0.1.0 | Sep 6, 2016 |
---|
#65 in #sha-256
65KB
1K
SLoC
Most Inefficient Sha
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.
Benchmarks
Processor: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 3072KB Cache
- Calculating SHA256 with one byte of input data takes 10 ms.
- Calculating SHA256 with one hundred bytes of input data takes 78 ms.
Why
For fun. It seemed unlikely to work out but I wanted to do some rust.
lib.rs
:
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 Term
s, thereby creating a treelike graph of Term
s.
These terms are evaluated lazily.
U combines 32 Term
s 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 U
s to calculate the SHA-256
algorithm.
Linopt uses the fuzzy Sha256
to try to break it.
No chance.
Dependencies
~435KB