Skip to content

Commit

Permalink
Merge 304b72f into f1f0e57
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri authored Apr 21, 2021
2 parents f1f0e57 + 304b72f commit 83ec79a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ecdsa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ keywords = ["crypto", "ecc", "nist", "secp256k1", "signature"]

[dependencies]
der = { version = "0.3", optional = true, features = ["big-uint"] }
elliptic-curve = { version = "0.9.9", default-features = false }
elliptic-curve = { version = "0.9.10", default-features = false }
hmac = { version = "0.10", optional = true, default-features = false }
signature = { version = ">= 1.3.0, < 1.4.0", default-features = false, features = ["rand-preview"] }

Expand Down
7 changes: 5 additions & 2 deletions ecdsa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ use core::{
};
use elliptic_curve::{
generic_array::{sequence::Concat, typenum::Unsigned, ArrayLength, GenericArray},
FieldBytes, Order,
FieldBytes, Order, ScalarBytes,
};

#[cfg(feature = "arithmetic")]
Expand Down Expand Up @@ -279,7 +279,10 @@ where
return Err(Error::new());
}

if !bool::from(C::is_scalar_repr_in_range(GenericArray::from_slice(scalar))) {
if ScalarBytes::<C>::new(GenericArray::clone_from_slice(scalar))
.is_none()
.into()
{
return Err(Error::new());
}
}
Expand Down

0 comments on commit 83ec79a

Please sign in to comment.