wolfcrypt-py/tests
Andrew Hutchings ef4195f99a Address Fenrir findings
F-3340: AesGcmStream.final decrypt path passed len(authTag) straight to
wc_AesGcmDecryptFinal, letting a caller truncate the verification window
(forgery probability ~2^-32 instead of 2^-128 for a 4-byte tag against a
16-byte configuration). Reject len(authTag) != self._tag_bytes and pass
self._tag_bytes to wolfSSL, mirroring ChaCha20Poly1305.decrypt. Added
test_decrypt_rejects_wrong_tag_length. Also fixed test_encrypt_short_tag
which was relying on the bug (decrypt side defaulted to tag_bytes=16
against a 12-byte tag).

F-3089: Declare label as const byte* in the wc_RsaPublicEncrypt_ex and
wc_RsaPrivateDecrypt_ex cdefs so CFFI can accept Python bytes without
exposing a writable pointer into immutable memory. wolfSSL does not
modify label.

F-3090: Declare nonce as const byte* in the wc_InitRngNonce and
wc_InitRngNonce_ex cdefs for the same reason.

F-1983, F-1984: Add minimum + upper bounds to requirements/{prod,test,
docs}.txt so a hijacked release of cffi, tox, pytest, types-cffi,
Sphinx, or sphinx_rtd_theme does not get pulled silently on the next
pip install. setup.txt resolves transitively via prod.txt.
2026-05-12 13:15:35 +01:00
..
certs
test_aesgcmstream.py Address Fenrir findings 2026-05-12 13:15:35 +01:00
test_asn.py
test_chacha20poly1305.py Clean up import statements. 2026-04-09 20:02:01 +02:00
test_ciphers.py Address Copilot concerns 2026-05-11 13:05:23 +01:00
test_delete_descriptor_binding.py Add regression test. 2026-04-22 17:30:12 -07:00
test_error_string.py Fix conditional execution of test_error_string. 2026-04-16 23:28:22 +02:00
test_hashes.py Fix hash copy semantics and add tests 2026-04-16 14:34:26 +00:00
test_hkdf.py Add HKDF support 2025-11-12 11:37:18 +01:00
test_mldsa.py Add missing definition ML_DSA_KEYGEN_SEED_LENGTH. 2026-04-17 23:19:13 +02:00
test_mlkem.py Support ML-KEM 2025-02-21 17:04:40 +09:00
test_pwdbased.py
test_random.py Add support for nonce in random number generation. 2026-04-05 23:10:29 +02:00