From: Niels Möller Date: Sat, 7 Nov 2020 10:16:35 +0000 (+0100) Subject: Merge branch 'ppc-chacha-core' X-Git-Tag: nettle_3.7rc1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=611abe02e3a1fde17697ab70e7c2805b6cfc0eee;p=thirdparty%2Fnettle.git Merge branch 'ppc-chacha-core' --- 611abe02e3a1fde17697ab70e7c2805b6cfc0eee diff --cc ChangeLog index 6626c6ea,16030369..218fa394 --- a/ChangeLog +++ b/ChangeLog @@@ -1,51 -1,17 +1,66 @@@ + 2020-11-07 Niels Möller + ++ Merged initial powerpc64 implementation of chacha. + * configure.ac: New command line option --enable-power-altivec. + Update asm_path logic, and add altivec to FAT_TEST_LIST. + * fat-ppc.c (get_ppc_features): Add logic to check for altivec and + vsx support, and select aither C or altivec implementation of + chacha_core. - * powerpc64/fat/chacha-core-internal-2.asm: New file. ++ * powerpc64/p7/chacha-core-internal.asm: New file. + + 2020-09-25 Niels Möller + + * powerpc64/p7/chacha-core-internal.asm: New file. + * Makefile.in (distdir): Add powerpc64/p7. + +2020-10-29 Niels Möller + + * blowfish.c (blowfish_set_key): Add casts to uint32_t. Avoids + undefined behavior, since shifting an 8-bit value left by 24 bits + overflows the range of signed int. Reported by Guido Vranken. + +2020-10-28 Niels Möller + + * gmp-glue.h (cnd_add_n, cnd_sub_n, cnd_swap): Deleted, use + corresponding functions mpn_cnd_add_n, mpn_cnd_sub_n, + mpn_cnd_swap, available from GMP version 6.1.0. Update all + callers, in particular, mpn_cnd_add_n and mpn_cnd_sub_n has one + more argument than the old functions. + + * gmp-glue.c (mpn_cnd_add_n, mpn_cnd_sub_n, mpn_cnd_swap) + [NETTLE_USE_MINI_GMP]: Fallback definitions or mini-gmp builds. + +2020-10-14 Niels Möller + + * ecc-mod-arith.c (ecc_mod_pow_2k, ecc_mod_pow_2k_mul): Moved + functions here. + * ecc-internal.h (ecc_mod_pow_2kp1): New macro, calling the more + general ecc_mod_pow_2k_mul. + * ecc-curve25519.c (ecc_mod_pow_2kp1): Deleted static function. + * ecc-curve448.c (ecc_mod_pow_2k, ecc_mod_pow_2kp1): Deleted + static functions. + +2020-10-13 Niels Möller + + * 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. + +2020-09-25 Niels Möller + * gcm.c (gcm_fill): Added separate implementations for big- and little-endian, to use uint64_t stores and less overhead.