RC4(3)
π RC4(3) β RC4 encryption π
okay bestie, welcome to the Library Functions Manual page for RC4(3) β manual name folded in right up top, no boring header-line copy-paste energy. The stars are RC4_set_key and RC4, and honestly this whole page is giving βhistoric crypto with a giant warning sticker.β π«Ά
πΈ NAME πΈ
RC4_set_key, RC4 β RC4 encryption.
β¨ SYNOPSIS β¨
the synopsis says library βlibcryptoβ and tells you to include:
library βlibcryptoβ
#include <openssl/rc4.h>
then the function signatures, exactly:
void
RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
void
RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
unsigned char *outdata);
π DESCRIPTION π
so this library implements the alleged RC4 cipher β the one described, for example, in "Applied Cryptography". It's believed to be compatible with RC4[TM], which is a proprietary cipher of RSA Security Inc. π
RC4 is a stream cipher with a variable key length. Typically, 128-bit (16-byte) keys are used for strong encryption, but shorter insecure key sizes have been widely used due to export restrictions. π
RC4 has two phases: a key setup phase, and then the actual encryption or decryption phase. main character structure, honestly. π
RC4_set_key() handles the setup: it sets up the RC4_KEY named key using the len bytes long key at data. ποΈ
RC4() encrypts or decrypts the len bytes of data at indata using key, and places the result at outdata. Repeated RC4() calls with the same key yield a continuous key stream β no cap. π₯
Since RC4 is a stream cipher (the input is XOR'ed with a pseudo-random key stream to produce the output), decryption uses the same function calls as encryption. one function, both directions, iconic. π¦
π SEE ALSO π
go read these when you're done, bestie:
π°οΈ HISTORY π°οΈ
RC4_set_key() and RC4() appeared in SSLeay 0.4 or earlier, and they've been available since OpenBSD 2.4. old-school but not old enough to escape the warning. π«
π BUGS π
π¨ This cipher is broken and should no longer be used. Periodt. Not a quirky legacy flex β broken. please don't use it. π
xoxo bestie β source/version: Debian; date: June 8, 2025. mwah π
π¦ 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) 2000 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