EVP_RC4(3SSL)

πŸ’– EVP_RC4 β€” the RC4 stream cipher, but make it EVP ✨

okay so bestie, this is page EVP_RC4 from section 3SSL of the OpenSSL manual, and we're about to get into the RC4 stream cipher family. it's giving vintage crypto energy, no cap.


🌸 NAME 🌸

EVP_rc4, EVP_rc4_40, EVP_rc4_hmac_md5 β€” the EVP RC4 stream cipher, all three of them, together, slaying in one manpage πŸ’…


✨ 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);

three little functions, all returning const EVP_CIPHER *, all iconic πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so the RC4 stream cipher, right β€” but for EVP. that's the whole vibe. now let's meet the cast 🌈

πŸ’– EVP_rc4()

RC4 stream cipher. this is a variable key length cipher, and its default key length is 128 bits.

πŸ’œ EVP_rc4_40()

RC4 stream cipher with a 40 bit key length.

⚠️ WARNING: bestie, this function is obsolete. its usage should be replaced with the EVP_rc4() and the EVP_CIPHER_CTX_set_key_length() functions. like, for real, don't be starting new things with this one πŸ™ˆ

🧚 EVP_rc4_hmac_md5()

Authenticated encryption with the RC4 stream cipher, using MD5 as the HMAC.

⚠️ WARNING: this 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 like… it's a very specific girl in a very specific situation, ok?? 😭

πŸ‘‘ NOTES πŸ‘‘

devs, listen up fr fr: you should be aware of the negative performance implications of calling these functions multiple times. consider using EVP_CIPHER_fetch(3) with EVP_CIPHER-RC4(7) instead. see "Performance" in crypto(7) for further information. your CPU will thank you πŸ’–


⭐ RETURN VALUES ⭐

these functions return an EVP_CIPHER structure that contains the implementation of the symmetric cipher. that's it, that's the tea 🫢


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


and that's a wrap on this one, bestie πŸ’…βœ¨ this was version 4.0.3, dated 2026-09-29, from the OpenSSL girlies themselves β€” go forth and cipher responsibly πŸ¦‹πŸ’–πŸŒΈ

πŸ“¦ where this page comes from