Stream cipher family

RC4

Rivest's 1987 byte-oriented stream cipher, once ubiquitous and now prohibited in TLS

broken 1 variant RFC 6229 (test vectors); RFC 7465 (prohibited in TLS)

Overview

RC4 is a stream cipher designed by Ron Rivest in 1987. It was used in WEP, WPA-TKIP, early TLS and many other systems because of its simplicity and speed, but statistical biases in its output have made it insecure.

RC4 maintains a 256-byte permutation S and two indices. The key-scheduling algorithm initialises S to the identity and swaps entries based on the key. The output generator then repeatedly increments one index, adds the indexed value to the other, swaps the two entries, and outputs the byte at the sum of the two values. No nonce is defined; protocols often concatenated an IV with the key, which proved fatal in WEP.

The algorithm was a trade secret until it was leaked in 1994, which is why it is also known as ARC4 or ARCFOUR. NextSSL includes RC4 for legacy interoperability; RFC 6229 provides test vectors. It is still found in old protocols. Its simplicity made it easy to implement in early hardware and software.

History

1987–2015
  1. RC4 designed by Ron Rivest

  2. RC4 source posted anonymously

  3. Fluhrer, Mantin and Shamir break WEP's use of RC4

  4. RC4 prohibited in TLS by RFC 7465

Security notes

RC4 is broken. Its early keystream bytes are biased, related-key weaknesses broke WEP within minutes, and plaintext-recovery attacks against TLS led RFC 7465 to prohibit RC4 in TLS in 2015. Do not use it for new data.

Typical uses

Decrypting legacy dataAnalysing WEP and old TLS traffic

Variants in NextSSL

1
AlgorithmTierSizes (bytes)StandardsAPI
RC4
rc4
broken key 1–256 · nonce 0 RFC 6229, ARC4 root

Frequently asked questions

Which RC4 variants does NextSSL include?

NextSSL registers 1 RC4 variant: rc4.