summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Eliminate one unneeded ecc_modp_add in ecc_dup_eh.Niels Möller2019-12-152-3/+7
|
* Comment fixes and notation for ecc_dup_ehNiels Möller2019-12-151-49/+53
|
* Comment fixes for ecc_add_ehhNiels Möller2019-12-141-8/+9
|
* Comment fixes for ecc_add_ehNiels Möller2019-12-141-8/+14
|
* New function ecc_mul_m.Niels Möller2019-12-146-198/+182
| | | | | | | | | | | | * curve25519-mul.c (curve25519_mul): Use ecc_mul_m. * curve448-mul.c (curve448_mul): Likewise. * ecc-mul-m.c (ecc_mul_m): New file and function. Implements multipliction for curves in Montgomery representation, as used for curve25519 and curve448. Extracted from curve25519_mul. * ecc-internal.h (ecc_mul_m): Declare. (ECC_MUL_M_ITCH): New macro. * Makefile.in (hogweed_SOURCES): Add ecc-mul-m.c.
* Merge branch 'curve448' into masterNiels Möller2019-12-1332-34/+1495
|\
| * Revert itch macro changes.curve448Niels Möller2019-12-097-10/+16
| | | | | | | | | | | | | | We now have h_to_a_itch <= mul_itch, mul_g_itch. Add asserts at a few places relying on this. (ECC_ECDSA_KEYGEN_ITCH, ECC_MAX): Delete macros. (ECC_ECDSA_SIGN_ITCH): Revert previous change.
| * Trim scratch usage of curve448 operations.Niels Möller2019-12-093-7/+16
| | | | | | | | | | | | | | * ecc-448.c (ecc_mod_pow_446m224m1): Reduce scratch space from 9*n to 6*n. (ECC_448_INV_ITCH, ECC_448_SQRT_ITCH): Reduce accordingly. * curve448-mul.c (curve448_mul): Reduce allocation from 14*n to 12*n.
| * x86_64 implementation of nettle_ecc_curve448_modpNiels Möller2019-12-084-2/+161
| | | | | | | | | | | | | | | | | | * x86_64/ecc-curve448-modp.asm (nettle_ecc_curve448_modp): New assembly function. * ecc-448.c (ecc_448_modp) [HAVE_NATIVE_ecc_curve448_modp]: Use native nettle_ecc_curve448_modp if available. * configure.ac (asm_hogweed_optional_list): Add ecc-curve448-modp.asm. (HAVE_NATIVE_ecc_curve448_modp): New config.h define.
| * New mod function for curve448, for 64-bit architecturesNiels Möller2019-12-032-2/+57
| | | | | | | | * ecc-448.c (ecc_448_modp) [GMP_NUMB_BITS == 64]: New function.
| * ChangeLog for curve448 changesNiels Möller2019-12-011-0/+55
| |
| * Implement Curve448 primitivesDaiki Ueno2019-11-3030-39/+1212
| | | | | | | | | | | | | | This patch adds the necessary primitives for "curve448", defined in RFC 7748. Those primitives are namely: addition, doubling, scalar multiplication of the generator or an arbitrary point, inversion, and square root.
* | Delete tests and code for ecdsa over curve25519.Niels Möller2019-12-075-46/+16
| | | | | | | | | | | | | | | | | | | | * 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.
* | Fix configure check for __builtin_bswap64.Niels Möller2019-12-052-1/+8
| | | | | | | | | | | | | | * configure.ac: Use AC_TRY_LINK rather than AC_TRY_COMPILE to check for __builtin_bswap64. Since calling an non-existing function typically results in a warning only at compile time, but fails at link time. Patch contributed by by George Koehler.
* | Add cast in test_cipher_cfb8.Niels Möller2019-12-042-2/+7
|/ | | | | * testsuite/testutils.c (test_cipher_cfb8): Add cast of size_t to unsigned long for argument to fprintf.
* gitlab-ci: Disable gost in gnutls buildNiels Möller2019-11-241-1/+1
| | | | Current gost support in gnutls depends on nettle internals.
* eccdata: (ecc_curve_init_str): Delete unused t and d arguments.Niels Möller2019-11-212-27/+15
| | | | | | | | Related to the the edwards_root member of struct ecc_curve, which was used by ecc_a_to_eh before it was deleted, see 2014-09-17 entry below. (ecc_curve_init): Delete corresponding curve25519 constants, and NULL arguments passed for the other curves.
* Merge branch 'curve448' into masterNiels Möller2019-11-2115-234/+285
|\
| * Use Edwards curve for curve25519 precomputation.Niels Möller2017-09-233-147/+157
| | | | | | | | | | | | | | | | * eccdata.c: Reorganize curve25519 precomputation to work directly with the twisted Edwards curve, with new point addition based on a patch from Daiki Ueno. * ecc-25519.c (_nettle_curve25519): Update for removed Montgomery curve constant.
| * Delete unused pointer edwards_root from struct ecc_curve.Niels Möller2017-09-239-12/+4
| | | | | | | | | | | | * ecc-internal.h (struct ecc_curve): Delete unused pointer edwards_root. Update all instances. * eccdata.c (output_curve): Don't output it.
| * Comment fixes.Niels Möller2017-09-232-8/+8
| |
| * ChangeLog entry for previous change.Niels Möller2017-09-231-0/+4
| |
| * ecc-eh-to-a, eddsa-sign: Parameterize hard-coded valueDaiki Ueno2017-09-232-2/+2
| | | | | | | | | | | | This allows the same code to be reused in curve448 and Ed448. Signed-off-by: Daiki Ueno <dueno@redhat.com>