mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-06 20:20:39 +00:00
revert change to fn x25519
This commit is contained in:
parent
34abee71f8
commit
e93a7125d9
1 changed files with 2 additions and 2 deletions
|
|
@ -94,9 +94,9 @@ pub fn generate_public(secret: &SecretKey) -> MontgomeryPoint {
|
||||||
|
|
||||||
/// The x25519 function, as specified in RFC7748.
|
/// The x25519 function, as specified in RFC7748.
|
||||||
pub fn x25519(scalar: &Scalar, point: &MontgomeryPoint) -> MontgomeryPoint {
|
pub fn x25519(scalar: &Scalar, point: &MontgomeryPoint) -> MontgomeryPoint {
|
||||||
//let k: Scalar = decode_scalar(scalar);
|
let k: Scalar = decode_scalar(scalar.as_bytes());
|
||||||
|
|
||||||
(scalar * point)
|
(k * point)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Utility function to make it easier to call `x25519()` with byte arrays as
|
/// Utility function to make it easier to call `x25519()` with byte arrays as
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue