Tool to code / decode RC4 messages. Rivest Cipher 4 is a fast symmetric encryption algorithm created by Ronald Rivest used in some protocols like TLS or WEP.

RC4 Cipher - dCode

Tag(s) : Modern Cryptography

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!

A suggestion ? a feedback ? a bug ? an idea ? *Write to dCode*!

The RC4 was created to be symmetric, the encryption phase is identical to decryption, use the form above.

The **RC4** digit uses a key that can initialize an array of 256 boxes.

The algorithm that allows to initialize the array with the key `key` is:

`// Pseudocode`

for i = 0 ... 255 {

t[i] = i

}

j = 0

k = length(cle)

for i = 0 ... 255 {

j = (j + t[i] + key[i % k]) % 256

swap t[i] <-> t[j]

}

The array `t` can then be used to generate a stream by moving values and XOR operation.

The **RC4** algorithm is then:` // Pseudocode`

a = b = 0

j = length(string)

codes = []

for i = 0 ... j {

a = (a + 1) % 256

b = (b + t[a]) % 256

swap t[a] <-> t[b]

codes []= ( t[ (t[a] + t[b]) % 256] ) XOR string[i]

}

print codes

The codes are values between 0 and 255.

__Example:__ `dCode` (`64,43,6F,64,65` in hexadecimal) encrypted with the key ` RC4` (

Identically

Decryption is exactly the same as encryption.

The codes generated by **RC4** are between 0 and 255, usually represented in hexadecimal.

**RC4** is pseudo-random, there is no easily detectable bias.

The code is also called RCfour, ARCFour, ARC4, Alleged **RC4** or Ron's Code 4.

Any reference to WEP or TLS protocols is a clue.

**RC4** was invented by Ronald Rivest (one of the inventors of RSA encryption) in 1987.

dCode retains ownership of the online "RC4 Cipher" source code. Except explicit open source licence (indicated CC / Creative Commons / free), the "RC4 Cipher" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or the "RC4 Cipher" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, copy-paste, or API access for "RC4 Cipher" are not public, same for offline use on PC, tablet, iPhone or Android ! Remainder : dCode is free to use.

Please, check our dCode Discord community for help requests!

NB: for encrypted messages, test our automatic cipher identifier!

rc4,arcfour,arc4,rivest,tls,wep

Source : https://www.dcode.fr/rc4-cipher

© 2021 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaching / CTF.

Feedback

▲
Thanks to your feedback and relevant comments, dCode has developed the best 'RC4 Cipher' tool, so feel free to write! Thank you!