pc-dart
pc-dart copied to clipboard
Bug in CMAC with AES256 key
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
+1 Up voting this issue... The IV size is definitively wrong for block cipher modes. It should match the block size.
Can this be picked up? Do you want me to create a PR?