Notes: The code is un-audited and not production ready, use it at your own risk.
Subspace is a proof-of-storage blockchain that resolves the farmer's dilemma, to learn more read our whitepaper.
This is an adaptation of SLOTH (slow-timed hash function) into a time-asymmetric permutation using a standard CBC block cipher. This code is largely based on the C implementation used in PySloth which is the same as used in the paper.
This crate requires Rust 1.51 or newer to compile.
If you have not previously installed the gmp_mpfr_sys
crate, follow these instructions.
Add following to Cargo.toml
:
spartan-codec = "0.2.0"
cargo test
cargo bench
Benches single block encoding, parallel encoding (will depend on number of cores) and verification time for a prime size of 256 bits.