v0.0.4 - update poseidon-rs to v0.0.5 - remove TravisCI and add GithubAction for tests - remove mimc-rs support
arnaucube root@arnaucube.com
Wed, 04 Nov 2020 19:05:36 +0100
5 files changed,
18 insertions(+),
46 deletions(-)
A
.github/workflows/test.yml
@@ -0,0 +1,13 @@
+name: Test +on: [push, pull_request] +env: + CARGO_TERM_COLOR: always +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose
D
.travis.yml
@@ -1,9 +0,0 @@
-language: rust -rust: -- stable - -cache: -- cargo - -script: -- RUST_BACKTRACE=1 cargo test --all
M
Cargo.toml
→
Cargo.toml
@@ -1,6 +1,6 @@
[package] name = "babyjubjub-rs" -version = "0.0.3" +version = "0.0.4" authors = ["arnaucube <root@arnaucube.com>"] edition = "2018" license = "GPL-3.0"@@ -19,8 +19,7 @@ blake2 = "0.8"
generic-array = "0.13.2" tiny-keccak = "1.5" rustc-hex = "1.0.0" -mimc-rs = "0.0.2" -poseidon-rs = "0.0.4" +poseidon-rs = "0.0.5" arrayref = "0.3.5" lazy_static = "1.4.0"
M
README.md
→
README.md
@@ -1,4 +1,5 @@
-# babyjubjub-rs [](https://crates.io/crates/babyjubjub-rs) [](https://travis-ci.org/arnaucube/babyjubjub-rs) +# babyjubjub-rs [](https://crates.io/crates/babyjubjub-rs) [](https://github.com/arnaucube/babyjubjub-rs/actions?query=workflow%3ATest) + BabyJubJub elliptic curve implementation in Rust. A twisted edwards curve embedded in the curve of BN128/BN256. BabyJubJub curve explanation: https://medium.com/zokrates/efficient-ecc-in-zksnarks-using-zokrates-bd9ae37b8186@@ -11,17 +12,7 @@ - Go, from https://github.com/iden3/go-iden3-crypto
- circom & javascript, from https://github.com/iden3/circomlib ## Warning -Doing this in my free time to get familiar with Rust, **do not use in production**. - -- [x] point addition -- [x] point scalar multiplication -- [x] eddsa keys generation -- [x] eddsa signature -- [x] eddsa signature verification -- [x] {point, pk, signature} compress&decompress parsers - - - +Doing this in my free time, **do not use in production**. ### References - BabyJubJub curve explanation: https://medium.com/zokrates/efficient-ecc-in-zksnarks-using-zokrates-bd9ae37b8186
M
src/lib.rs
→
src/lib.rs
@@ -11,7 +11,6 @@
#[macro_use] extern crate arrayref; extern crate generic_array; -extern crate mimc_rs; extern crate num; extern crate num_bigint; extern crate num_traits;@@ -20,7 +19,6 @@ extern crate rand6;
use rand6::Rng; use blake2::{Blake2b, Digest}; -use mimc_rs::Mimc7; use std::cmp::min; use num_bigint::{BigInt, RandBigInt, RandomBits, Sign, ToBigInt};@@ -553,26 +551,6 @@ )
.unwrap() ); } - - // #[test] - // fn test_new_key_sign_verify_mimc_0() { - // let sk = new_key(); - // let pk = sk.public().unwrap(); - // let msg = 5.to_bigint().unwrap(); - // let sig = sk.sign_mimc(msg.clone()).unwrap(); - // let v = verify_mimc(pk, sig, msg); - // assert_eq!(v, true); - // } - // - // #[test] - // fn test_new_key_sign_verify_mimc_1() { - // let sk = new_key(); - // let pk = sk.public().unwrap(); - // let msg = BigInt::parse_bytes(b"123456789012345678901234567890", 10).unwrap(); - // let sig = sk.sign_mimc(msg.clone()).unwrap(); - // let v = verify_mimc(pk, sig, msg); - // assert_eq!(v, true); - // } #[test] fn test_new_key_sign_verify_0() {