]>
git.ipfire.org Git - thirdparty/nettle.git/log
Niels Möller [Thu, 8 Jul 2021 20:51:15 +0000 (22:51 +0200)]
arm64: Add sha2 to aarch64 fat tests.
Niels Möller [Thu, 8 Jul 2021 20:49:43 +0000 (22:49 +0200)]
ChangeLog entry for arm64 sha256..
Niels Möller [Mon, 5 Jul 2021 19:18:57 +0000 (19:18 +0000)]
Merge branch 'arm64-sha' into 'arm64-sha1'
[AArch64] Fat build support for SHA-256 compress
See merge request nettle/nettle!29
Mamone Tarsha [Sat, 3 Jul 2021 11:46:30 +0000 (14:46 +0300)]
[AArch64] Fat build support for SHA-256 compress
Niels Möller [Thu, 1 Jul 2021 19:45:06 +0000 (19:45 +0000)]
Merge branch 'arm64-sha' into 'arm64-sha1'
[AArch64] Optimize SHA-256 compress
See merge request nettle/nettle!28
Mamone Tarsha [Thu, 1 Jul 2021 13:28:13 +0000 (16:28 +0300)]
[AArch64] Optimize SHA-256 compress
Niels Möller [Wed, 30 Jun 2021 18:40:14 +0000 (20:40 +0200)]
Add sha1 to aarch64 fat tests.
Niels Möller [Wed, 30 Jun 2021 18:36:22 +0000 (20:36 +0200)]
ChangeLog entry for previous change.
Maamoun TK [Wed, 30 Jun 2021 18:34:30 +0000 (20:34 +0200)]
arm64: Fat build support for SHA1 compress
Niels Möller [Tue, 1 Jun 2021 17:00:36 +0000 (19:00 +0200)]
ChangeLog entry for arm64 sha1.
Maamoun TK [Fri, 14 May 2021 05:45:33 +0000 (08:45 +0300)]
aarch64: Optimize SHA1 Compress
This patch optimizes SHA1 compress function for arm64 architecture by
taking advantage of SHA-1 instructions of Armv8 crypto extension.
The SHA-1 instructions:
SHA1C: SHA1 hash update (choose)
SHA1H: SHA1 fixed rotate
SHA1M: SHA1 hash update (majority)
SHA1P: SHA1 hash update (parity)
SHA1SU0: SHA1 schedule update 0
SHA1SU1: SHA1 schedule update 1
Benchmark on gcc117 instance of CFarm before applying the patch:
Algorithm mode Mbyte/s
sha1 update 214.16
openssl sha1 update 849.44
hmac-sha1 64 bytes 61.69
hmac-sha1 256 bytes 131.50
hmac-sha1 1024 bytes 185.20
hmac-sha1 4096 bytes 204.55
hmac-sha1 single msg 210.97
Benchmark on gcc117 instance of CFarm after applying the patch:
Algorithm mode Mbyte/s
sha1 update 800.80
openssl sha1 update 849.17
hmac-sha1 64 bytes 166.10
hmac-sha1 256 bytes 409.24
hmac-sha1 1024 bytes 636.98
hmac-sha1 4096 bytes 739.20
hmac-sha1 single msg 775.67
Niels Möller [Mon, 24 May 2021 16:58:12 +0000 (18:58 +0200)]
Fix C++-style comments
Niels Möller [Sun, 23 May 2021 19:14:00 +0000 (21:14 +0200)]
ChangeLog entries for aes keywrap.
Nicolas Mora [Sun, 23 May 2021 19:04:58 +0000 (21:04 +0200)]
Implement aes key wrap and key unwrap (RFC 3394)
Niels Möller [Mon, 10 May 2021 18:52:39 +0000 (20:52 +0200)]
Fix comment typo.
Niels Möller [Tue, 13 Apr 2021 09:23:27 +0000 (11:23 +0200)]
ppc: Fix macro name SWAP_MASK to use all uppercase.
Niels Möller [Sun, 11 Apr 2021 15:18:24 +0000 (17:18 +0200)]
Update config.guess and config.sub.
Niels Möller [Sun, 28 Mar 2021 14:45:02 +0000 (14:45 +0000)]
Merge branch 'wip/ueno/maybe-uninit' into 'master'
nettle-benchmark: avoid -Wmaybe-uninitialized warnings
See merge request nettle/nettle!22
Daiki Ueno [Sat, 27 Mar 2021 07:36:01 +0000 (08:36 +0100)]
nettle-benchmark: avoid -Wmaybe-uninitialized warnings
Otherwise GCC 11 prints the following warning:
nettle-benchmark.c: In function ‘time_umac’:
../umac.h:42:25: warning: ‘key’ may be used uninitialized [-Wmaybe-uninitialized]
42 | #define umac32_set_key nettle_umac32_set_key
nettle-benchmark.c:395:3: note: in expansion of macro ‘umac32_set_key’
395 | umac32_set_key (&ctx32, key);
| ^~~~~~~~~~~~~~
Although this should be harmless as it's in the benchmarking code and
the content of the key doesn't matter, it wouldn't hurt to explicitly
initialize it. This patch also uses predefined constants for key
sizes.
Niels Möller [Sat, 27 Mar 2021 07:39:26 +0000 (08:39 +0100)]
gitlab-ci: Fix only: variables: check, and quote variables.
Niels Möller [Sat, 27 Mar 2021 07:00:36 +0000 (08:00 +0100)]
gitlab-ci: Use pipeline variable S390X_ACCOUNT
And enable remote/s390x job only when needed variables are set.
Niels Möller [Wed, 24 Mar 2021 18:40:03 +0000 (19:40 +0100)]
gitlab-ci: Add remote tests for s390x.
Niels Möller [Mon, 22 Mar 2021 18:17:25 +0000 (19:17 +0100)]
Add forward declaration of struct aes_table.
Niels Möller [Mon, 22 Mar 2021 18:16:40 +0000 (19:16 +0100)]
ChangeLog entries for arm64 fat build.
Niels Möller [Mon, 22 Mar 2021 18:08:14 +0000 (19:08 +0100)]
Merge arm64 fat support into master.
Niels Möller [Mon, 22 Mar 2021 17:47:22 +0000 (18:47 +0100)]
ChangeLog entry for nettle-3.7.2 release
Niels Möller [Sun, 21 Mar 2021 08:29:40 +0000 (09:29 +0100)]
NEWS entries for 3.7.2.
(cherry picked from commit
7a5f86321f4c67d7219aa87ea4e2ddca677d7378 )
Maamoun TK [Sun, 21 Mar 2021 18:48:26 +0000 (20:48 +0200)]
[AArch64] Support fat build for GCM optimization
Maamoun TK [Sun, 21 Mar 2021 18:45:38 +0000 (20:45 +0200)]
[AArch64] Use m4 macros in gcm-hash.asm and add documentation comments
Maamoun TK [Sun, 21 Mar 2021 18:39:47 +0000 (20:39 +0200)]
[AArch64] Update README to be on par with other architectures
Niels Möller [Sat, 13 Mar 2021 15:45:34 +0000 (16:45 +0100)]
Fix canonical reduction in gostdsa_vko.
* gostdsa-vko.c (gostdsa_vko): Use ecc_mod_mul_canonical to
compute the scalar used for ecc multiplication.
Niels Möller [Sat, 13 Mar 2021 15:42:21 +0000 (16:42 +0100)]
Similar fix for eddsa.
* eddsa-hash.c (_eddsa_hash): Ensure result is canonically
reduced. Two of the three call sites need that.
Niels Möller [Sat, 13 Mar 2021 15:29:50 +0000 (16:29 +0100)]
Analogous fix to ecc_gostdsa_verify.
* ecc-gostdsa-verify.c (ecc_gostdsa_verify): Use ecc_mod_mul_canonical
to compute the scalars used for ecc multiplication.
Niels Möller [Sat, 13 Mar 2021 15:27:50 +0000 (16:27 +0100)]
Ensure ecdsa_sign output is canonically reduced.
* ecc-ecdsa-sign.c (ecc_ecdsa_sign): Ensure s output is reduced to
canonical range.
Niels Möller [Sat, 13 Mar 2021 14:19:19 +0000 (15:19 +0100)]
Fix bug in ecc_ecdsa_verify.
* ecc-ecdsa-verify.c (ecc_ecdsa_verify): Use ecc_mod_mul_canonical
to compute the scalars used for ecc multiplication.
* testsuite/ecdsa-verify-test.c (test_main): Add test case that
triggers an assert on 64-bit platforms, without above fix.
* testsuite/ecdsa-sign-test.c (test_main): Test case generating
the same signature.
Niels Möller [Sat, 13 Mar 2021 16:26:37 +0000 (17:26 +0100)]
Use ecc_mod_mul_canonical for point comparison.
* eddsa-verify.c (equal_h): Use ecc_mod_mul_canonical.
Niels Möller [Thu, 11 Mar 2021 18:37:41 +0000 (19:37 +0100)]
New functions ecc_mod_mul_canonical and ecc_mod_sqr_canonical.
* ecc-mod-arith.c (ecc_mod_mul_canonical, ecc_mod_sqr_canonical):
New functions.
* ecc-internal.h: Declare and document new functions.
* curve448-eh-to-x.c (curve448_eh_to_x): Use ecc_mod_sqr_canonical.
* curve25519-eh-to-x.c (curve25519_eh_to_x): Use ecc_mod_mul_canonical.
* ecc-eh-to-a.c (ecc_eh_to_a): Likewise.
* ecc-j-to-a.c (ecc_j_to_a): Likewise.
* ecc-mul-m.c (ecc_mul_m): Likewise.
Niels Möller [Thu, 4 Mar 2021 08:41:17 +0000 (09:41 +0100)]
Merge branch 'arm64'
Niels Möller [Wed, 17 Feb 2021 17:58:06 +0000 (18:58 +0100)]
ChangeLog entry for 3.7.1 release.
Niels Möller [Mon, 15 Feb 2021 19:33:45 +0000 (20:33 +0100)]
Delete benchmarking of openssl arcfour and corresponding glue code
Niels Möller [Sat, 13 Feb 2021 16:38:55 +0000 (17:38 +0100)]
NEWS entries for Nettle-3.7.1.
Niels Möller [Sat, 13 Feb 2021 16:37:00 +0000 (17:37 +0100)]
Increase version numbers, for Nettle-3.7.1.
* configure.ac: Bump package version, to 3.7.1.
(LIBNETTLE_MINOR): Bump minor number, to 8.2.
(LIBHOGWEED_MINOR): Bump minor number, to 6.2.
Niels Möller [Wed, 10 Feb 2021 10:22:23 +0000 (11:22 +0100)]
Fix chacha counter update for _4core variants.
Niels Möller [Wed, 10 Feb 2021 09:26:52 +0000 (10:26 +0100)]
Improve chacha test coverage.
Niels Möller [Mon, 8 Feb 2021 18:38:22 +0000 (19:38 +0100)]
Merge branch 'delete-1-way-neon'
Niels Möller [Mon, 8 Feb 2021 18:29:25 +0000 (19:29 +0100)]
ChangeLog entries for new pbkdf2 variants.
Niels Möller [Wed, 3 Feb 2021 15:36:33 +0000 (16:36 +0100)]
aarch64: Rename arm64/v8/ --> arm64/crypto/
Niels Möller [Tue, 2 Feb 2021 17:05:23 +0000 (18:05 +0100)]
aarch64: Use .arch armv8-a+crypto directive.
Niels Möller [Tue, 2 Feb 2021 16:59:39 +0000 (17:59 +0100)]
aarch64: Move m4 definitions after .file directive
Nicolas Mora [Mon, 1 Feb 2021 01:32:23 +0000 (20:32 -0500)]
Update doc for pbkdf2_hmac_sha384 and pbkdf2_hmac_sha512
Nicolas Mora [Mon, 1 Feb 2021 01:09:57 +0000 (20:09 -0500)]
Add tests for pbkdf2_hmac_sha384 and pbkdf2_hmac_sha512
Nicolas Mora [Mon, 1 Feb 2021 01:09:40 +0000 (20:09 -0500)]
Implement pbkdf2_hmac_sha384 and pbkdf2_hmac_sha512
Niels Möller [Sun, 31 Jan 2021 08:18:39 +0000 (09:18 +0100)]
ChangeLog entries for arm64 gcm_hash.
Maamoun TK [Sun, 31 Jan 2021 08:15:01 +0000 (09:15 +0100)]
arch64: Fix clang build
Maamoun TK [Sun, 31 Jan 2021 08:11:43 +0000 (09:11 +0100)]
arch64: Fix copyright line and typos
Michael Weiser [Mon, 25 Jan 2021 17:37:06 +0000 (18:37 +0100)]
aarch64: Adjust gcm-hash assembly for big-endian systems
Maamoun TK [Mon, 25 Jan 2021 17:36:54 +0000 (18:36 +0100)]
aarch64: Implement GHASH using the crypto extension pmul instructions.
Michael Weiser [Mon, 25 Jan 2021 18:05:47 +0000 (19:05 +0100)]
aarch64: Add README
Michael Weiser [Mon, 25 Jan 2021 17:38:20 +0000 (18:38 +0100)]
Add an empty machine.m64 to make configure happy
Niels Möller [Mon, 25 Jan 2021 21:40:01 +0000 (22:40 +0100)]
Delete the ARM Neon code doing a single block chacha.
Niels Möller [Mon, 25 Jan 2021 19:53:27 +0000 (20:53 +0100)]
Delete the ARM Neon code doing a single block salsa20.
Niels Möller [Wed, 20 Jan 2021 08:43:28 +0000 (09:43 +0100)]
Add testcase for ecc_ecdsa_verify with zero hash.
Niels Möller [Wed, 20 Jan 2021 08:40:19 +0000 (09:40 +0100)]
Fix ecc_ecdsa_verify corner case with all-zero hash.
Niels Möller [Wed, 20 Jan 2021 08:32:35 +0000 (09:32 +0100)]
Delete old misleading comment.
Michael Weiser [Fri, 25 Dec 2020 16:13:52 +0000 (17:13 +0100)]
arm: Unify neon asm for big- and little-endian modes
Switch arm neon assembler routines to endianness-agnostic loads and
stores where possible to avoid modifications to the rest of the code.
This involves switching to vld1.32 for loading consecutive 32-bit words
in host endianness as well as vst1.8 for storing back to memory in
little-endian order as required by the caller. Where necessary, r3 is
used to store the precalculated offset into the source vector for the
secondary load operations. vstm is kept for little-endian platforms
because it is faster than vst1 on most ARM implementations.
vst1.x (at least on the Allwinner A20 Cortex-A7 implementation) seems to
interfer with itself on subsequent calls, slowing it down further. So we
reschedule some instructions to do stores as soon as results become
available to have some other calculations or loads before the next
vst1.x. This reliably saves two additional cycles per block on salsa20
and chacha which would otherwise be incurred.
vld1.x does not seem to suffer from this or at least not to a level
where two consecutive vld1.x run slower than an equivalent vldm.
Rescheduling them similarly did not improve performance beyond that of
vldm.
Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
Niels Möller [Sun, 10 Jan 2021 19:39:49 +0000 (20:39 +0100)]
ppc: Fix use of __GLIBC_PREREQ in fat-ppc.c.
* fat-ppc.c: Don't use __GLIBC_PREREQ in the same preprocessor
conditional as defined(__GLIBC_PREREQ), but move to a nested #if
conditional. Fixes compile error on OpenBSD/powerpc64, reported by
Jasper Lievisse Adriaanse.
Niels Möller [Tue, 8 Dec 2020 16:51:46 +0000 (17:51 +0100)]
Recognize arm64 in configure
Niels Möller [Mon, 4 Jan 2021 15:41:08 +0000 (16:41 +0100)]
Note 3.7 release.
Niels Möller [Fri, 1 Jan 2021 16:37:46 +0000 (17:37 +0100)]
NEWS: Mention ARM big-endian breakage as a known issue.
Niels Möller [Mon, 28 Dec 2020 10:27:46 +0000 (11:27 +0100)]
gitlab-ci: Use --disable-assembler, for ubsan, asan and static analyzer tests.
Niels Möller [Mon, 28 Dec 2020 10:24:01 +0000 (11:24 +0100)]
Update NEWS file. Say that fat builds are now on by default.
Niels Möller [Sun, 27 Dec 2020 14:59:46 +0000 (15:59 +0100)]
Enable fat build by default.
Niels Möller [Sat, 26 Dec 2020 16:07:56 +0000 (17:07 +0100)]
News entries for Nettle-3.7.
Niels Möller [Sat, 26 Dec 2020 16:06:00 +0000 (17:06 +0100)]
Fix typo in old NEWS entry for Nettle-3.6.
Niels Möller [Sat, 26 Dec 2020 15:56:33 +0000 (16:56 +0100)]
Distribute the README files in assembly directories.
Niels Möller [Sat, 26 Dec 2020 15:50:34 +0000 (16:50 +0100)]
Increase version numbers, for Nettle-3.7.
* configure.ac: Bump package version, to 3.7.
(LIBNETTLE_MINOR): Bump minor number, to 8.1.
(LIBHOGWEED_MINOR): Bump minor number, to 6.1.
Niels Möller [Mon, 21 Dec 2020 19:41:02 +0000 (20:41 +0100)]
arm: Fix comment typo
Spotted by Michael Weiser
Niels Möller [Mon, 21 Dec 2020 19:40:21 +0000 (20:40 +0100)]
ChangeLog entry for previous fat ppc fix.
Niels Möller [Mon, 21 Dec 2020 16:21:30 +0000 (17:21 +0100)]
Merge branch 'undefined' into 'master'
[PowerPC64] Skip using getauxval() when it is not available
See merge request nettle/nettle!16
Maamoun TK [Mon, 21 Dec 2020 15:00:23 +0000 (16:00 +0100)]
combine preprocessor directives to reduce nesting of conditions in fat-ppc.c
Maamoun TK [Sun, 20 Dec 2020 17:03:11 +0000 (18:03 +0100)]
[PowerPC64] Skip using getauxval() when it is not available
Niels Möller [Sat, 19 Dec 2020 09:04:32 +0000 (10:04 +0100)]
Merge branch 'ppc-got-32bit' into 'master'
[PowerPC64] Use 32-bit offset to load data
See merge request nettle/nettle!14
mamonet [Fri, 18 Dec 2020 15:38:39 +0000 (17:38 +0200)]
[PowerPC64] Use 32-bit offset to load data
Niels Möller [Sat, 12 Dec 2020 15:46:51 +0000 (16:46 +0100)]
ppc: More interleaving of chacha_4core.
Niels Möller [Tue, 8 Dec 2020 19:10:15 +0000 (20:10 +0100)]
Merge branch 'ppc-chacha-4core'
Niels Möller [Tue, 1 Dec 2020 20:24:39 +0000 (21:24 +0100)]
Fix comment type
Niels Möller [Tue, 1 Dec 2020 17:47:38 +0000 (18:47 +0100)]
ppc: Save registers below stack pointer, without modifying it.
Niels Möller [Tue, 1 Dec 2020 17:07:21 +0000 (18:07 +0100)]
ppc: Optimize chacha_4core main loop
* powerpc64/p7/chacha-4core.asm (QR): Instruction level
interleaving in the main loop, written by Torbjörn Granlund.
Niels Möller [Mon, 30 Nov 2020 20:21:42 +0000 (21:21 +0100)]
ppc: Workaround using m4_unquote.
Niels Möller [Mon, 30 Nov 2020 20:20:42 +0000 (21:20 +0100)]
m4: New macro m4_unquote
Niels Möller [Mon, 30 Nov 2020 19:23:01 +0000 (20:23 +0100)]
ppc: Add byte-swapping to chacha_4core, for big-endian builds.
Niels Möller [Mon, 30 Nov 2020 19:05:31 +0000 (20:05 +0100)]
Delete _nettle_chacha_crypt_2core and _nettle_chacha_crypt32_2core.
Niels Möller [Mon, 30 Nov 2020 18:54:10 +0000 (19:54 +0100)]
ppc: New assembly for chacha_core4, doing four blocks in parallel.
* chacha-crypt.c: (_nettle_chacha_crypt_4core)
(_nettle_chacha_crypt32_4core): New functions.
* chacha-internal.h: Add prototypes for _nettle_chacha_4core and
related functions.
* configure.ac (asm_nettle_optional_list): Add chacha-4core.asm.
* powerpc64/fat/chacha-4core.asm: New file.
* powerpc64/p7/chacha-4core.asm: New file.
* fat-ppc.c (fat_init): When altivec is available, use
_nettle_chacha_crypt_4core and _nettle_chacha_crypt32_4core
instead of _2core variants.
Niels Möller [Sat, 28 Nov 2020 21:12:45 +0000 (22:12 +0100)]
Fix a ChangeLog typo.
Niels Möller [Mon, 30 Nov 2020 15:23:08 +0000 (16:23 +0100)]
Add missing forward declaration.
Niels Möller [Mon, 30 Nov 2020 15:18:00 +0000 (16:18 +0100)]
Fix counter bug in _chacha_crypt32_3core.
Niels Möller [Mon, 30 Nov 2020 14:11:47 +0000 (15:11 +0100)]
Delete name mangling of internal umac symbols
Niels Möller [Mon, 30 Nov 2020 14:03:20 +0000 (15:03 +0100)]
Delete name mangling of internal sha3 symbols
Niels Möller [Mon, 30 Nov 2020 13:55:06 +0000 (14:55 +0100)]
Delete name mangling of internal salsa20 symbols
Niels Möller [Mon, 30 Nov 2020 13:49:17 +0000 (14:49 +0100)]
Delete name mangling of internal poly1305 symbols