Fix test errors from #70.

This commit is contained in:
Isis Lovecruft 2021-09-13 21:40:13 +00:00
parent 7af25420ec
commit 4f0ad77805
No known key found for this signature in database
GPG key ID: AB41313533E8E812

View file

@ -1,6 +1,17 @@
use curve25519_dalek::constants::ED25519_BASEPOINT_TABLE;
use curve25519_dalek::scalar::Scalar;
use x25519_dalek::*;
fn clamp_scalar(mut scalar: [u8; 32]) -> Scalar {
scalar[0] &= 248;
scalar[31] &= 127;
scalar[31] |= 64;
Scalar::from_bits(scalar)
}
#[test]
fn byte_basepoint_matches_edwards_scalar_mul() {
let mut scalar_bytes = [0x37; 32];