mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-01 12:45:56 +00:00
AES_set_encrypt_key zeroed the whole schedule and set rounds before it checked the key length, so a refused call changed the AES_KEY. As in LibreSSL 2.5.4's aes_core.c, it now returns -1 or -2 before writing anything and writes only the 44, 52 or 60 words the key length needs. The test fills the key with a sentinel and checks, for both setup functions, that refused calls leave all 244 bytes unchanged, that AES-128 and AES-192 keep the 16 and 8 unused words, and that every written word matches the FIPS-197 appendix A schedules and the decryption schedules computed independently and with OpenSSL 3.0.13. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>