Update Schnorr to last changes, rm MiMC7 methods

This commit is contained in:
2020-08-02 19:22:02 +02:00
parent 04d20b9e05
commit 80d682ea93
3 changed files with 79 additions and 130 deletions

View File

@@ -46,12 +46,10 @@ fn criterion_benchmark(c: &mut Criterion) {
let sk = babyjubjub_rs::new_key();
let pk = sk.public().unwrap();
let msg = 5.to_bigint().unwrap();
c.bench_function("sign_poseidon", |b| {
b.iter(|| sk.sign_poseidon(msg.clone()))
});
let sig = sk.sign_poseidon(msg.clone()).unwrap();
c.bench_function("verify_poseidon", |b| {
b.iter(|| babyjubjub_rs::verify_poseidon(pk.clone(), sig.clone(), msg.clone()))
c.bench_function("sign", |b| b.iter(|| sk.sign(msg.clone())));
let sig = sk.sign(msg.clone()).unwrap();
c.bench_function("verify", |b| {
b.iter(|| babyjubjub_rs::verify(pk.clone(), sig.clone(), msg.clone()))
});
}