summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make ecc modular inversion use redc form, for relevant curves.invert-with-redcNiels Möller2020-01-297-53/+90
| | | | | | | | | | | | | | | | | | | * ecc-mod-inv.c (ecc_mod_inv_destructive): New helper function, not preserving input argument. Extracted from old ecc_mod_inv. (ecc_mod_inv): Call ecc_mod_inv_destructive. (ecc_mod_inv_redc): New inversion function, with input and output in redc form. * ecc-secp224r1.c: Select between ecc_mod_inv and ecc_mod_inv_redc. * ecc-secp256r1.c: Likewise. * ecc-j-to-a.c (ecc_j_to_a): Simplify redc-related logic, taking advantage of ecc->p.invert handling redc, when appropriate. Reduce scratch need from 5n to 4n in the process (assuming inversion needs 2n). * testsuite/ecc-modinv-test.c (ref_modinv): Updated to do redc, if appropriate.
* Fix comment typoNiels Möller2020-01-291-1/+1
|
* Merge branch 'delete-ecc-g'Niels Möller2020-01-2818-127/+180
|\
| * ChangeLog entriesdelete-ecc-gNiels Möller2020-01-262-1/+23
| |
| * Fix memory leak in ecc-mul-a-testNiels Möller2020-01-261-0/+1
| |
| * Merge branch 'master' into delete-ecc-gNiels Möller2020-01-261-0/+10
| |\ | | | | | | | | | For gitlab CI fix.
| * | Delete definition of ecc->gNiels Möller2020-01-259-20/+3
| | |
| * | Delete all usage of ecc->gNiels Möller2020-01-256-85/+130
| | |
* | | Merge branch 'ecc-gost'Niels Möller2020-01-2824-6/+1452
|\ \ \
| * | | Add index entries for GOST hash and GOST DSA.ecc-gostNiels Möller2020-01-271-0/+2
| | | |
| * | | Add documentation for GOSTDSA and GOST curves.Dmitry Baryshkov2020-01-271-1/+64
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | ChangeLog entriesNiels Möller2020-01-261-0/+29
| | | |
| * | | Merge commit '33d047b2fdf56207fa26a41c531eb7b3192ced53' into ecc-gostNiels Möller2020-01-263-2/+17
| |\ \ \ | | | |/ | | |/| | | | | For gitlab CI fix.
| * | | hogweed-benchmark: enable testing of GOST DSADmitry Baryshkov2020-01-251-0/+104
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | Add GOST DSA according to GOST R 34.10-2001/-2012Dmitry Baryshkov2020-01-2514-2/+873
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add GOST Digital Signature Algorithms support according to GOST R 34.10-2001/-2012. English translations of these standards are provided as RFC 5832 and RFC 7091. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | .gitignore: correct generated header namesDmitry Baryshkov2020-01-231-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | gost gc512a: rename functions to follow usual patternDmitry Baryshkov2020-01-231-7/+7
| | | | | | | | | | | | | | | | Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
| * | | Add support for GOST GC512A curveDmitry Eremin-Solenikov2020-01-168-4/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for GC512A curve ("TLS Supported Groups" registry, draft-smyshlyaev-tls12-gost-suites) also known as tc26-gost-3410-12-512-paramSetA (RFC 7836). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * | | Add support for GOST GC256B curveDmitry Eremin-Solenikov2020-01-168-3/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for GC256B curve ("TLS Supported Groups" registry, draft-smyshlyaev-tls12-gost-suites) also known as GostR3410-2001-CryptoPro-A and GostR3410-2001-CryptoPro-XchA (RFC 4357). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
* | | | Started on NEWS entries for Nettle-3.6.Niels Möller2020-01-262-0/+49
| | | |
* | | | Fix ChangeLog typo.Niels Möller2020-01-261-1/+1
| |/ / |/| |
* | | .gitlab-ci.yml: require linux systems for running CINikos Mavrogiannopoulos2020-01-261-0/+10
| |/ |/| | | | | | | | | | | | | Gitlab added windows shared runners and we should avoid running CI in this environment as it will immediatelly fail. Signed-off-by: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
* | hogweed-benchmark: Pass correct sizes to knuth_lfib_random.Niels Möller2020-01-252-2/+7
|/
* Use %-pattern rules instad of suffix rules.require-gnu-makeNiels Möller2020-01-156-52/+34
|
* Simplify dependency rules using GNU make -include.Niels Möller2020-01-157-28/+20
| | | | | | | | | | | | * aclocal.m4 (DEP_INCLUDE): Delete substituted variable. * Makefile.in: Use the GNU make directive -include to include dependency .d files. Delete dependency files on make clean. * examples/Makefile.in: Likewise. * testsuite/Makefile.in: Likewise. Also use $(OBJEXT) properly. * tools/Makefile.in: Likewise. * configure.ac (dummy-dep-files): Delete these config commands.
* ChangeLog entry for ecc renaming.Niels Möller2020-01-101-0/+10
|
* ecc: rename functions to contain curve names instead of bitsDmitry Eremin-Solenikov2020-01-1020-121/+121
| | | | | | | | Rename curve functions to use curve names instead of just bits. Otherwise function names can easily become confusing after adding other curves. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* ecc: prefix optimized ECC function names with underscoreDmitry Eremin-Solenikov2020-01-1019-31/+31
| | | | | | | There is no need to keep optimized ECC functions in public namespace (nettle_*), move them to internal namespace (_nettle_*). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* ecc: rename source files with curves dataDmitry Eremin-Solenikov2020-01-1022-95/+105
| | | | | | | In preparation to adding GOST curves support, rename source files and use curve name as eccdata parameter. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* .gitlab-ci.yml: use fedora31 imageNikos Mavrogiannopoulos2020-01-061-1/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* sexp-conv: ensure non-null input to strcmp() and strtol()Nikos Mavrogiannopoulos2020-01-061-1/+5
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Add benchmarking of ed25519, ed448 and curve448.ed448Niels Möller2020-01-032-34/+131
|
* Use function pointer to represent eddsa dom prefix.Niels Möller2020-01-026-10/+35
|
* Implement ed448-shake256Niels Möller2020-01-0214-2/+684
|
* Update eddsa internals to support ed448.Niels Möller2020-01-028-30/+97
|
* Add dom string to struct ecc_eddsa.Niels Möller2020-01-023-0/+8
|
* Fix comment typo.Niels Möller2020-01-021-1/+1
|
* Reduce scratch need for curve448 inverse and sqrtNiels Möller2020-01-012-19/+36
|
* Test edddsa point compression with curve448.Niels Möller2020-01-012-63/+76
|
* Reorganize eddsa, based on patch by Daiki Ueno.Niels Möller2019-12-3014-139/+264
| | | | | | | | | | | | | | | | | | | | * eddsa-internal.h (struct ecc_eddsa): New struct for eddsa parameters. * ed25519-sha512.c (_nettle_ed25519_sha512): New parameter struct. * eddsa-expand.c (_eddsa_expand_key): Replace input struct nettle_hash with struct ecc_eddsa, and generalize for ed448. Update all callers. * eddsa-sign.c (_eddsa_sign): Likewise. * eddsa-verify.c (_eddsa_verify): Likewise. * eddsa-compress.c (_eddsa_compress): Store sign bit in most significant bit of last byte, as specified by RFC 8032. * eddsa-decompress.c (_eddsa_decompress): Corresponding update. Also generalize to support ed448, and make validity checks stricter. * testsuite/eddsa-sign-test.c (test_ed25519_sign): New function. (test_main): Use it. * testsuite/eddsa-verify-test.c (test_ed25519): New function. (test_main): Use it.
* Whitespace fixes.Niels Möller2019-12-281-17/+17
|
* Tweak includes of nettle-meta.h.Niels Möller2019-12-284-3/+8
| | | | | | * bignum.h: Drop unreleted include of nettle-meta.h. * pss.h: Include nettle-meta.h explicitly. * eddsa-internal.h: Likewise.
* Document SHAKE-256.shake256Niels Möller2019-12-252-0/+23
|
* Support for SHAKE256, based on patch by Daiki Ueno.Niels Möller2019-12-2510-15/+6061
| | | | | | | | | | * shake256.c (sha3_256_shake): New file and function. * Makefile.in (nettle_SOURCES): Add shake256.c. * testsuite/testutils.c (test_hash): Allow arbitrary digest size, if hash->digest_size == 0. * testsuite/shake.awk: New script to extract test vectors. * testsuite/Makefile.in (TS_NETTLE_SOURCES): Add shake256-test.c. (DISTFILES): Add shake.awk.
* ChangeLog entry for previous change.Niels Möller2019-12-251-0/+8
|
* Generalize _sha3_pad to take magic value as argument.Niels Möller2019-12-256-7/+14
|
* Use add_hh rather than add_hhh for ecc_mul_a_eh.Niels Möller2019-12-253-4/+12
| | | | | | | | * ecc-mul-a-eh.c (ecc_mul_a_eh) [ECC_MUL_A_EH_WBITS == 0]: Use add_hh rather than add_hhh. (table_init) [[ECC_MUL_A_EH_WBITS > 0]: Likewise. * ecc-internal.h (ECC_MUL_A_EH_ITCH) [ECC_MUL_A_EH_WBITS == 0]: Reduced from 13*n to 12*n.
* Rename add and dup functions for Edwards curves.Niels Möller2019-12-1813-251/+390
|
* Use function pointer rather than calling ecc_add_eh directly.Niels Möller2019-12-182-1/+6
| | | | | * eddsa-verify.c (_eddsa_verify): Use function pointer rather than calling ecc_add_eh directly. Preparation for eddsa over curve448.
* Simplify ecc-benchmark.c and delete curve25519 special case.Niels Möller2019-12-172-32/+20
|