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.

1 Answer 1


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.

  • 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. Commented Mar 20, 2015 at 21:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .