summaryrefslogtreecommitdiff
path: root/ecc-eh-to-a.c
Commit message (Collapse)AuthorAgeFilesLines
* New functions ecc_mod_mul_canonical and ecc_mod_sqr_canonical.Niels Möller2021-03-111-10/+2
| | | | | | | | | | | * ecc-mod-arith.c (ecc_mod_mul_canonical, ecc_mod_sqr_canonical): New functions. * ecc-internal.h: Declare and document new functions. * curve448-eh-to-x.c (curve448_eh_to_x): Use ecc_mod_sqr_canonical. * curve25519-eh-to-x.c (curve25519_eh_to_x): Use ecc_mod_mul_canonical. * ecc-eh-to-a.c (ecc_eh_to_a): Likewise. * ecc-j-to-a.c (ecc_j_to_a): Likewise. * ecc-mul-m.c (ecc_mul_m): Likewise.
* Improve scratch usage in ecc_mod_inv.Niels Möller2020-11-141-2/+2
| | | | | | | | | | | | | * ecc-mod-inv.c (ecc_mod_inv): Use passed in scratch for all scratch needs, don't use memory after the result area. * ecc-ecdsa-sign.c (ecc_ecdsa_sign): Update invert call. * ecc-ecdsa-verify.c (ecc_ecdsa_verify): Likewise. * ecc-eh-to-a.c (ecc_eh_to_a): Likewise. * ecc-j-to-a.c (ecc_j_to_a): Likewise. * ecc-gostdsa-verify.c (ecc_gostdsa_verify): Likewise. * ecc-internal.h (ECC_MOD_INV_ITCH, ECC_J_TO_A_ITCH) (ECC_EH_TO_A_ITCH): Update accordingly, but no change in total scratch need.
* Separate result area for ecc_mod_mul and ecc_mod_sqr.Niels Möller2020-11-011-2/+2
| | | | | | | | * ecc-mod-arith.c (ecc_mod_mul, ecc_mod_sqr): Separate argument for scratch area, reducing required size of result area. Update all callers to naïvely keep using result in scratch area. (ecc_mod_pow_2k, ecc_mod_pow_2k_mul): Simplified, also reducing required size of result area.
* ecc: remove ecc_modp_foo/ecc_modq_foo macrosDmitry Baryshkov2020-02-151-2/+2
| | | | | | | To make ecc functions usage more obvious remove ecc_modp_foo() and ecc_modq_foo() wrapper macros. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* Delete tests and code for ecdsa over curve25519.Niels Möller2019-12-071-19/+2
| | | | | | | | | | * ecc-eh-to-a.c (ecc_eh_to_a): Require op == 0, delete code only used for non-standard ecdsa over curve25519. * testsuite/ecdsa-sign-test.c (test_main): Delete test of ecdsa over curve25519. * testsuite/ecdsa-verify-test.c (test_main): Likewise. * testsuite/ecdsa-keygen-test.c (test_main): Exclude curve25519 from test.
* Comment fixes.Niels Möller2017-09-231-3/+4
|
* ecc-eh-to-a, eddsa-sign: Parameterize hard-coded valueDaiki Ueno2017-09-231-1/+1
| | | | | | This allows the same code to be reused in curve448 and Ed448. Signed-off-by: Daiki Ueno <dueno@redhat.com>
* Moved internal declarations from ecc.h to ecc-internal.h.Niels Möller2015-01-271-8/+0
|
* Drop an unneeded local cy variable.Niels Möller2014-10-041-1/+0
|
* curve25519: Use powering to compute modp inverses, 5.5 times faster than ↵Niels Möller2014-09-231-3/+4
| | | | ecc_mod_inv.
* ecc_mod_inv interface and allocation changes.Niels Möller2014-09-231-3/+2
|
* Added invert function pointer to struct ecc_modulo.Niels Möller2014-09-221-1/+1
| | | | | Updated and renamed sec_modinv -> ecc_mod_inv, and deleted the ecc_modp_inv and ecc_modq_inv wrapper functions.
* Introduced struct ecc_modulo.Niels Möller2014-09-221-16/+16
|
* Let "affine" points for curve25519 be Edwards coordinates rather than ↵Niels Möller2014-09-171-44/+19
| | | | Montgomery coordinates.
* Fixed sign error in comment.Niels Möller2014-09-021-1/+1
|
* ecc_eh_to_a interface change, optionally reduce x mod q.Niels Möller2014-08-281-5/+21
|
* Updated FIXME comments.Niels Möller2014-08-231-6/+7
|
* Comment fixes.Niels Möller2014-07-151-1/+4
|
* Implemented point doubling for Edwards curves.Niels Möller2014-07-111-0/+101