]> git.ipfire.org Git - thirdparty/nettle.git/log
thirdparty/nettle.git
13 months agopowerpc64: Add optimized assembly for sha256-compress-n ppc64-sha256
Eric Richter [Tue, 4 Jun 2024 20:55:26 +0000 (15:55 -0500)] 
powerpc64: Add optimized assembly for sha256-compress-n

This patch introduces an optimized powerpc64 assembly implementation for
sha256-compress-n. This takes advantage of the vshasigma instruction, as
well as unrolling loops to best take advantage of running instructions
in parallel.

The following data was captured on a POWER 10 LPAR @ ~3.896GHz

Current C implementation:
         Algorithm         mode Mbyte/s
            sha256       update  280.97
       hmac-sha256     64 bytes   80.81
       hmac-sha256    256 bytes  170.50
       hmac-sha256   1024 bytes  241.92
       hmac-sha256   4096 bytes  268.54
       hmac-sha256   single msg  276.16

With optimized assembly:
         Algorithm         mode Mbyte/s
            sha256       update  461.45
       hmac-sha256     64 bytes  123.88
       hmac-sha256    256 bytes  268.81
       hmac-sha256   1024 bytes  390.91
       hmac-sha256   4096 bytes  438.02
       hmac-sha256   single msg  453.83

Signed-off-by: Eric Richter <erichte@linux.ibm.com>
13 months agoAvoid warnings for assert_maybe.
Niels Möller [Sun, 9 Jun 2024 09:48:37 +0000 (11:48 +0200)] 
Avoid warnings for assert_maybe.

13 months agoUpdate config.guess and config.sub to 2024-01-01 versions.
Niels Möller [Wed, 5 Jun 2024 20:10:00 +0000 (22:10 +0200)] 
Update config.guess and config.sub to 2024-01-01 versions.

13 months agoUpdate version numbers for nettle-3.10.
Niels Möller [Sun, 2 Jun 2024 12:06:48 +0000 (14:06 +0200)] 
Update version numbers for nettle-3.10.

13 months agoUnify handing of message hash for dsa and ecdsa, using mpn interface.
Niels Möller [Sat, 1 Jun 2024 16:26:56 +0000 (18:26 +0200)] 
Unify handing of message hash for dsa and ecdsa, using mpn interface.

13 months agoUse NETTLE_OCTET_SIZE_TO_LIMB_SIZE macro.
Niels Möller [Sat, 1 Jun 2024 16:21:57 +0000 (18:21 +0200)] 
Use NETTLE_OCTET_SIZE_TO_LIMB_SIZE macro.

14 months agoci: Update .gitlab-ci.yml job tags.
Niels Möller [Mon, 20 May 2024 18:32:00 +0000 (20:32 +0200)] 
ci: Update .gitlab-ci.yml job tags.

See
https://docs.gitlab.com/ee/update/deprecations.html#removal-of-tags-from-small-saas-runners-on-linux,
and corresponding gnutls update
https://gitlab.com/gnutls/gnutls/-/commit/642c39ba9ae53ce427344d884eb3808f042b90e4.

14 months agoppc64: Reduce register usage in gcm-aes assembly.
Niels Möller [Wed, 15 May 2024 09:06:11 +0000 (11:06 +0200)] 
ppc64: Reduce register usage in gcm-aes assembly.

14 months agoMore NEWS entries for nettle-3.10.
Niels Möller [Wed, 15 May 2024 08:06:08 +0000 (10:06 +0200)] 
More NEWS entries for nettle-3.10.

14 months agoSpelling fix.
Niels Möller [Wed, 15 May 2024 07:53:09 +0000 (09:53 +0200)] 
Spelling fix.

15 months agoUpdate of AUTHORS file.
Niels Möller [Sat, 20 Apr 2024 08:18:10 +0000 (10:18 +0200)] 
Update of AUTHORS file.

15 months agoMerge branch 'ppc64-gcm-aes-rebased'
Niels Möller [Sat, 20 Apr 2024 08:03:22 +0000 (10:03 +0200)] 
Merge branch 'ppc64-gcm-aes-rebased'

15 months agoChangeLog entries for ppc64 gcm-aes. ppc64-gcm-aes-rebased
Niels Möller [Sun, 14 Apr 2024 08:33:52 +0000 (10:33 +0200)] 
ChangeLog entries for ppc64 gcm-aes.

15 months agoUpdate copyright headers.
Niels Möller [Sun, 14 Apr 2024 08:18:21 +0000 (10:18 +0200)] 
Update copyright headers.

15 months agoFix filenames in two ecc-curve25519-modp.asm files.
Niels Möller [Sun, 14 Apr 2024 08:12:46 +0000 (10:12 +0200)] 
Fix filenames in two ecc-curve25519-modp.asm files.

15 months agoUpdate documentation for SHAKE.
Daiki Ueno [Sun, 14 Apr 2024 01:36:17 +0000 (21:36 -0400)] 
Update documentation for SHAKE.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
15 months agoppc64: Fix big-endian case of byte swapping for gcm-aes.
Niels Möller [Sat, 13 Apr 2024 09:08:35 +0000 (11:08 +0200)] 
ppc64: Fix big-endian case of byte swapping for gcm-aes.

15 months agoFix counter update, with proper 32-bit wraparound.
Niels Möller [Sun, 24 Mar 2024 16:30:07 +0000 (17:30 +0100)] 
Fix counter update, with proper 32-bit wraparound.

15 months agoRework no-op version of _gcm_aes_encrypt and _gcm_aes_decrypt.
Niels Möller [Fri, 15 Mar 2024 20:30:25 +0000 (21:30 +0100)] 
Rework no-op version of _gcm_aes_encrypt and _gcm_aes_decrypt.

For fat builds, move definition to fat-ppc.c. For builds where the
functions are unavailable, define as macros returning zero, and rely
on the compiler to eliminate the code that uses the return value.

15 months agoppc64: Use new gcm-aes assembly in non-fat builds with --enable-power-crypto-ext.
Niels Möller [Fri, 15 Mar 2024 20:19:53 +0000 (21:19 +0100)] 
ppc64: Use new gcm-aes assembly in non-fat builds with --enable-power-crypto-ext.

15 months agoAdd gcm-internal.h, declaring _gcm_aes_encrypt and _gcm_aes_decrypt.
Niels Möller [Thu, 14 Mar 2024 20:29:50 +0000 (21:29 +0100)] 
Add gcm-internal.h, declaring _gcm_aes_encrypt and _gcm_aes_decrypt.

Change type of the rounds argument from size_t to unsigned.

15 months agoppc64: New "stitched" implementation of GCM-AES.
Danny Tsen [Wed, 6 Mar 2024 20:10:00 +0000 (21:10 +0100)] 
ppc64: New "stitched" implementation of GCM-AES.

16 months agoMerge branch 'sha3-shake-updates'
Niels Möller [Sun, 31 Mar 2024 05:43:05 +0000 (07:43 +0200)] 
Merge branch 'sha3-shake-updates'

16 months agoLet umac and bcrypt share bswap helper function.
Niels Möller [Fri, 29 Mar 2024 15:04:09 +0000 (16:04 +0100)] 
Let umac and bcrypt share bswap helper function.

16 months agoAdd sha512_224 and sha512_256 to nettle_hashes.
Niels Möller [Wed, 13 Mar 2024 08:33:37 +0000 (09:33 +0100)] 
Add sha512_224 and sha512_256 to nettle_hashes.

16 months agoChangeLog entries for shake128. sha3-shake-updates
Niels Möller [Thu, 28 Mar 2024 19:16:15 +0000 (20:16 +0100)] 
ChangeLog entries for shake128.

16 months agotestsuite/Makefile.in (TS_NETTLE_SOURCES): Add shake128-test.c.
Niels Möller [Thu, 28 Mar 2024 19:15:14 +0000 (20:15 +0100)] 
testsuite/Makefile.in (TS_NETTLE_SOURCES): Add shake128-test.c.

16 months agoAdd missing include of string.h.
Niels Möller [Thu, 28 Mar 2024 19:14:51 +0000 (20:14 +0100)] 
Add missing include of string.h.

16 months agoMerge branch 'wip/dueno/shake128' into 'sha3-shake-updates'
Niels Möller [Thu, 28 Mar 2024 19:05:52 +0000 (19:05 +0000)] 
Merge branch 'wip/dueno/shake128' into 'sha3-shake-updates'

Implement SHAKE128

See merge request nettle/nettle!63

16 months agoImplement SHAKE128
Daiki Ueno [Thu, 28 Mar 2024 11:45:15 +0000 (20:45 +0900)] 
Implement SHAKE128

Signed-off-by: Daiki Ueno <dueno@redhat.com>
16 months agosha3-shake: Don't hard-code block size
Daiki Ueno [Thu, 28 Mar 2024 11:19:02 +0000 (20:19 +0900)] 
sha3-shake: Don't hard-code block size

Signed-off-by: Daiki Ueno <dueno@redhat.com>
16 months agoAdd another test for GCM counter wrap around, with larger message
Niels Möller [Sun, 24 Mar 2024 15:15:05 +0000 (16:15 +0100)] 
Add another test for GCM counter wrap around, with larger message

16 months agoUse one's complement of index to indicate shake is initialized.
Niels Möller [Sun, 24 Mar 2024 13:18:01 +0000 (14:18 +0100)] 
Use one's complement of index to indicate shake is initialized.

16 months agoGeneralize shake functions, and move to sha3-shake.c.
Niels Möller [Sun, 24 Mar 2024 13:10:23 +0000 (14:10 +0100)] 
Generalize shake functions, and move to sha3-shake.c.

16 months agoAdd assert in _nettle_sha3_update.
Niels Möller [Sun, 24 Mar 2024 12:50:54 +0000 (13:50 +0100)] 
Add assert in _nettle_sha3_update.

16 months agoMake shake256 call sha3_permute before, not after, generating output.
Niels Möller [Sun, 24 Mar 2024 12:32:48 +0000 (13:32 +0100)] 
Make shake256 call sha3_permute before, not after, generating output.

16 months agoSimplify _nettle_sha3_update by using MD_FILL_OR_RETURN_INDEX.
Niels Möller [Sun, 24 Mar 2024 12:18:37 +0000 (13:18 +0100)] 
Simplify _nettle_sha3_update by using MD_FILL_OR_RETURN_INDEX.

16 months agoAdd test for GCM counter wrap around.
Niels Möller [Wed, 20 Mar 2024 09:18:42 +0000 (10:18 +0100)] 
Add test for GCM counter wrap around.

16 months agoUpdate of powerpc64/README.
Niels Möller [Wed, 20 Mar 2024 08:38:43 +0000 (09:38 +0100)] 
Update of powerpc64/README.

16 months agoChangeLog for sha3_256_shake_output. add-sha3_256_shake_output
Niels Möller [Wed, 13 Mar 2024 17:19:30 +0000 (18:19 +0100)] 
ChangeLog for sha3_256_shake_output.

16 months agoAdditional API for SHAKE streaming read.
Daiki Ueno [Mon, 11 Mar 2024 00:22:18 +0000 (20:22 -0400)] 
Additional API for SHAKE streaming read.

This adds an alternative function sha3_256_shake_output in the
SHAKE256 support, which enables to read output multiple times in an
incremental manner.

Signed-off-by: Daiki Ueno <dueno@redhat.com>
16 months agoTest aead update function with data split in pieces.
Niels Möller [Sun, 10 Mar 2024 11:51:28 +0000 (12:51 +0100)] 
Test aead update function with data split in pieces.

Fix ubsan issue affecting calls to _nettle_poly1305_update with input
0, NULL.

16 months agoFix ubsan issue in hash update functions.
Niels Möller [Fri, 8 Mar 2024 16:52:51 +0000 (17:52 +0100)] 
Fix ubsan issue in hash update functions.

17 months agoSkip sc-rsa-oaep-encrypt-test when compiled with mini-gmp.
Daiki Ueno [Sun, 18 Feb 2024 20:00:17 +0000 (21:00 +0100)] 
Skip sc-rsa-oaep-encrypt-test when compiled with mini-gmp.

17 months agoChangeLog entries for RSA OAEP functions.
Niels Möller [Fri, 16 Feb 2024 15:49:46 +0000 (16:49 +0100)] 
ChangeLog entries for RSA OAEP functions.

17 months agoClarify message length limitation in RSA-OAEP
Daiki Ueno [Fri, 16 Feb 2024 06:14:14 +0000 (01:14 -0500)] 
Clarify message length limitation in RSA-OAEP

Signed-off-by: Daiki Ueno <dueno@redhat.com>
17 months agoMerge branch 'wip/dueno/rsa-oaep' into 'master'
Niels Möller [Thu, 15 Feb 2024 19:16:44 +0000 (19:16 +0000)] 
Merge branch 'wip/dueno/rsa-oaep' into 'master'

Implement RSA-OAEP encryption/decryption

See merge request nettle/nettle!60

17 months agoImplement encryption/decryption RSA-OAEP
Nicolas Mora [Fri, 12 Feb 2021 18:59:41 +0000 (13:59 -0500)] 
Implement encryption/decryption RSA-OAEP

Modified-by: Daiki Ueno <dueno@redhat.com>
17 months agoChangeLog entries for powerpc64 aes decrypt changes. ppc64-aes-invert
Niels Möller [Fri, 2 Feb 2024 19:13:08 +0000 (20:13 +0100)] 
ChangeLog entries for powerpc64 aes decrypt changes.

18 months agoppc64: Add a nop _aes_invert, to get decrypt subkeys compatible with vncipher.
Niels Möller [Tue, 30 Jan 2024 17:43:33 +0000 (18:43 +0100)] 
ppc64: Add a nop _aes_invert, to get decrypt subkeys compatible with vncipher.

18 months agoMerge branch 'aes-noreverse-decrypt-subkeys' into master
Niels Möller [Mon, 29 Jan 2024 16:56:27 +0000 (17:56 +0100)] 
Merge branch 'aes-noreverse-decrypt-subkeys' into master

18 months agoppc64: Improve register usage for aes code.
Niels Möller [Sun, 28 Jan 2024 16:11:48 +0000 (17:11 +0100)] 
ppc64: Improve register usage for aes code.

18 months agoChangeLog updates for aes decrypt refactoring. aes-noreverse-decrypt-subkeys
Niels Möller [Sat, 27 Jan 2024 13:32:57 +0000 (14:32 +0100)] 
ChangeLog updates for aes decrypt refactoring.

18 months agoUpdate arm64 aes decrypt.
Niels Möller [Thu, 25 Jan 2024 20:27:18 +0000 (21:27 +0100)] 
Update arm64 aes decrypt.

18 months agoUpdate powerpc64 aes decrypt.
Niels Möller [Thu, 25 Jan 2024 20:10:01 +0000 (21:10 +0100)] 
Update powerpc64 aes decrypt.

18 months agoUpdate arm (32-bit) aes decrypt.
Niels Möller [Thu, 25 Jan 2024 20:02:26 +0000 (21:02 +0100)] 
Update arm (32-bit) aes decrypt.

18 months agoChange _nettle_aes_decrypt to pass pointer to last subkey.
Niels Möller [Thu, 25 Jan 2024 19:36:28 +0000 (20:36 +0100)] 
Change _nettle_aes_decrypt to pass pointer to last subkey.

18 months agoUpdate x86 (32-bit) aes decrypt.
Niels Möller [Thu, 25 Jan 2024 19:05:52 +0000 (20:05 +0100)] 
Update x86 (32-bit) aes decrypt.

18 months agoUpdate sparc64 aes decrypt.
Niels Möller [Thu, 25 Jan 2024 18:31:06 +0000 (19:31 +0100)] 
Update sparc64 aes decrypt.

18 months agoChange order of aes decryption subkeys, update C and x86_64 implementations.
Niels Möller [Sun, 21 Jan 2024 18:02:26 +0000 (19:02 +0100)] 
Change order of aes decryption subkeys, update C and x86_64 implementations.

18 months agoMerge branch 'delete-sparc32' into master
Niels Möller [Fri, 26 Jan 2024 20:06:06 +0000 (21:06 +0100)] 
Merge branch 'delete-sparc32' into master

18 months agoDelete sparc32 assembly files. delete-sparc32
Niels Möller [Wed, 24 Jan 2024 09:51:10 +0000 (10:51 +0100)] 
Delete sparc32 assembly files.

18 months agoci: Add sparc64 cross build. ci-sparc64
Niels Möller [Wed, 24 Jan 2024 09:54:27 +0000 (10:54 +0100)] 
ci: Add sparc64 cross build.

18 months agoChangeLog entry for previous changes.
Niels Möller [Tue, 23 Jan 2024 19:43:02 +0000 (20:43 +0100)] 
ChangeLog entry for previous changes.

18 months agoUnify load/store indexing. ppc-ghash-macros
Niels Möller [Sun, 21 Jan 2024 14:59:50 +0000 (15:59 +0100)] 
Unify load/store indexing.

18 months agoTrim number of used registers
Niels Möller [Sun, 21 Jan 2024 14:49:53 +0000 (15:49 +0100)] 
Trim number of used registers

18 months agoImprove scheduling
Niels Möller [Sun, 21 Jan 2024 14:11:26 +0000 (15:11 +0100)] 
Improve scheduling

18 months agoNew macros GHASH_REDUCE.
Niels Möller [Sun, 21 Jan 2024 13:59:02 +0000 (14:59 +0100)] 
New macros GHASH_REDUCE.

18 months agopowerpc64: Use m4 to generate instruction sequences for aes.
Niels Möller [Sun, 21 Jan 2024 09:37:03 +0000 (10:37 +0100)] 
powerpc64: Use m4 to generate instruction sequences for aes.

19 months agoAdditional GCM test case.
Danny Tsen [Wed, 27 Dec 2023 18:57:11 +0000 (19:57 +0100)] 
Additional GCM test case.

19 months agoDelete all md5 assembly code. delete-md5-asm
Niels Möller [Thu, 11 Aug 2022 09:04:20 +0000 (11:04 +0200)] 
Delete all md5 assembly code.

19 months agoFix syntax for @deftypefun in many places.
Niels Möller [Fri, 8 Dec 2023 16:59:26 +0000 (17:59 +0100)] 
Fix syntax for @deftypefun in many places.

19 months agoMore accurate openssl configure test.
Niels Möller [Fri, 8 Dec 2023 16:27:42 +0000 (17:27 +0100)] 
More accurate openssl configure test.

19 months agoFix include guard for non-nettle.h.
Niels Möller [Fri, 8 Dec 2023 15:51:39 +0000 (16:51 +0100)] 
Fix include guard for non-nettle.h.

19 months agoNew helper function drbg_ctr_aes256_output. add-drbg-ctr-aes256
Niels Möller [Wed, 6 Dec 2023 09:45:25 +0000 (10:45 +0100)] 
New helper function drbg_ctr_aes256_output.

19 months agoUse nettle_block16 for drbg-ctr state.
Niels Möller [Wed, 6 Dec 2023 08:56:14 +0000 (09:56 +0100)] 
Use nettle_block16 for drbg-ctr state.

19 months agoChangeLog entries for drbg-ctr.
Niels Möller [Wed, 6 Dec 2023 08:37:44 +0000 (09:37 +0100)] 
ChangeLog entries for drbg-ctr.

19 months agoFix testsuite/Makefile.
Niels Möller [Wed, 6 Dec 2023 07:59:52 +0000 (08:59 +0100)] 
Fix testsuite/Makefile.

19 months agoAdd DRBG-CTR-AES256.
Simon Josefsson [Wed, 10 May 2023 08:28:29 +0000 (10:28 +0200)] 
Add DRBG-CTR-AES256.

19 months agoCPU feature detection for Apple M1 devices.
Tim Kosse [Tue, 5 Dec 2023 20:19:16 +0000 (21:19 +0100)] 
CPU feature detection for Apple M1 devices.

19 months agoExtend openssl configure tests to check for relevant headers and functions. update-openssl-bench
Niels Möller [Tue, 5 Dec 2023 19:52:33 +0000 (20:52 +0100)] 
Extend openssl configure tests to check for relevant headers and functions.

19 months agoDelete nettle_openssl_init.
Niels Möller [Tue, 5 Dec 2023 19:25:22 +0000 (20:25 +0100)] 
Delete nettle_openssl_init.

19 months agoDelete benchmarking of openssl blowfish, cast128 and des.
Niels Möller [Mon, 4 Dec 2023 20:18:07 +0000 (21:18 +0100)] 
Delete benchmarking of openssl blowfish, cast128 and des.

19 months agoChangeLog for previous changes.
Niels Möller [Mon, 4 Dec 2023 20:15:32 +0000 (21:15 +0100)] 
ChangeLog for previous changes.

19 months agoUnify openssl signing benchmarks.
Niels Möller [Mon, 4 Dec 2023 19:27:08 +0000 (20:27 +0100)] 
Unify openssl signing benchmarks.

19 months agoUpdate openssl ecdsa benchmark to use evp interfaces.
Niels Möller [Mon, 4 Dec 2023 17:28:57 +0000 (18:28 +0100)] 
Update openssl ecdsa benchmark to use evp interfaces.

19 months agoUpdate openssl rsa benchmark to use evp interfaces.
Niels Möller [Sun, 3 Dec 2023 19:51:24 +0000 (20:51 +0100)] 
Update openssl rsa benchmark to use evp interfaces.

20 months agoUpdate testsuite and example Makefiles. split-nettle-internal
Niels Möller [Thu, 23 Nov 2023 20:29:48 +0000 (21:29 +0100)] 
Update testsuite and example Makefiles.

20 months agoSplit nettle-internal into nettle-internal and non-nettle.
Niels Möller [Thu, 23 Nov 2023 18:57:18 +0000 (19:57 +0100)] 
Split nettle-internal into nettle-internal and non-nettle.

20 months agoRevert part of 67aae9d2873bb56a7e7028709d2f2d4bd8897955.
Niels Möller [Wed, 22 Nov 2023 13:04:11 +0000 (14:04 +0100)] 
Revert part of 67aae9d2873bb56a7e7028709d2f2d4bd8897955.

* rsa-sec-decrypt.c (rsa_sec_decrypt): Merge with
_rsa_sec_decrypt, including input range check.
(_rsa_sec_decrypt): Deleted.
* rsa-internal.h (_rsa_sec_decrypt): Delete declaration.
* testsuite/rsa-sec-decrypt-test.c (rsa_decrypt_for_test): Always
call rsa_sec_decrypt, but don't annotate the ciphertext input as
undefined/secret.

20 months agoAdd sidechannel tests for ed25519 and ed448.
Niels Möller [Wed, 15 Nov 2023 11:59:07 +0000 (12:59 +0100)] 
Add sidechannel tests for ed25519 and ed448.

20 months agoAdd sidechannel tests for curve448.
Niels Möller [Wed, 15 Nov 2023 07:16:10 +0000 (08:16 +0100)] 
Add sidechannel tests for curve448.

20 months agoAdd sidechannel tests for curve25519.
Niels Möller [Wed, 15 Nov 2023 06:59:50 +0000 (07:59 +0100)] 
Add sidechannel tests for curve25519.

20 months agoci: Add build with --enable-extra-asserts.
Niels Möller [Tue, 14 Nov 2023 20:29:56 +0000 (21:29 +0100)] 
ci: Add build with --enable-extra-asserts.

20 months agoWorkaround for assert_maybe to not trigger clang analyzer warnings.
Niels Möller [Tue, 14 Nov 2023 20:08:38 +0000 (21:08 +0100)] 
Workaround for assert_maybe to not trigger clang analyzer warnings.

20 months agoFixes for ecdsa-sign-test in noasm and mini-gmp builds.
Niels Möller [Tue, 14 Nov 2023 19:40:29 +0000 (20:40 +0100)] 
Fixes for ecdsa-sign-test in noasm and mini-gmp builds.

20 months agoAdd side-channel test for ecdsa-sign-test.
Niels Möller [Tue, 14 Nov 2023 18:54:18 +0000 (19:54 +0100)] 
Add side-channel test for ecdsa-sign-test.

20 months agoFix is_zero_limb to work with in c89 and mini-gmp builds. sc-is_zero
Niels Möller [Sun, 12 Nov 2023 12:59:37 +0000 (13:59 +0100)] 
Fix is_zero_limb to work with in c89 and mini-gmp builds.

20 months agoImprove side-channel silence when comparing values to zero.
Niels Möller [Mon, 6 Nov 2023 18:15:22 +0000 (19:15 +0100)] 
Improve side-channel silence when comparing values to zero.

21 months agoMerge branch 'side-channel-tests'
Niels Möller [Fri, 6 Oct 2023 14:39:42 +0000 (16:39 +0200)] 
Merge branch 'side-channel-tests'