EVP_RC4(3ossl)

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

πŸ’œ EVP_RC4 β€” the OpenSSL man page, but make it bestie-friendly ✨

okay so this is the EVP_RC4(3ossl) page from the OpenSSL manual β€” yes, the whole thing, ngl it's short but it's important, so grab a snack and let's get into it πŸ“


🌸 NAME

EVP_rc4, EVP_rc4_40, EVP_rc4_hmac_md5 β€” the EVP RC4 stream cipher, aka the three besties of RC4 πŸ’…

✨ SYNOPSIS

like, the vibes, in code:

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

literally three functions, all returning const EVP_CIPHER *, no arguments. iconic. periodt πŸŽ€

πŸ¦‹ DESCRIPTION

The RC4 stream cipher, for EVP. that's the whole premise 🫢

  • EVP_rc4() β€” the RC4 stream cipher. this is a variable key length cipher, and the default key length is 128 bits. slay πŸ‘‘
  • EVP_rc4_40() β€” RC4 stream cipher with a 40 bit key length.
⚠️ WARNING: this function is obsolete. like, genuinely. its usage should be replaced with the EVP_rc4() and the EVP_CIPHER_CTX_set_key_length() functions. no cap, please migrate πŸ™ˆ
  • EVP_rc4_hmac_md5() β€” authenticated encryption with the RC4 stream cipher, with MD5 as 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… respect the boundaries ok πŸ’€

🧚 NOTES

devs, listen up: there are negative performance implications of calling these functions multiple times 😭 so please consider using EVP_CIPHER_fetch(3) with EVP_CIPHER-RC4(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. see EVP_CIPHER_meth_new(3) for details of the EVP_CIPHER structure. it's giving "here's your cipher, bestie" 🎁

πŸ”₯ SEE ALSO

go read them, they're lowkey required reading πŸ’–

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 page!! mwah πŸ’‹ sign-off time: this was OpenSSL 3.5.6, dated 2026-04-07 β€” go forth and encrypt responsibly, bestie πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from