mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-06 20:41:14 +00:00
Fix match statements on public key decompression.
This commit is contained in:
parent
6c8ae573d9
commit
b32e39c801
1 changed files with 4 additions and 4 deletions
|
|
@ -791,8 +791,8 @@ impl PublicKey {
|
||||||
let k: Scalar;
|
let k: Scalar;
|
||||||
|
|
||||||
let A: EdwardsPoint = match self.0.decompress() {
|
let A: EdwardsPoint = match self.0.decompress() {
|
||||||
Ok(x) => x,
|
Some(x) => x,
|
||||||
Err => Err(SignatureError(InternalError::PointDecompressionError))),
|
None => return Err(SignatureError(InternalError::PointDecompressionError)),
|
||||||
};
|
};
|
||||||
|
|
||||||
h.input(signature.R.as_bytes());
|
h.input(signature.R.as_bytes());
|
||||||
|
|
@ -842,8 +842,8 @@ impl PublicKey {
|
||||||
debug_assert!(ctx.len() <= 255, "The context must not be longer than 255 octets.");
|
debug_assert!(ctx.len() <= 255, "The context must not be longer than 255 octets.");
|
||||||
|
|
||||||
let A: EdwardsPoint = match self.0.decompress() {
|
let A: EdwardsPoint = match self.0.decompress() {
|
||||||
Ok(x) => x,
|
Some(x) => x,
|
||||||
Err => Err(SignatureError(InternalError::PointDecompressionError))),
|
None => return Err(SignatureError(InternalError::PointDecompressionError)),
|
||||||
};
|
};
|
||||||
|
|
||||||
h.input(b"SigEd25519 no Ed25519 collisions");
|
h.input(b"SigEd25519 no Ed25519 collisions");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue