0

I'm writing an app for a client and part of the client's encryption requirements for use of AES-256-CBC are: "128-bit cryptographically random initialization vector" "PKCS7 padding" "HMAC of encrypted output required for integrity verification"

I am trying to find out if the BouncyCastle implementation of AES-256-CBC meets these requirements. I have searched their documentation but cannot find anything saying anything specific about any of these.

My understanding is that AES-CBC has to use a 128-bit IV by definition. But some implementations do not require the IV to be random.

PKCS7 padding -- not sure.

HMAC verification of encrypted output -- well, my first thought was that that's probably something we have to do manually in our code, not something that the library takes care of for us. However, I thought there might be at least the possibility that the library might be able to create an encrypted envelope that includes a HMAC signature, and the signature is checked upon decryption, so that it's all taken care of for you.

Any information?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.