Skip to content

CCM mode wrongly allows IV of more than 13 bytes. #428

Open
@YuaaCindy

Description

@YuaaCindy

Hello.
I am using sjcl's latest version.
Sjcl successfully encrypts using CCM mode with an IV of 1049 bytes.
However, according to the Wycheproof test suite, this is forbidden :

"AES-CCM is only defined for nonces of size 7 .. 13. No other nonce sizes should be used."

I've checked the source code in ccm.js. It seems that it only limits the lower limit of 7 of IV's length and ignores the upper limit of 13. Allowing encryption with such IV is dangerous, which could leak the key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions