Skip to content
Snippets Groups Projects
Commit 60833975 authored by Niels Möller's avatar Niels Möller
Browse files

Add modular square root for ecc-192.

* testsuite/ecc-sqrt-test.c (test_sqrt): New function.
(test_sqrt_ratio): Renamed, from...
(test_modulo): ... old name.
(test_main): Call test_sqrt and test_sqrt_ratio, for those curves
that support these operations.

* ecc-192.c (ecc_192_zero_p): New function.
(ecc_192_sqrt): New square root function, based on patch by Wim
Lewis.

* ecc-25519.c (ecc_25519_sqrt_ratio): Renamed, from...
(ecc_25519_sqrt): ... old name.
(_nettle_curve25519): Update curve definition.

* ecc-internal.h (ecc_mod_sqrt_func): New typedef.
(struct ecc_modulo): Add sqrt_ratio_itch and sqrt function
pointer. Update all curve definitionns.
parent d0ab52a3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment