Add a test for radix-51 multiplication

This commit is contained in:
Henry de Valence 2017-03-12 23:17:38 -07:00
parent 92bf47f990
commit 3a55a2f410

View file

@ -1034,6 +1034,14 @@ mod test {
assert_eq!(asq, &a*&a);
}
#[test]
fn mul64_on_a() {
let a: [u64;5] = [838547684720132, 293808819440897, 1085520638549020, 231251532116217, 416286470530165];
let asq_constant_from_sage: [u64; 5] = [1696437425706869, 260630435370367, 277335390860868, 1743763050813710, 1739636627710249];
let asq = mul64(&a, &a.clone());
assert_eq!(asq, asq_constant_from_sage);
}
#[test]
fn a_square_vs_a_squared_constant() {
let a = FieldElement::from_bytes(&A_BYTES);