I just encountered an amazing stuff while reading the Ryan Russell and Stace Cunningham’s Hack proofing your network. On page 146, he gives an introduction to cryptography and how it was first used in Egypt 4000 years ago! Then he brings up the ROT13 subject and shows how the algorithm works, simply by rotating the letters to the right by thirteen and gives and example that reads as follows:

V GUVAX JVAQBJF…

that’s equivalent to “I THINK WINDOWS”. The amazing stuff I was talking about was those ROT13-encoded texts already on the net. Try the following links and you’ll see for yourself.

and much much more. :)

Here’s a simple function (written in C#) that decodes the ROT13 text:

foreach (char ch in input)
{
    int code = ch;
    if (char.IsLetter(ch))
        code = ch + (((int)char.ToUpper(ch) < 'A' + 13) ? 13 : -13);

    Trace.Write((char)code);
}

where input is the ROT-13 encoded text.

 

2 Responses to ROT13 – Unleash the unknown words!

  1. Williams Casarrubias says:

    Hullo, I wanted to “Like” this post but I guess I’ll just leave you a message. Sweet post.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent Tweets

Peacock for VS Code is *awesome*: bit.ly/peacock-vsc ~ quickly change the color of each workspace. Makes it ea… twitter.com/i/web/status/1… Retweeted by Mehdi Mousavi

Sponsors