wolfcrypt-py/scripts
Juliusz Sosinowicz 8bb46362b7 Use byte ctxLen in wc_dilithium_verify_ctx_msg cdef (F-4014)
The CFFI cdef declared wc_dilithium_verify_ctx_msg with word32 ctxLen while the
sign variants use byte ctxLen. wolfSSL's real API (wc_MlDsaKey_VerifyCtx in
wolfcrypt/wc_mldsa.h, which the wc_dilithium_verify_ctx_msg macro forwards to)
takes byte ctxLen, matching FIPS 204's 255-byte context cap. The mismatched
cdef made CFFI marshal a 4-byte word32 into a 1-byte slot, silently truncating
any ctxLen > 255 to its low byte.

Declare ctxLen as byte to match the sign cdef and the underlying API.
2026-07-16 08:48:55 +00:00
..
build_ffi.py Use byte ctxLen in wc_dilithium_verify_ctx_msg cdef (F-4014) 2026-07-16 08:48:55 +00:00