diff --git a/Cargo.toml b/Cargo.toml index c311632..b35baf2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "rust-poseidon1" -version = "0.0.0" +name = "rust-poseidon-bn254-pure" +version = "0.0.1" edition = "2021" license = "MIT OR Apache-2.0" authors = ["Balazs Komuves"] diff --git a/README.md b/README.md index 81abf05..51ba3a0 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,11 @@ -rust-poseidon-bn254-rv32im --------------------------- +rust-poseidon-bn254-pure +------------------------ -Self-contained, pure Rust implementation of Poseidon and Poseidon2 hash functions -over the BN254 curve's scalar field, using 32 bit limbs internally. +Self-contained (no external dependencies), pure Rust implementation of Poseidon +and Poseidon2 hash functions over the BN254 curve's scalar field, using 32 bit +limbs internally. -It's intended to be used on 32-bit platforms eg. 32-bit RISC-V +It's intended to be used on 32-bit platforms, eg. 32-bit RISC-V (rv32im) (though porting to 64 bits shouldn't be a big effort). The algebra implementation is based on [`zikkurat-algebra`](https://github.com/faulhornlabs/zikkurat-algebra/) diff --git a/sanity.hs b/sanity/sanity.hs similarity index 98% rename from sanity.hs rename to sanity/sanity.hs index 4a4a219..e831468 100644 --- a/sanity.hs +++ b/sanity/sanity.hs @@ -1,4 +1,6 @@ +-- some basic "sanity check"-type testing + {-# LANGUAGE PackageImports #-} import Data.List diff --git a/src/bin/testmain.rs b/src/bin/testmain.rs index 2c39be6..2a3719e 100644 --- a/src/bin/testmain.rs +++ b/src/bin/testmain.rs @@ -1,11 +1,10 @@ -use rust_poseidon1::bn254::bigint::*; -use rust_poseidon1::bn254::constant::*; -use rust_poseidon1::bn254::montgomery::*; -use rust_poseidon1::bn254::field::*; +use rust_poseidon_bn254_pure::bn254::bigint::*; +use rust_poseidon_bn254_pure::bn254::constant::*; +use rust_poseidon_bn254_pure::bn254::montgomery::*; +use rust_poseidon_bn254_pure::bn254::field::*; -//use rust_poseidon1::poseidon2::constants::*; -use rust_poseidon1::poseidon2::permutation::*; +use rust_poseidon_bn254_pure::poseidon2::permutation::*; //------------------------------------------------------------------------------