mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
use clamp_scalar for StaticSecret
This ensures that the `StaticSecret`'s scalar always has the X25519 bit-twiddles applied. Co-Authored-By: DebugSteven <debugsteven@gmail.com>
This commit is contained in:
parent
bcea24308f
commit
aee783ae82
1 changed files with 1 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ impl StaticSecret {
|
|||
impl From<[u8; 32]> for StaticSecret {
|
||||
/// Load a `StaticSecret` from a byte array.
|
||||
fn from(bytes: [u8; 32]) -> StaticSecret {
|
||||
StaticSecret(Scalar::from_bits(bytes))
|
||||
StaticSecret(clamp_scalar(bytes))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue