RC4 Encrypt & Decrypt Online

Online tool to perform encryption and decryption using RC4 algorithm

About RC4

RC4 (Rivest Cipher 4), also known as ARC4 or ARCFOUR, is a stream cipher known for its speed and simplicity. However, it is considered insecure as mulitple vulnerabilities have been found. This algorithm was designed in 1987 by Ron Rivest

RC4 generates a keystream for encryption. The keystream is combined with plaintext using exclusive-or operation and likewise the decryption. The generation of keystream consists of two processes:

  1. A permutation of all 256 possible bytes, initialized with a variable length key. The key length typially ranges between 40 and 2048 bits using key-scheduling algorithm (KSA). Then it uses pseudo-random generation algorithm (PRGA) for generating strem of bits.
  2. Two 8-bit index-pointers

Example 1