]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Merge branch 'ppc-gcm' into master-updates
authorNiels Möller <nisse@lysator.liu.se>
Sat, 28 Nov 2020 14:45:13 +0000 (15:45 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Sat, 28 Nov 2020 14:45:13 +0000 (15:45 +0100)
1  2 
ChangeLog
configure.ac
fat-ppc.c

diff --cc ChangeLog
index 82de3a48172cb5e7668f6e2eaa43a30e408cb31f,d63f8198439be5179fcfd9c5b63f98c7991dbd3c..c8a1fd84437045f82137d0ccb57e23d031a9aacb
+++ b/ChangeLog
@@@ -1,69 -1,19 +1,85 @@@
+ 2020-11-26  Niels Möller  <nisse@lysator.liu.se>
+       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  <nisse@lysator.liu.se>
 +
 +      * 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  <nisse@lysator.liu.se>
 +
 +      * 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  <nisse@lysator.liu.se>
 +
 +      * powerpc64/p7/chacha-2core.asm: Add byte swapping of output, for
 +      big-endian builds.
 +
 +2020-11-24  Niels Möller  <nisse@lysator.liu.se>
 +
 +      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  <nisse@lysator.liu.se>
 +
 +      * 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  <nisse@lysator.liu.se>
 +
 +      * 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  <nisse@lysator.liu.se>
 +
 +      * 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  <nisse@lysator.liu.se>
  
        * ecc-secp384r1.c (ecc_secp384r1_inv): New function, modular
diff --cc configure.ac
index 09c73a53c35de89e9b9617bc019b218f9caa5436,9908c61a921d6c302c693b4276fd694673b3d81d..6fafaa776bab2993c985f3647b08d6fde71cea94
@@@ -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 2839747330e3e57e61166c17bc59e4ca13850d80,1a52261af4f9295378ee42c3031f935aedf87116..8d4a703d3a40763c4fcf1350adac62874b2ca8e5
+++ 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 */