Skip to content

Commit

Permalink
Migrate to group 0.13, jubjub 0.10, pasta_curves 0.5 (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
str4d authored Feb 28, 2023
1 parent 08bb408 commit eadc488
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Entries are listed in reverse chronological order.

## Unreleased

* Migrate to `group` 0.13, `jubjub` 0.10, `pasta_curves` 0.5

## 0.4.0

* port improvements from Zebra (#40)
Expand Down
8 changes: 5 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ features = ["nightly"]
[dependencies]
blake2b_simd = { version = "1", default-features = false }
byteorder = { version = "1.4", default-features = false }
group = { version = "0.12", default-features = false }
group = { version = "0.13", default-features = false }
hex = { version = "0.4", optional = true, default-features = false, features = ["alloc"] }
jubjub = { version = "0.9", default-features = false }
pasta_curves = { version = "0.4", default-features = false }
jubjub = { version = "0.10", default-features = false }
pasta_curves = { version = "0.5", default-features = false }
rand_core = { version = "0.6", default-features = false }
serde = { version = "1", optional = true, features = ["derive"] }
thiserror = { version = "1.0", optional = true }
Expand All @@ -52,6 +52,8 @@ frost-rerandomized = { git = "https://github.com/ZcashFoundation/frost.git", rev

# `alloc` is only used in test code
[dev-dependencies.pasta_curves]
version = "0.5"
default-features = false
features = ["alloc"]

[features]
Expand Down
6 changes: 3 additions & 3 deletions src/batch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ impl<S: SpendAuth, B: Binding<Scalar = S::Scalar, Point = S::Point>> Verifier<S,
let mut VKs = Vec::with_capacity(n);
let mut R_coeffs = Vec::with_capacity(self.signatures.len());
let mut Rs = Vec::with_capacity(self.signatures.len());
let mut P_spendauth_coeff = S::Scalar::zero();
let mut P_binding_coeff = B::Scalar::zero();
let mut P_spendauth_coeff = S::Scalar::ZERO;
let mut P_binding_coeff = B::Scalar::ZERO;

for item in self.signatures.iter() {
let (s_bytes, r_bytes, c) = match item.inner {
Expand Down Expand Up @@ -256,7 +256,7 @@ impl<S: SpendAuth, B: Binding<Scalar = S::Scalar, Point = S::Point>> Verifier<S,
R_coeffs.push(z);
Rs.push(R);

VK_coeffs.push(S::Scalar::zero() + (z * c));
VK_coeffs.push(S::Scalar::ZERO + (z * c));
VKs.push(VK);
}

Expand Down
2 changes: 1 addition & 1 deletion src/orchard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl super::Binding for Binding {}

impl private::SealedScalar for pallas::Scalar {
fn from_bytes_wide(bytes: &[u8; 64]) -> Self {
<pallas::Scalar as pasta_curves::arithmetic::FieldExt>::from_bytes_wide(bytes)
<pallas::Scalar as group::ff::FromUniformBytes<64>>::from_uniform_bytes(bytes)
}
fn from_raw(val: [u64; 4]) -> Self {
pallas::Scalar::from_raw(val)
Expand Down

0 comments on commit eadc488

Please sign in to comment.