mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
check_scalar bug fix for legacy_compatibility feature
This commit is contained in:
parent
75a199e5a0
commit
da959c041d
1 changed files with 1 additions and 1 deletions
|
|
@ -74,7 +74,7 @@ fn check_scalar(bytes: [u8; 32]) -> Result<Scalar, SignatureError> {
|
||||||
// This is compatible with ed25519-donna and libsodium when
|
// This is compatible with ed25519-donna and libsodium when
|
||||||
// -DED25519_COMPAT is NOT specified.
|
// -DED25519_COMPAT is NOT specified.
|
||||||
if bytes[31] & 224 != 0 {
|
if bytes[31] & 224 != 0 {
|
||||||
return Err(SignatureError(InternalError::ScalarFormatError));
|
return Err(InternalError::ScalarFormatError.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(Scalar::from_bits(bytes))
|
Ok(Scalar::from_bits(bytes))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue