EVP_RC2_CBC(3ossl)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

πŸ’… EVP_RC2_CBC πŸ’…

okay so this is the OpenSSL manual page for EVP_RC2_CBC β€” like, the 3ossl one, bestie, don't @ me about the other ones β€” and it's literally all about the EVP RC2 cipher family. RC2 girlies rise 🫢


✨ NAME ✨

EVP_rc2_cbc, EVP_rc2_cfb, EVP_rc2_cfb64, EVP_rc2_ecb, EVP_rc2_ofb, EVP_rc2_40_cbc, EVP_rc2_64_cbc β€” that's the whole squad, and together they're the EVP RC2 cipher. iconic behavior tbh πŸ‘‘


🌸 SYNOPSIS 🌸

#include <openssl/evp.h>

const EVP_CIPHER *EVP_rc2_cbc(void);
const EVP_CIPHER *EVP_rc2_cfb(void);
const EVP_CIPHER *EVP_rc2_cfb64(void);
const EVP_CIPHER *EVP_rc2_ecb(void);
const EVP_CIPHER *EVP_rc2_ofb(void);
const EVP_rc2_40_cbc(void);

wait no. hold up. let me redo that, that last one was NOT it 😭 the actual list is:

#include <openssl/evp.h>

const EVP_CIPHER *EVP_rc2_cbc(void);
const EVP_CIPHER *EVP_rc2_cfb(void);
const EVP_CIPHER *EVP_rc2_cfb64(void);
const EVP_CIPHER *EVP_rc2_ecb(void);
const EVP_CIPHER *EVP_rc2_ofb(void);
const EVP_CIPHER *EVP_rc2_40_cbc(void);
const EVP_CIPHER *EVP_rc2_64_cbc(void);

there we go, seven functions, all returning const EVP_CIPHER *, no arguments at all because they don't need any πŸ’β€β™€οΈ


πŸ¦‹ DESCRIPTION πŸ¦‹

so the whole vibe here is: the RC2 encryption algorithm, but for EVP. that's it, that's the premise ✨

πŸ’– EVP_rc2_cbc(), EVP_rc2_cfb(), EVP_rc2_cfb64(), EVP_rc2_ecb(), EVP_rc2_ofb()

these five are the RC2 encryption algorithm in CBC, CFB, ECB and OFB modes respectively. yes, that's four mode names for five functions β€” EVP_rc2_cfb() and EVP_rc2_cfb64() are both CFB, okay, it's giving twins πŸ‘―β€β™€οΈ

now the fun part: this is a variable key length cipher, and it has an extra lil parameter called the "effective key bits" (or "effective key length"). by default, both of those are set to 128 bits. slay, sensible defaults πŸ’…

⚠️ EVP_rc2_40_cbc(), EVP_rc2_64_cbc()

these are RC2 in CBC mode, but with a default key length and effective key length of 40 and 64 bits respectively.

WARNING: bestie these functions are obsolete. like, retired. their usage should be replaced with the EVP_rc2_cbc(), EVP_CIPHER_CTX_set_key_length() and EVP_CIPHER_CTX_ctrl() functions so you can set the key length and the effective key length properly. do not build new stuff on these, fr fr πŸ™ˆ

🧚 NOTES 🧚

developers should be aware (vibe check: be aware) of the negative performance implications of calling these functions multiple times 😭 like, it's not free, okay?! and you should consider using EVP_CIPHER_fetch(3) with EVP_CIPHER-RC2(7) instead.

see "Performance" in crypto(7) for further information. iykyk πŸ“š


🌈 RETURN VALUES 🌈

these functions return an EVP_CIPHER structure that contains the implementation of the symmetric cipher. if you wanna know the details of the EVP_CIPHER structure, go peek at EVP_CIPHER_meth_new(3). that's where the lore lives πŸ‘‘


πŸŽ€ SEE ALSO πŸŽ€


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>.


okay that's the whole page, no cap, every single flag-less function and every caveat made it in 🫢 and before you close this tab β€” the version is 3.5.6, dated 2026-04-07, from the OpenSSL crew. mwah, go encrypt something responsibly, bestie πŸ’‹βœ¨πŸŒΈ

πŸ“¦ where this page comes from