Skip to content

autonomys/spartan-codec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spartan-codec

A proof-of-concept encoder for the Subspace Network Blockchain based on the SLOTH permutation

CI Crates.io Docs License

Overview

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.

Install

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"

Run Tests

cargo test

Run Benches

cargo bench

Benches single block encoding, parallel encoding (will depend on number of cores) and verification time for a prime size of 256 bits.

About

A time-asymmetric permutation based on SLOTH

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages