Commit b416f90d authored by Niels Möller's avatar Niels Möller
Browse files

Improved curve25519-dup-test.

parent 71cdc778
2014-07-14 Niels Möller <nisse@lysator.liu.se>
* testsuite/curve25519-dup-test.c (test_main): Add test for 4g.
Delete some left-over debug output.
2014-07-11 Niels Möller <nisse@lysator.liu.se>
* misc/ecc-formulas.tex: Some ECC notes.
......
......@@ -41,6 +41,13 @@ test_main (void)
"13b57e011700e8ae050a00945d2ba2f3"
"77659eb28d8d391ebcd70465c72df563"
};
const struct ecc_ref_point g4 =
{
"79ce98b7e0689d7de7d1d074a15b315f"
"fe1805dfcd5d2a230fee85e4550013ef",
"075af5bf4ebdc75c8fe26873427d275d"
"73c0fb13da361077a565539f46de1c30"
};
g = xalloc_limbs (ecc_size_j (ecc));
z = xalloc_limbs (ecc_size_j (ecc));
......@@ -61,14 +68,12 @@ test_main (void)
die ("dup of zero point failed.\n");
ecc_dup_eh (ecc, pe, g, scratch);
gmp_fprintf (stderr, "g2 (edwards):\n"
"x = %Nx\n"
"y = %Nx\n"
"z = %Nx\n",
pe, ecc->size,
pe + ecc->size, ecc->size,
pe + 2*ecc->size, ecc->size);
ecc_eh_to_a (ecc, 0, pa, pe, scratch);
test_ecc_point (ecc, &g2, pa);
ecc_dup_eh (ecc, pe, pe, scratch);
ecc_eh_to_a (ecc, 0, pa, pe, scratch);
test_ecc_point (ecc, &g4, pa);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment