From: Niels Möller Date: Sat, 28 Nov 2020 14:45:13 +0000 (+0100) Subject: Merge branch 'ppc-gcm' into master-updates X-Git-Tag: nettle_3.7rc1~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7078859c239f1f9e1d61995ef0546f54af07a34a;p=thirdparty%2Fnettle.git Merge branch 'ppc-gcm' into master-updates --- 7078859c239f1f9e1d61995ef0546f54af07a34a diff --cc ChangeLog index 82de3a48,d63f8198..c8a1fd84 --- a/ChangeLog +++ b/ChangeLog @@@ -1,69 -1,19 +1,85 @@@ + 2020-11-26 Niels Möller + + Enable powerpc64 gcm code in fat builds. Based on patch + contributed by Mamone Tarsha: + * powerpc64/fat/gcm-hash.asm: New file. + * configure.ac: Add HAVE_NATIVE_fat_gcm_init_key and + HAVE_NATIVE_fat_gcm_hash. + * gcm.c (gcm_init_key): Renamed, to ... + (_nettle_gcm_init_key_c): ... new name. Add fat setup conditionals. + (gcm_hash): Renamed, to... + (_nettle_gcm_hash_c): ... new name. Add fat setup conditionals. + * fat-setup.h (gcm_init_key_func, gcm_hash_func): New typedefs. + * fat-ppc.c: Select implementations of _nettle_gcm_init_key and _nettle_gcm_hash. + * gcm-internal.h: New file. + * Makefile.in (DISTFILES): Add gcm-internal.h. + +2020-11-28 Niels Möller + + * powerpc64/p7/chacha-2core.asm: Simplify counter carry handling + using the vaddcuw instruction. + + Merge changes by Marco Bodrato and Torbjorn Granlund, from the + gmp/mini-gmp copy of this file. + * run-tests: Delete special handling of zero arguments. Update + WINEPATH, instead of overwriting it. + +2020-11-27 Niels Möller + + * aclocal.m4: Replace some calls to exit with return, since exit + requires stdlib.h. Including patch contributed by Adrien Béraud. + + * testsuite/version-test.c: Include version.h. Patch contributed + by Brian Smith. + +2020-11-25 Niels Möller + + * powerpc64/p7/chacha-2core.asm: Add byte swapping of output, for + big-endian builds. + +2020-11-24 Niels Möller + + Enable ppc chacha_2core in fat builds. + * configure.ac: Add HAVE_NATIVE_fat_chacha_2core. + * chacha-crypt.c: Check HAVE_NATIVE_fat_chacha_2core. + * chacha-internal.h (_chacha_crypt_2core, _chacha_crypt32_2core): + Add declarations. + * fat-ppc.c (fat_init): Use _nettle_chacha_crypt_2core and + _nettle_chacha_crypt32_2core when altivec is available. + * powerpc64/fat/chacha-2core.asm: New file, including p7 version. + +2020-11-23 Niels Möller + + * powerpc64/p7/chacha-2core.asm: New file. + + * chacha-crypt.c (_chacha_crypt_2core, _chacha_crypt32_2core): New + variants of chacha_crypt, using _chacha_2core to do two blocks at + a time. + * chacha-internal.h (_chacha_2core, _chacha_2core32): Add declarations. + * configure.ac (asm_nettle_optional_list): Add chacha-2core.asm. + +2020-11-14 Niels Möller + + * 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. + * curve25519-eh-to-x.c (curve25519_eh_to_x): Likewise. + * curve448-eh-to-x.c (curve448_eh_to_x): Update invert call, and + reduce scratch need from 9*size to 5*size. + * 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. + +2020-11-13 Niels Möller + + * ecc-internal.h (ECC_J_TO_A_ITCH): Generalize, and take invert + itch as an argument, similarly to ECC_EH_TO_A_ITCH. Updated all + secp and gost curve definitions to use it. + 2020-10-21 Niels Möller * ecc-secp384r1.c (ecc_secp384r1_inv): New function, modular diff --cc configure.ac index 09c73a53,9908c61a..6fafaa77 --- a/configure.ac +++ b/configure.ac @@@ -497,9 -497,9 +497,9 @@@ asm_replace_list="aes-encrypt-internal. sha3-permute.asm umac-nh.asm umac-nh-n.asm machine.m4" # Assembler files which generate additional object files if they are used. - asm_nettle_optional_list="gcm-hash8.asm cpuid.asm \ + asm_nettle_optional_list="gcm-hash.asm gcm-hash8.asm cpuid.asm \ aes-encrypt-internal-2.asm aes-decrypt-internal-2.asm memxor-2.asm \ - chacha-3core.asm chacha-core-internal-2.asm salsa20-2core.asm \ + chacha-2core.asm chacha-3core.asm chacha-core-internal-2.asm salsa20-2core.asm \ salsa20-core-internal-2.asm sha1-compress-2.asm sha256-compress-2.asm \ sha3-permute-2.asm sha512-compress-2.asm \ umac-nh-n-2.asm umac-nh-2.asm" diff --cc fat-ppc.c index 28397473,1a52261a..8d4a703d --- a/fat-ppc.c +++ b/fat-ppc.c @@@ -60,8 -60,8 +60,9 @@@ #include "nettle-types.h" #include "aes-internal.h" +#include "chacha-internal.h" #include "gcm.h" + #include "gcm-internal.h" #include "fat-setup.h" /* Defines from arch/powerpc/include/uapi/asm/cputable.h in Linux kernel */