Search for a tool
ROT-47 Cipher

Tool to decrypt/ encrypt with Rot47. The ROT-47 cipher is a variant of the ROT-13 suitable for ASCII characters, exactly a subset of 94 printable characters.

Results

ROT-47 Cipher -

Tag(s) : Substitution Cipher, Internet

dCode and you

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!
You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!


Team dCode likes feedback and relevant comments; to get an answer give an email (not published). It is thanks to you that dCode has the best ROT-47 Cipher tool. Thank you.

ROT-47 Cipher

Sponsored ads

ROT47 Decoder



ROT47 Encoder



Tool to decrypt/ encrypt with Rot47. The ROT-47 cipher is a variant of the ROT-13 suitable for ASCII characters, exactly a subset of 94 printable characters.

Answers to Questions

How to encrypt using Rot-47?

The Rot-47 cipher uses an alphabet that is a subset of the ASCII characters between character 33 ! and the character 126 ~. Rot47 consists in replacing a character with another located 47 positions after in the alphabet.

Example: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

Example: DCODE is encrypted sr~st with ROT-47

How to decrypt Rot-47 cipher?

Rot-47 decryption is identical to encryption, due to the reciprocal substituting alphabet used:

Example: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

Example: #@E\cf becomes Rot-47

Why the shift of 47?

The ASCII code defines 94 printable characters, so a rotation of half (94/2 = 47) makes it possible to obtain a symmetrical cipher, similar to ROT13 (for the 26 letters of the alphabet).

How to recognize ROT-47 ciphertext?

The message uses ASCII characters. It contains common letters as 6 or t which are the ciphered values of E and e.

What are the variants of the Rot-47 cipher?

Rot-47 is a variant of Rot13, itself a variant of the Caesar cipher, a special case of shift cipher.

What is the algorithm of Rot 47? (Pseudo-code)

An implementation of ROT47 could be:

// Pseudo-code
function rot47(string) {
foreach (char in string) {
code = ascii_code(char)
if (32 < code < 80) char = ascii_char(code + 47)
if (79 < code < 127) char = ascii_char(code - 47)
}
return string
}

// Javascript
function rot47(x){
var s='';
for(var i=0;i<x.length;i++){
var j=x.charCodeAt(i);
if((j>=33)&&(j<=126)){
s+=String.fromCharCode(33+((j+14)%94));
}
else {
s+=String.fromCharCode(j);
}
}
return s;
}

Ask a new question

Source code

dCode retains ownership of the source code of the script ROT-47 Cipher online. Except explicit open source licence (indicated Creative Commons / free), any algorithm, applet, snippet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in any informatic langauge (PHP, Java, C#, Python, Javascript, Matlab, etc.) which dCode owns rights will not be given for free. To download the online ROT-47 Cipher script for offline use on PC, iPhone or Android, ask for price quote on contact page !

Questions / Comments


Team dCode likes feedback and relevant comments; to get an answer give an email (not published). It is thanks to you that dCode has the best ROT-47 Cipher tool. Thank you.


Source : https://www.dcode.fr/rot-47-cipher
© 2018 dCode — The ultimate 'toolkit' to solve every games / riddles / geocaches. dCode
Feedback