Commit Graph
2118 Commits
Author SHA1 Message Date
Frank Denis 6702f69bef Fix compilation with GCC on aarch64
Use unsigned NEON intrinsics everywhere

Fixes #1502
2026-01-07 10:57:10 +01:00
Frank Denis 52975b38ce Add ARM acceleration for SHA3 2026-01-06 23:18:21 +01:00
Frank Denis c89ee84172 Add fences 2026-01-06 23:09:21 +01:00
Frank Denis 04199cec53 Relax alignment of SHAKE states 2026-01-06 23:04:21 +01:00
Frank Denis 8a7378460f Add crypto_core_keccak1600_state, remove keccak1600_STATEBYTES 2026-01-06 23:00:21 +01:00
Frank Denis 4a1ff8bf03 Add defensive NULL guard in escrypt_r 2026-01-05 23:52:01 +01:00
Frank Denis 5aff9f2d89 Rename parameters to improve clarity 2026-01-05 23:12:32 +01:00
Frank Denis 5766a9acd3 Change sodium_ip2bin to take the ip length 2026-01-05 23:09:32 +01:00
Frank Denis cb14819555 Remove unnecessary checks 2026-01-03 19:29:05 +01:00
Frank Denis cd87a345f6 Remove unused variable 2026-01-03 19:01:21 +01:00
Frank Denis 739317765c Sync prototypes 2026-01-03 17:25:02 +01:00
Frank Denis 818e89fcb5 Remove unused constants 2026-01-03 17:24:58 +01:00
Frank Denis 3d7e6563d1 Remove unnecessary multiplication
To make the check projective‑invariant.
2026-01-02 12:00:59 +01:00
Frank Denis f2e34a80d3 ge25519_has_small_order: remove the inversion
Re-express the affine checks in projective form to avoid the inversion.

Based on a suggestion from @Sc00bz in
https://github.com/jedisct1/libsodium/discussions/1500 -- Thanks!
2026-01-01 23:00:57 +01:00
Frank Denis e6a7bc2df4 Rename ip2bytes and bytes2ip to ip2bin and bin2ip for consistency 2025-12-31 12:35:41 +01:00
Frank Denis 20452e34d5 Add test for IP conversion functions 2025-12-31 12:23:39 +01:00
Frank Denis 776ec1d92c Add sodium_ip2bytes, sodium_bytes2ip 2025-12-31 12:10:12 +01:00
Frank Denis c61b078902 MSVC doesn't allow direct C-style casts between NEON vector types
Replace (int8x16_t) with vreinterpretq intrinsics
2025-12-30 22:23:36 +01:00
Frank Denis f278403874 Use a specialized shuffle macro and avoid non-portable builtins 2025-12-30 21:43:48 +01:00
Frank Denis e601a273f5 Use AES_{DEC,ENC}LAST in ipcrypt_soft 2025-12-30 12:05:08 +01:00
Frank Denis 06b64190b7 Add softaes encryptlast/decryptlast 2025-12-30 12:01:40 +01:00
Frank Denis 93d8f8eefe Using _mm_add_epi8(a, a) is cleaner than the shift+mask 2025-12-30 09:52:00 +01:00
Frank Denis 53f73b51e4 Align Intel version of pfx_shift_left with the ARM/soft impls 2025-12-30 09:47:48 +01:00
Frank Denis 4f498b72d4 Format 2025-12-30 01:37:16 +01:00
Frank Denis ab8a8a1ee6 Add PFX variant 2025-12-30 01:35:44 +01:00
Frank Denis 04919d35d0 ipcrypt-nd: correct soft implementation of tweak_expand 2025-12-30 00:56:50 +01:00
Frank Denis 32f787a79b SHAKE: a custom domain byte may have its MSB set, so xor the padding 2025-12-30 00:25:39 +01:00
Frank Denis 8c84e36514 Use consistent names for ipcrypt array lengths 2025-12-29 23:13:17 +01:00
Frank Denis ad3004ec87 core_ed25519_is_valid_point: check Y==Z in addition to X==0 2025-12-29 22:09:31 +01:00
Frank Denis d548cce874 Refer to the correct header 2025-12-29 16:08:36 +01:00
Frank Denis 435631b1c3 Fix typos 2025-12-29 16:08:36 +01:00
Frank Denis 68acec3883 Format 2025-12-29 16:08:36 +01:00
Frank Denis fc79c5d6b2 Remove crypto_core_ed25519_from_uniform 2025-12-29 16:08:36 +01:00
Frank Denis 1ee565283d That useless function will be removed 2025-12-29 23:00:17 +01:00
Frank Denis 07b2b42713 sha3: permute at rate boundary
Not triggered in this context, but correctness doesn't hurt
2025-12-09 01:59:02 +01:00
Frank Denis 1b95172b82 Add ML-KEM768 2025-12-09 01:00:51 +01:00
Frank Denis 5357d3c6cf nsec isn't used 2025-12-08 15:59:11 +01:00
Frank Denis 468646cef2 MSVC compat 2025-12-08 15:35:40 +01:00
Frank Denis d1f92fc5b7 dynamic -> static 2025-12-08 15:33:35 +01:00
Frank Denis 70e453b870 MSVC compat 2025-12-08 15:25:15 +01:00
Frank Denis 22f9b38d39 Import ipcrypt 2025-12-08 23:15:08 +01:00
Frank Denis be8e2275ca Add ipcrypt support 2025-12-08 23:08:08 +01:00
Frank Denis 0f60c6e0f4 Expand softaes 2025-12-08 23:00:08 +01:00
Frank Denis 6a892675bc SHAKE: if the rate is exactly full, process that block before padding 2025-11-26 23:00:42 +01:00
Frank Denis 37e4f5860b SHAKE: align default separator and test vectors with Zig
And remove redundant macros
2025-11-18 12:10:59 +01:00
Frank Denis ca3acebf8f XOF: don't absorb/squeeze bytes one by one 2025-11-18 11:46:34 +01:00
Frank Denis 7c70a2807e XOF: use size_t internally, unsigned long long externally 2025-11-18 12:07:59 +01:00
Frank Denis d11e907107 Remove crypto_xof_*_final 2025-11-18 12:00:59 +01:00
Frank Denis 0a9450c679 Add SHAKE and TurboSHAKE 2025-10-18 11:31:29 +02:00
Frank Denis 09e995c0c8 Relax ((nonnull)) attributes where applicable
Reported by @stef -- Thanks!

Fixes #1477
2025-09-12 23:07:20 +02:00