EVP_RC2_CBC(3SSL)
π EVP_RC2_CBC β the RC2 cipher, but make it EVP β¨
okay so bestie, this is a page from the OpenSSL manual, section 3SSL (library calls, cryptography girlies π). Sit down, grab a strawberry drink π, and let's talk about every single RC2 flavour EVP will hand you.
β¨ NAME β¨
EVP_rc2_cbc, EVP_rc2_cfb, EVP_rc2_cfb64, EVP_rc2_ecb, EVP_rc2_ofb, EVP_rc2_40_cbc, EVP_rc2_64_cbc β the EVP RC2 cipher, all of its little siblings π
π 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_CIPHER *EVP_rc2_40_cbc(void);
const EVP_CIPHER *EVP_rc2_64_cbc(void);
πΈ DESCRIPTION πΈ
It's the RC2 encryption algorithm, but living its best life inside EVP. π
π¦ EVP_rc2_cbc(), EVP_rc2_cfb(), EVP_rc2_cfb64(), EVP_rc2_ecb(), EVP_rc2_ofb()
These give you the RC2 encryption algorithm in CBC, CFB, ECB and OFB modes respectively β yes, in that order, they're not gonna mix it up for you.
This is a variable key length cipher, and it's got an extra little parameter situation going on called "effective key bits" or "effective key length". By default, both are set to 128 bits. default slay, honestly β¨
π§ EVP_rc2_40_cbc(), EVP_rc2_64_cbc()
RC2 in CBC mode, except the default key length and the effective key length are 40 and 64 bits respectively.
π¨ WARNING: these functions are obsolete. Do not be out here using them like it's 2003, bestie. Their usage should be replaced with theEVP_rc2_cbc(),EVP_CIPHER_CTX_set_key_length()andEVP_CIPHER_CTX_ctrl()functions β that's how you set the key length and the effective key length now. The way that there's literally a whole replacement trio for this... π
π NOTES π
Devs, listen up: calling these functions multiple times has negative performance implications. Lowkey a red flag for your loop π©. You should consider using EVP_CIPHER_fetch(3) with EVP_CIPHER-RC2(7) instead. For the full tea, see "Performance" in crypto(7).
π RETURN VALUES π
These functions return an EVP_CIPHER structure that contains the implementation of the symmetric cipher. One struct, all the power, main character energy fr fr. π
π«Ά SEE ALSO π«Ά
β COPYRIGHT β
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, bestie πβ¨ this was OpenSSL 4.0.3, dated 2026-09-29, and the page you just read is EVP_RC2_CBC(3SSL). go forth, set your key lengths responsibly, and remember: EVP_rc2_40_cbc and EVP_rc2_64_cbc are obsolete, so leave them in the past where they belong π
π¦ bye mwah π«Ά
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms