EVP_RC4(3)
π EVP_RC4 β the RC4 stream cipher, but make it evp(3) β¨
okay so bestie, this is a page from the libcrypto manual β specifically the EVP_RC4(3) entry, and it's all about the RC4 stream cipher sitting pretty inside the evp(3) framework. it's giving classic crypto, fr fr.
πΈ SYNOPSIS πΈ
like, first you gotta pull in the library:
library βlibcryptoβ #include <openssl/evp.h>
and then these three icons are yours:
const EVP_CIPHER *
EVP_rc4(void);
const EVP_CIPHER *
EVP_rc4_40(void);
const EVP_CIPHER *
EVP_rc4_hmac_md5(void);
π DESCRIPTION π
so these functions hand you the RC4 stream cipher, all wrapped up in the evp(3) framework. it's a variable key length cipher, iykyk β the key length is not fixed, it can change. π«
EVP_rc4()β this one uses a default key length of 128 bits. the main character, honestly. πEVP_rc4_40()β same vibe but with a key length of 40 bits instead. and listenβ¦ this function is deprecated. π do not use it. useEVP_rc4()together withEVP_CIPHER_CTX_set_key_length(3)instead, periodt.EVP_rc4_hmac_md5()β this one serves authenticated encryption, using the RC4 stream cipher with MD5 as HMAC. but bestie, be so for real: this function is not intended for usage outside of TLS, and it requires calling some undocumented control functions. π it also does not conform to the EVP AEAD interface. so yeah, it's giving "do not touch unless you're literally in TLS". π
π¦ RETURN VALUES π¦
these functions return an EVP_CIPHER structure that provides the implementation of the symmetric cipher. that's the whole tea. β¨
π SEE ALSO π
go read those too, bestie, they're lowkey important. π«Ά
π HISTORY π
EVP_rc4()first appeared in SSLeay 0.5.1, andEVP_rc4_40()in OpenSSL 0.9.1. these functions have been available since OpenBSD 2.4. vintage, honestly. π°οΈEVP_rc4_hmac_md5()first appeared in OpenSSL 1.0.1 and has been available since OpenBSD 5.3. β¨
ngl, the 40-bit one and the hmac_md5 one are not the vibe β deprecated and TLS-only respectively. read the caveats and slay responsibly. π
okay that's the whole page, bestie β this one came from the Debian edition, dated June 8, 2025, and it's page EVP_RC4(3). mwah, go forth and cipher. πππ¦
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2017 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms