Skip to content

Commit 8aff077

Browse files
committed
Update to PrimeField::from_repr() changes
1 parent 132a6b1 commit 8aff077

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Cargo.lock

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ slh-dsa = { path = "./slh-dsa" }
3131
# https://github.com/RustCrypto/traits/pull/1774
3232
# https://github.com/RustCrypto/traits/pull/1822
3333
# https://github.com/RustCrypto/traits/pull/1845
34+
# https://github.com/zkcrypto/ff/pull/137
3435
digest = { git = "https://github.com/RustCrypto/traits.git" }
35-
elliptic-curve = { git = "https://github.com/RustCrypto/traits.git" }
36+
elliptic-curve = { git = "https://github.com/RustCrypto/traits.git", rev = "238fa0841040acb8a8b0a7c50a66adcaa847d28a" }
37+
ff = { git = "https://github.com/zkcrypto/ff.git", rev = "8e139e2fb25ab61a5d362394af0a34b10c03d59b" }
3638
signature = { git = "https://github.com/RustCrypto/traits.git" }
3739

3840
crypto-primes = { git = "https://github.com/entropyxyz/crypto-primes.git" }

ecdsa/src/dev.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ macro_rules! new_signing_test {
5050

5151
fn decode_scalar(bytes: &[u8]) -> Option<NonZeroScalar<$curve>> {
5252
if bytes.len() == <$curve as Curve>::FieldBytesSize::USIZE {
53-
NonZeroScalar::<$curve>::from_repr(bytes.try_into().unwrap()).into()
53+
NonZeroScalar::<$curve>::from_repr(&bytes.try_into().unwrap()).into()
5454
} else {
5555
None
5656
}

ecdsa/src/hazmat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ where
196196
// h = bits2int(H(m)) mod q
197197
let z2 = <Scalar<C> as Reduce<C::Uint>>::reduce_bytes(z);
198198

199-
let k = NonZeroScalar::<C>::from_repr(rfc6979::generate_k::<D, _>(
199+
let k = NonZeroScalar::<C>::from_repr(&rfc6979::generate_k::<D, _>(
200200
&d.to_repr(),
201201
&C::ORDER.encode_field_bytes(),
202202
&z2.to_repr(),

0 commit comments

Comments
 (0)