As an exercise, I am implementing my own CBC and CTR modes. (e.g. for first block of CBC, E(k, IV xor message[0]
).
For example, I tried the following thinking that I can use that as my E
function (with BouncyCastle):
Cipher cipher = Cipher.getInstance("AES/NONE/PKCS5", "BC");
but 'NONE' isn't an option.
My question is how to use the Java AES functions for my purpose; how can I do E(k, ...)
?