Symmetric ciphersBroken
RC4 (Rivest Cipher 4)
Symmetric stream cipher (obsolete)
How it works
RC4 builds a 256-byte internal state from the key and then outputs a keystream one byte at a time, which is XORed with the plaintext. It was popular because it was small and fast in software. It has no nonce input, so protocols had to bolt one on, often badly.
Sizes: Variable key length; no IV of its own
Status: Prohibited in TLS by RFC 7465 because of keystream biases.
Strengths
- Very simple and fast, which explains its historical popularity
Weaknesses and known attacks
- Statistical biases in the keystream allow plaintext recovery when the same data (such as a cookie) is encrypted many times.
- WEP combined RC4 with a short 24-bit IV, leading to IV reuse and practical key recovery.
- RFC 7465 prohibits RC4 cipher suites in TLS; RFC 8429 deprecates it in Kerberos.
Use it for
- Nothing; recognise it in WEP, old TLS and legacy Kerberos (RC4-HMAC)
Don't use it for
- Any encryption
Exam tip
RC4 is the stream cipher behind WEP. A scenario about WEP being cracked quickly points to RC4 with a short, reused IV; the answer is WPA2 or WPA3 with AES.