EVP_CAST5_CBC(3SSL)

✨ EVP_CAST5_CBC πŸ’«

okay bestie, so this one lives in the 3SSL corner of your man pages (that's the OpenSSL section, iykyk) and it's all about the CAST cipher family for EVP. she's giving vintage, she's giving variable key length, she's giving five little functions that all hand you a cipher. let's get into it πŸ’–


🌸 NAME 🌸

EVP_cast5_cbc, EVP_cast5_cfb, EVP_cast5_cfb64, EVP_cast5_ecb, EVP_cast5_ofb β€” the EVP CAST cipher πŸŽ€


✨ SYNOPSIS ✨

#include <openssl/evp.h>

const EVP_CIPHER *EVP_cast5_cbc(void);
const EVP_CIPHER *EVP_cast5_cfb(void);
const EVP_CIPHER *EVP_cast5_cfb64(void);
const EVP_CIPHER *EVP_cast5_ecb(void);
const EVP_CIPHER *EVP_cast5_ofb(void);

like, that's it. five prototypes. no notes. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

So this is the CAST encryption algorithm, but for EVP β€” you know, the whole EVP vibe. And heads up, it's a variable key length cipher, which is exactly what it sounds like: the key length isn't one fixed number, it can vary. iconic behavior fr fr πŸ”₯

Let's break the five besties down:

  • EVP_cast5_cbc(), EVP_cast5_ecb(), EVP_cast5_cfb(), EVP_cast5_cfb64(), EVP_cast5_ofb() β€” this is the CAST encryption algorithm in CBC, ECB, CFB and OFB modes respectively. yes bestie, "respectively" means in that exact order. cbc, ecb, cfb, cfb64, ofb β€” okay wait, they list four modes but there's five functions, because cfb and cfb64 are two separate girlies and the man page groups them under "CFB". not me noticing that 😭 anyway, every function you see up there maps onto one of these modes. periodt.

πŸ‘‘ NOTES πŸ‘‘

okay this part actually matters, listen up πŸ“’

Calling these functions multiple times has negative performance implications. like, it's not free, bestie. The docs are very clear that developers should be aware of this and should consider using EVP_CIPHER_fetch(3) together with EVP_CIPHER-CAST(7) instead. That's the glow-up path. ✨

And if you want the whole story, go read the "Performance" section in crypto(7) β€” that's where the further information lives.

fr fr, don't just spam these calls in a loop and then act surprised. fetch instead. your profiler will thank you 🫢

πŸ’– RETURN VALUES πŸ’–

These functions return an EVP_CIPHER structure, and that structure contains the implementation of the symmetric cipher. so cute, so tidy. that's the whole return value situation β€” you get the cipher, she's in there, slay. πŸ’…


🌈 SEE ALSO 🌈

go read those too, bestie, they're the supporting cast πŸŽ€


Copyright 2017-2023 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


and that's the whole page, no cap πŸ§šπŸ’œ this was OpenSSL 4.0.3, dated 2026-09-29, and yes, it's the 3SSL manual section β€” so when you go looking for it, that's the room she's in. bye bestie, go encrypt something responsibly πŸ“πŸ‘‘

πŸ“¦ where this page comes from