Skip to content

Commit 2adc053

Browse files
committed
Update to PrimeField::from_repr() changes
1 parent b98d6c0 commit 2adc053

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,9 @@ ml-dsa = { path = "./ml-dsa" }
2626
rfc6979 = { path = "./rfc6979" }
2727
slh-dsa = { path = "./slh-dsa" }
2828

29+
# https://github.com/RustCrypto/traits/pull/1869
30+
# https://github.com/zkcrypto/ff/pull/137
31+
elliptic-curve = { git = "https://github.com/RustCrypto/traits.git", rev = "2ec3e144f69af5d3836d5d2b545b36105f6d69f9" }
32+
ff = { git = "https://github.com/zkcrypto/ff.git", rev = "8e139e2fb25ab61a5d362394af0a34b10c03d59b" }
33+
2934
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)