pycryptodome icon indicating copy to clipboard operation
pycryptodome copied to clipboard

AES-CCM enforce max length

Open solney opened this issue 2 years ago • 2 comments

NIST Special Publication 800-38C Appendix 1 states that the maximum length of payload is determined by the value of q (which in turn is related to the length of the nonce).

It seems as if this condition wasn't previously enforced which could lead to the block b0 exceeding 16 bytes.

solney avatar Nov 08 '23 15:11 solney

Just looking into the python2 failures now

solney avatar Nov 08 '23 16:11 solney

Just looking into the python2 failures now

Fixed now, need bytearray instead of bytes in new test

solney avatar Nov 08 '23 16:11 solney

Thanks, but this was fixed in a more generic way in v3.22

Legrandin avatar Mar 16 '25 15:03 Legrandin