mirror of
https://github.com/saymrwulf/risc0-curve25519-dalek-source.git
synced 2026-09-04 20:03:40 +00:00
Change size of limbs in the reduction test.
This commit is contained in:
parent
14163131f9
commit
607b839032
1 changed files with 6 additions and 6 deletions
|
|
@ -358,17 +358,17 @@ mod test {
|
|||
let a = FieldElement51([2438, 24, 243, 0, 0]).invert();
|
||||
// ... but now multiply it by 128 without reducing coeffs
|
||||
let abig = FieldElement51([
|
||||
a.0[0] << 8,
|
||||
a.0[1] << 8,
|
||||
a.0[2] << 8,
|
||||
a.0[3] << 8,
|
||||
a.0[4] << 8,
|
||||
a.0[0] << 4,
|
||||
a.0[1] << 4,
|
||||
a.0[2] << 4,
|
||||
a.0[3] << 4,
|
||||
a.0[4] << 4,
|
||||
]);
|
||||
|
||||
let abigx4: F51x4Reduced = F51x4Unreduced::new(&abig, &abig, &abig, &abig).into();
|
||||
|
||||
let splits = F51x4Unreduced::from(abigx4).split();
|
||||
let c = &a * &FieldElement51([128, 0, 0, 0, 0]);
|
||||
let c = &a * &FieldElement51([(1 << 4), 0, 0, 0, 0]);
|
||||
|
||||
for i in 0..4 {
|
||||
assert_eq!(c, splits[i]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue