Commit Graph
2147 Commits
Author SHA1 Message Date
Frank Denis 35dad2e7b5 Add a couple sodium_memzero 2026-03-08 14:49:53 +01:00
Frank Denis af0dd1b4ac Indent 2026-02-20 23:27:12 +01:00
Frank Denis 38a82863f1 crypto_core_*_from_string: drop the _ro suffix 2026-02-20 23:23:12 +01:00
Frank Denis 8bb79ae24d Rename crypto_core_*_from_string to crypto_core_*_from_string_nu
RO should be the default
2026-02-20 23:19:12 +01:00
Frank Denis 44cf631d04 Add argon2_fill_segment_neon to the quirks 2026-02-20 23:12:12 +01:00
Frank Denis 530252d9a3 Add crypto_core_ed25519_scalar_from_string 2026-02-20 23:06:12 +01:00
Frank Denis babd0c3e59 Remove crypto_core_ristretto255_from_string 2026-02-20 12:05:55 +01:00
Frank Denis ed661cd1fc More fixes for MSVC/aarch64 2026-02-10 23:05:40 +01:00
Frank Denis e4575f45e2 Add casts for aarch64+gcc 2026-02-10 23:00:40 +01:00
Frank Denis f6e26ce153 Try to enable aes256-gcm even on non-clang compilers 2026-02-10 08:56:52 +01:00
Frank Denis e8492b1859 Zero the state afetr AES decryption 2026-02-05 21:42:03 +01:00
Frank Denis 69435b04fe SHAKE: in case update is called right after squeezing, permute
Calling update after squeezing is undocumented and non standard,
but if an application still decides to do it, permute the state
before absorbing so that it's still safe to do so.

We can easily do it since we keep track of the state.

Still return an error as this is not the expected usage of SHAKE,
and zeroing the state is another thing we could do.
2026-02-05 23:08:48 +01:00
Frank Denis 012bab9616 Zeroize a few things after use 2026-02-05 23:01:48 +01:00
Frank Denis 3e4de8a134 Change crypto_core_ed25519_from_string to take a binary string 2026-01-23 23:07:00 +01:00
Frank Denis 54cd5d0ae9 Add hardware acceleration for SHA256 on aarch64 2026-01-23 23:01:00 +01:00
Frank Denis 9561aea8e5 Add NEON optimizations for Argon2 2026-01-22 12:00:49 +01:00
Frank Denis b36e407fe5 Add WASM SIMD implementations of Argon2 2026-01-22 12:00:49 +01:00
Frank Denis 15e6dad043 Just use sodium_memcmp 2026-01-15 23:30:59 +01:00
Frank Denis 557dc9e51d Add a high-level crypto_kem API mapping to xwing 2026-01-15 23:29:59 +01:00
Frank Denis bd6a8af323 Add X-Wing 2026-01-15 23:26:59 +01:00
Frank Denis 44443f9bcb Add back symbols for Intel implementations 2026-01-15 19:26:15 +01:00
Frank Denis bc43c46a43 Cleanup symbols 2026-01-15 23:18:59 +01:00
Frank Denis 02e707a963 Remove SHA3 wrapper 2026-01-15 23:17:59 +01:00
Frank Denis 49d1b7e0ea ml-kem: remove internal SHA3 implememtation
Now that there's a public SHA3 API.
2026-01-15 23:10:59 +01:00
Frank Denis 036e268e17 Add new symbols 2026-01-15 23:10:59 +01:00
Frank Denis a6038f815c Add support for SHA3 2026-01-15 23:03:59 +01:00
Frank Denis e7c1796015 JavaScript: faster randomness generation
Fill entire buffers directly.
2026-01-13 23:00:03 +01:00
Frank Denis 4a7692a723 Compatibility with gcc 4.x
Reported by @pedro0311

Fixes #1507
2026-01-13 20:00:17 +01:00
Frank Denis 60b528c3dd Export missing crypto_ipcrypt_nd_keygen() helper function 2026-01-07 23:00:39 +01:00
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