Browse Source

Add Wasm support (#125)

* Add Wasm support

* Use SeedableRng for Wasm randomness

* Fix tests

* Formatting
main
Samuel Burnham 1 year ago
committed by GitHub
parent
commit
55f6736866
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions
  1. +5
    -5
      Cargo.toml
  2. +1
    -2
      src/pasta.rs

+ 5
- 5
Cargo.toml

@ -14,7 +14,6 @@ keywords = ["zkSNARKs", "cryptography", "proofs"]
bellperson = { version = "0.24", default-features = false }
ff = { version = "0.12.0", features = ["derive"]}
merlin = "2.0.0"
rand = "0.8.4"
digest = "0.8.1"
sha3 = "0.8.2"
rayon = "1.3.0"
@ -34,8 +33,12 @@ flate2 = "1.0"
bitvec = "1.0"
byteorder = "1.4.3"
[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
pasta-msm = "0.1.3"
[dev-dependencies]
criterion = "0.3.1"
rand = "0.8.4"
[[bench]]
name = "recursive-snark"
@ -46,7 +49,4 @@ name = "compressed-snark"
harness = false
[features]
default = ["bellperson/default", "neptune/default"]
[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
pasta-msm = "0.1.3"
default = [ "bellperson/default", "neptune/default" ]

+ 1
- 2
src/pasta.rs

@ -14,8 +14,7 @@ use pasta_curves::{
group::{Curve, Group as AnotherGroup, GroupEncoding},
pallas, vesta, Ep, Eq,
};
use rand::SeedableRng;
use rand_chacha::ChaCha20Rng;
use rand_chacha::{rand_core::SeedableRng, ChaCha20Rng};
use sha3::Shake256;
use std::io::Read;

Loading…
Cancel
Save