Commit Graph
93 Commits
Author SHA1 Message Date
bbodi f7f3e63191 Reset keccak_round_start in _sha3.init
init left the round start untouched. A context that skipped zeroing
with `= ---`, or one reused after TurboSHAKE, kept a stale value, so
SHA-3 and SHAKE ran too few rounds and returned wrong hashes silently.
2026-10-08 11:02:47 +02:00
Ihor Antonov 0aee554caa core/crypto/_fiat/field_p256r1: fix fe_sqrt addition chain base
Step 4 (t0 = x^0xc) passed x^1 (&xx) instead of x^3 (out1), producing
an incorrect exponent and rejecting valid quadratic residues. This broke
compressed SEC1 P-256 point decoding via pt_set_sec_bytes.
2026-09-25 13:49:23 -07:00
zhibog 2efcd11ab4 [core:crypto] Add TurboSHAKE 2026-07-14 16:28:29 +02:00
kalsprite 2d8502a1fa pr comment fixes 2026-07-13 22:56:01 -07:00
kalsprite 4aa30314c9 add limbo 2026-07-12 15:05:36 -07:00
kalsprite df044411d9 attach nc 2026-07-12 12:58:45 -07:00
kalsprite e4fc7a3a9e rsa, x509 write path 2026-07-12 12:14:32 -07:00
kalsprite 2fd11467c8 Merge branch 'master' into x.508 2026-07-12 10:51:44 -07:00
Yawning Angel e1d32cb19f core/cryto/rsa: Initial import 2026-07-12 06:17:08 +09:00
Yawning Angel 483221ef97 core/crypto/_bigint: Initial import 2026-07-12 06:17:08 +09:00
Yawning Angel 83940eadfe test/core/crypto/wycheproof: Update the tests to match recent changes
This needs to be merged before I can bump the wycheproof assets.
2026-06-25 14:01:10 +09:00
kalsprite 4876cf03bf asn1 DER reader/writer and X.509 reader 2026-06-13 23:40:08 -07:00
Yawning Angel ccc17780b4 core/crypto/mldsa: Initial import 2026-05-19 19:32:50 +09:00
Yawning Angel 675389aeab core/crypto/ecdsa: Minor additions and cleanups 2026-05-19 19:32:50 +09:00
Yawning Angel d2c29c025e core/crypto/mlkem: Initial import 2026-05-06 09:53:02 +09:00
Yawning Angel 8f1067f290 tests/core/crypto/wycheproof: Break up into separate files 2026-05-06 09:53:02 +09:00
Yawning Angel 40554a5d87 test/core/crypto/noise: Add known answer tests 2026-04-20 21:34:24 +09:00
Yawning Angel 195b8593b5 test/core/crypto/wycheproof: Refactor/dead code removal 2026-04-20 21:34:24 +09:00
Yawning Angel 4e8c80f80b core/crypto/noise: Move the smoke tests to the standard location 2026-04-20 21:34:24 +09:00
Yawning Angel 86b629ba84 core/crypto/argon2id: Initial import 2026-03-04 21:29:55 +09:00
Yawning Angel 058bd9a914 core:crypto/_blake2: Cleanups and fixes
The fixes apply to "use it as a MAC" which was not part of the
documented/exposed API.  It now is, and is covered by the self-test
routines from the RFC.
2026-03-04 21:22:56 +09:00
Yawning Angel 7e7515d7d9 core/crypto/ecdsa: Add ECDSA support 2026-02-20 04:10:54 +09:00
Yawning Angel ffa6fc2a67 core/crypto/_weierstrass: Add scalar field inversion 2026-02-20 03:59:34 +09:00
Jeroen van Rijn 69831da51f Vendor Yawning Angel's odin-wycheproof into tests/crypto/wycheproof
Upstream test vectors from [wycheproof](https://github.com/C2SP/wycheproof) have been vendored into the [Odin test-assets](https://github.com/odin-lang/test-assets) repository, and will be downloaded and verified using `tests/core/download_assets.py`.
2026-02-16 19:00:43 +01:00
Yawning Angel eadd5f789c core/crypto/ecdh: Add secp384r1 2026-02-03 18:48:07 +09:00
Yawning Angel 64ce2bdf0e core/crypto/_weierstrass: Add secp384r1 2026-02-03 18:48:07 +09:00
Yawning Angel c35b49bf60 core/crypto/ecdh: Initial import 2026-01-28 22:50:27 +09:00
Yawning Angel 5ce448a8d5 core/crypto: Start work on the NIST curves 2026-01-28 22:50:27 +09:00
Yawning Angel 429e8a46db core/crypto/ed25519: Cosmetic fixes (NFC) 2026-01-28 22:20:03 +09:00
gingerBill 842cfee0f3 Change Odin's LICENSE to zlib from BSD 3-clause
This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
2025-10-28 14:38:25 +00:00
Yawning Angel b220df60b8 core:crypto/deoxysii: Initial import 2025-03-23 19:14:33 +09:00
Yawning Angel c2786a6dd5 core/crypto/aegis: Initial import 2025-03-23 19:14:33 +09:00
Yawning Angel 9fdcc4e39a core/crypto/x448: Initial import 2025-03-23 19:14:33 +09:00
Yawning Angel cf7d705c1f core/crypto/_sha3: Fix edge case in cSHAKE bytepad
If the domain separator happens to be exactly the rate, we would
previously incorrectly add another rate-bytes of 0s.
2024-09-30 21:50:18 +09:00
Yawning Angel ba1ad82c2b core/crypto/aead: Initial import 2024-08-10 18:32:37 +09:00
Yawning Angel b381791f42 core/crypto/chacha20: Change API terminology to be consistent with AES 2024-08-10 18:32:37 +09:00
Yawning Angel 14ceb0b19d core/crypto/chacha20poly1305: Support AEAD_XChaCha20_Poly1305
IETF-draft flavor (32-bit counter) though this makes no practical
difference.
2024-08-10 18:32:37 +09:00
Yawning Angel 8efc98ce90 core/crypto/chacha20poly1305: Change the interface to match GCM 2024-08-10 18:32:37 +09:00
Yawning Angel 1f3107e693 core/crypto/chacha20: Use 128-bit/256-bit SIMD 2024-08-10 18:32:37 +09:00
Yawning Angel 708f053fe6 core/crypto/aes: Use NIST terminology for the IV 2024-08-10 18:32:37 +09:00
Yawning Angel c0f9655ec4 test/core/crypto: Minor changes to AES related tests
- Test against the non-standard GCM nonce length vectors
- Fix the CTR mode test to match the comment

Correctness was fine without this change.
2024-08-10 18:32:37 +09:00
Yawning Angel 69026852ce core/crypto/aes: Add Intel AES-NI support
This supports AES-NI + PCLMUL, and provides optimized key schedule, ECB,
CTR, and GCM.  Other modes are trivial to add later if required.
2024-07-16 01:29:43 +09:00
Yawning Angel 4815154c31 test/core/crypto: Fix a copy-paste issue in failure spew 2024-07-16 01:29:43 +09:00
Yawning Angel 0d8dadec8a tests/core/crypto: Fix new -vet issues 2024-07-16 01:29:43 +09:00
Jeroen van Rijn 9d8d864400 Plug leak in AES tests. 2024-06-02 21:12:24 +02:00
Jeroen van Rijn 8d93379e29 Factor benchmarks out into tests\benchmark\<pkg> 2024-06-02 14:54:29 -04:00
Jeroen van Rijn a0b2ea6d6e Update tests\core\crypto 2024-06-02 14:46:59 -04:00
Yawning Angel c751e4b2eb core/crypto/aes: Add AES implementation 2024-06-01 22:55:42 +09:00
Yawning Angel a6eb64df6c core/crypto: Add a HAS_RAND_BYTES constant 2024-04-23 11:47:43 +09:00
Yawning Angel fa1d681e65 tests/core/crypto: Start adding comprehensive curve25519 tests 2024-04-09 14:37:59 +09:00