HomeRC Series (RC2/RC4/RC5/RC6) Online Encryption/Decryption

RC Series (RC2/RC4/RC5/RC6) Online Encryption/Decryption

RC series symmetric encryption algorithms designed by Ron Rivest, supporting RC2, RC4, RC4-Drop, RC5 and RC6

Security Warning

RC2 has known vulnerabilities and is deprecated. Use only for legacy system compatibility.

Limit key search space (historical export compliance parameter)

RC2 key length: 1-128 bytes. Block size: 64 bits. Recommended effective key bits: 128
Format Options

About RC Cipher Suite

The RC cipher series was designed by Ron Rivest of MIT and RSA Security. 'RC' originally stood for 'Rivest Cipher' or 'Ron's Code'. The series includes RC2, RC4, RC5, and RC6, each with distinct characteristics.

RC2 is a 64-bit block cipher designed in 1987. RC4 is a stream cipher once widely used in SSL/TLS and WEP. RC5 introduced a novel parameterized structure. RC6 was designed as an AES candidate algorithm, enhancing diffusion through integer multiplication.

Algorithm Comparison

AlgorithmTypeKey LengthBlock SizeSecurityStatus
RC2Block Cipher1-128 bytes64 bitsWeakDeprecated
RC4Stream Cipher1-256 bytesN/A (stream)WeakDeprecated
RC5Block Cipher0-255 bytes32/64/128 bitsGoodSecure
RC6Block Cipher16/24/32 bytes128 bitsExcellentAES Finalist

RC2 (Rivest Cipher 2)

RC2 is a 64-bit block cipher designed in 1987. It uses variable-length keys (1-128 bytes) and has a unique 'effective key bits' parameter that can limit the key search space.

Originally designed as proprietary, RC2 was intended to achieve export compliance with 40-bit effective key length. Due to known vulnerabilities, it should only be used for legacy system compatibility.

RC4 (Rivest Cipher 4)

RC4 is a stream cipher designed in 1987. It generates a pseudorandom byte stream (keystream) that is XORed with the plaintext. Known for simplicity and speed, it was widely used in SSL/TLS, WEP, and WPA protocols.

Due to discovered vulnerabilities (particularly in the first few bytes of the keystream), RC4 has been deprecated from modern security protocols. The 'RC4-Drop' variant mitigates these issues by discarding initial keystream bytes.

RC5 (Rivest Cipher 5)

RC5 was published in 1994, introducing a parameterized design with three variables: word size (w), number of rounds (r), and key length (b). This flexibility allows RC5 to adapt to different security requirements.

RC5 uses data-dependent rotation as its primary nonlinear operation, simple yet effective. Common configurations include RC5-32/12/16 (32-bit word size, 12 rounds, 16-byte key).

RC6 (Rivest Cipher 6)

RC6 was submitted as an AES candidate in 1998, one of five finalists. It extends RC5 with integer multiplication for better diffusion and uses four working registers instead of two.

RC6 has a fixed 128-bit block size, supports 128/192/256-bit keys, and provides excellent security. Although Rijndael was selected as AES, RC6 remains a respected and secure algorithm.

Key Features

RC2: Legacy block cipher with variable key length, use only for legacy system compatibility
RC4: Extremely fast stream cipher, suitable for real-time applications
RC5: Parameterized design allows flexible security/performance trade-offs
RC6: Modern block cipher with strong security guarantees
All algorithms are unpatented and free to use for any purpose

Encryption Modes (RC5/RC6)

CBC (Cipher Block Chaining): Cipher Block Chaining - Each block is XORed with the previous ciphertext block. Recommended for most scenarios.
ECB (Electronic Codebook): Electronic Codebook - Each block is encrypted independently. Not recommended for sensitive data.
CFB (Cipher Feedback): Cipher Feedback - Converts block cipher to stream cipher. Self-synchronizing.
OFB (Output Feedback): Output Feedback - Generates keystream independently. No error propagation.

Security Recommendations

RC4 should not be used in new applications due to known vulnerabilities
RC4-Drop (discarding first 768-3072 bytes) can mitigate some attacks but is not recommended
RC5 with sufficient rounds (12+) and key length (128+ bits) is considered secure
RC6 provides excellent security comparable to AES

Use Cases

Legacy system compatibility and migration
Educational and research purposes
Embedded systems using RC5 (simple implementation)
High-security applications using RC6