Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in CMAC with AES256 key #200

Open
huckym opened this issue Jul 20, 2023 · 1 comment
Open

Bug in CMAC with AES256 key #200

huckym opened this issue Jul 20, 2023 · 1 comment

Comments

@huckym
Copy link

huckym commented Jul 20, 2023

IV needs to match block size but the key size could be 256bit.
CMAC.init works fine if coincidentally AES128 keys are used because the blocksize and key size are same. Breaks for AES256

https://github.com/bcgit/pc-dart/blob/59e06028bff338adc7d25ff9da4063a3b2e28b4c/lib/macs/cmac.dart#L185C5-L185C52

@smlu
Copy link

smlu commented Jun 27, 2024

+1 Up voting this issue...
The IV size is definitively wrong for block cipher modes. It should match the block size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants