EVP_RC4(3ossl)
π EVP_RC4 β the manual, but make it make sense
okay bestie, so this page lives in the 3ossl section of the OpenSSL manpages, and it's all about the RC4 stream cipher β the messy icon of crypto. Let's get into it π«Ά
β¨ NAME β¨
EVP_rc4, EVP_rc4_40, EVP_rc4_hmac_md5 β the EVP RC4 stream cipher, all three flavours, no cap.
πΈ SYNOPSIS πΈ
#include <openssl/evp.h>
const EVP_CIPHER *EVP_rc4(void);
const EVP_CIPHER *EVP_rc4_40(void);
const EVP_CIPHER *EVP_rc4_hmac_md5(void);
like, three little functions, three little EVP_CIPHER * returns, zero drama (wellβ¦ mostly) π
π DESCRIPTION π
It's the RC4 stream cipher, but for EVP. Three separate entry points, and each one has opinions:
EVP_rc4()β RC4 stream cipher, classic. It's a variable key length cipher, and the default key length is 128 bits. slay, flexible queen πEVP_rc4_40()β RC4 stream cipher, but locked to a 40 bit key length.
β οΈ WARNING: this function is obsolete. Like, genuinely don't. Its usage should be replaced with theEVP_rc4()andEVP_CIPHER_CTX_set_key_length()functions instead. that's the glow-up arc, bestie β¨
EVP_rc4_hmac_md5()β authenticated encryption with the RC4 stream cipher, using MD5 as the HMAC. fancy-ish π
β οΈ WARNING: this one is not intended for usage outside of TLS, and it requires calling some undocumented ctrl functions. Also? These ciphers do not conform to the EVP AEAD interface. soβ¦ iykyk, but don't yk π
π¦ NOTES π¦
Developers should be aware of the negative performance implications of calling these functions multiple times π and should consider using EVP_CIPHER_fetch(3) with EVP_CIPHER-RC4(7) instead. For the full tea, see "Performance" in crypto(7). fr fr, it's giving efficiency π
β RETURN VALUES β
These functions return an EVP_CIPHER structure that contains the implementation of the symmetric cipher. Want the deets on what's actually inside that EVP_CIPHER structure? See EVP_CIPHER_meth_new(3). it's all there, bestie π
π§ SEE ALSO π§
go read them, they're literally linked for your convenience π
π 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, periodt π β¨ This iconic little writeup is from the 3.5.0 era of OpenSSL, dated 2026-09-25 β screenshot it, save it, cite it, whatever, just don't lose it ππ¦
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms