Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
cronokirby committed Feb 7, 2024
1 parent db630d1 commit bf11c5d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/penumbra-zone/decaf377-rdsa"
[dependencies]
blake2b_simd = "0.5"
byteorder = "1.3"
decaf377 = {default-features = false, git = "https://github.com/penumbra-zone/decaf377", rev = "c8f6a6c5e83736813e95277e82f546bff55ae90a"}
decaf377 = {git = "https://github.com/penumbra-zone/decaf377", rev = "c8f6a6c5e83736813e95277e82f546bff55ae90a", features = ["arkworks", "r1cs"]}
digest = "0.9"
rand_core = "0.6"
serde = { version = "1", optional = true, features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use std::convert::TryFrom;

use ark_ff::Zero;
use decaf377::{Element, FieldExt, Fr};
use decaf377::{Element, Fr};
use rand_core::{CryptoRng, RngCore};

use crate::{
Expand Down Expand Up @@ -190,7 +190,7 @@ impl Verifier {
Inner::Binding { sig, c, .. } => (sig.s_bytes(), sig.r_bytes(), c),
};

let s = Fr::from_bytes(s_bytes).map_err(|_| Error::InvalidSignature)?;
let s = Fr::from_bytes_checked(&s_bytes).map_err(|_| Error::InvalidSignature)?;
let R = decaf377::Encoding(r_bytes)
.vartime_decompress()
.map_err(|_| Error::InvalidSignature)?;
Expand Down
3 changes: 1 addition & 2 deletions src/signing_key.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::convert::{TryFrom, TryInto};

use ark_ff::PrimeField;
use decaf377::{FieldExt, Fr};
use decaf377::Fr;
use rand_core::{CryptoRng, RngCore};

use crate::{Binding, Domain, Error, Signature, SpendAuth, VerificationKey};
Expand Down
5 changes: 3 additions & 2 deletions src/verification_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::{
marker::PhantomData,
};

use decaf377::{FieldExt, Fr};
use decaf377::Fr;

use crate::{domain::Sealed, Binding, Domain, Error, Signature, SpendAuth};

Expand Down Expand Up @@ -222,7 +222,8 @@ impl<D: Domain> VerificationKey<D> {
.vartime_decompress()
.map_err(|_| Error::InvalidSignature)?;

let s = Fr::from_bytes(signature.s_bytes()).map_err(|_| Error::InvalidSignature)?;
let s =
Fr::from_bytes_checked(&signature.s_bytes()).map_err(|_| Error::InvalidSignature)?;

// XXX rewrite as normal double scalar mul
// Verify check is h * ( - s * B + R + c * A) == 0
Expand Down

0 comments on commit bf11c5d

Please sign in to comment.