mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-04 20:24:10 +00:00
Fix test errors from #70.
This commit is contained in:
parent
7af25420ec
commit
4f0ad77805
1 changed files with 11 additions and 0 deletions
|
|
@ -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];
|
||||
Loading…
Reference in a new issue