I'm looking to encrypt some files using a simple cipher plugin. I have access to using AES-256 in CBC mode, but this doesn't offer message authentication and I'd have to build my own HMAC for it.

CAST5-CBC is one of my options. Is CAST5 in CBC mode an authenticated encryption method or do I still have to build my own authentication into it? AES-GCM is unavailable to me, sadly, as I would use that.


The reason AES-CBC isn't an authenticated mode has everything to do with the CBC and nothing to do with the AES. CAST5-CBC isn't inherently authenticated either; changing one bit in the IV changes the corresponding bit in the first block, and there's no way to detect it, because that's a result of the CBC construction and not of the cipher.

|improve this answer|||||
  • Ah, so it's the block mode, right. I'm wondering why the Ruby OpenSSL library I'm using isn't up to date and doesn't show support for GCM. – Naftuli Kay Mar 20 '15 at 21:23

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.