Hi,
as by the title, I got this exception when running compiled code which uses a 128-bit key...
The stack trace was:
at org.bouncycastle.crypto.engines.AESFastEngine.generateWorkingKey(Unknown Source)
at org.bouncycastle.crypto.engines.AESFastEngine.init(Unknown Source)
at org.bouncycastle.crypto.modes.CFBBlockCipher.init(Unknown Source)
at org.bouncycastle.crypto.BufferedBlockCipher.init(Unknown Source)
In fact the key used was 127 bytes, and it looks like that java's crypto libraries and bouncycastle have significant differences.
Original Java code generates a 128 bit (16 bytes) key from a 635 bytes cipher, while robovm-ed code generates a 127 bytes key from a 634 bytes (sometimes 635 indeed) cipher.
And uhm, not being a security expert I can't really make sense of this :D
Any thoughts?
Thanks,
Tommaso