Showing posts with label cryptology. Show all posts
Showing posts with label cryptology. Show all posts

14 May 2011

How to Hide Secret Messages in Noise

13 May 2011

Cryptology: Ottendorf Cypher

An Ottendorf cypher or a book cypher is a cypher written with three numbers and the key is a specific document, usually a book (the bible or a dictionary are often used). The first letter refers to the page number, the second to the line number, and the third to either the number of the letter or word in that line. If it is the word, then it is technically a code.

The book used by both parties needs to be exactly the same, even the same edition.

It's best not to use the same number sequence for the same letter or word. If "76-26-16" is an e, don't use it for all of the es, because a third party could see the repetition of that sequence and guess what letter it is (there are plenty of es to choose from!).

In popular culture, it has been used in National Treasure (2004) with Nicholas Cage. The cypher was on the back of the Declaration of Independence and the key was the Silence Dogood letters. It also appears in quite a few other books and movies.

Ex.

PG 1: The quick | brown fox, PG2 jumped over | the lazy dog.

2-2-8
1-2-3
2-2-7
2-1-6
2-1-2
2-2-10
1-1-3
1-1-1
1-1-6
2-2-1

- DO YOU GET IT

Cryptology: Transposition Cyphers

pukipuki puki transposition cypher cipher banner

Opposite the substitution cypher is the transposition cypher. In this cypher none of the plaintext letters are changed, but, rather, they are rearranged according to a system.

The simplest form of transposition cypher is flipping the message backwards: So, "Einstein's theory of relativity states that light always travels at the same speed, regardless of an individual's frame of reference." becomes ".ecnerefer fo emarf s'laudividni na fo sseldrager ,deeps emas eht ta slevart syawla thgil taht setats ytivitaler fo yroeht s'nietsniE". (If you're lazy like I am, you can find online converters; there's also this nifty one that reverses the whole thing, words, or flips it upside down.) You can rearrange the letters in groups of a certain number and take out grammatical marks so it looks like another cypher ("ECNE REFE RFOE MARF SLAU DIVI...") or make it so it looks harry potter jk rowling mary grandpre mirror or erisedlike another language ("Ecne refer foem arfs laudi vidni na fos sel drager...").

An example of reversed text being used in popular culture is its use in Harry Potter and the Philosopher's Stone by JK Rowling: "Erised stra ehru oyt ube cafru oyt on wohsi" appears on The Mirror of Erised.

There are other forms of transposition cyphers, however, such as the rail fence cypher and the twisted path cypher.

* * *

The rail fence cypher breaks up the cypher by taking every-other letter and separating them. If the message is very long, it can be broken up into different sections.

pukipuki georgia rail fence cipherEx. AN OBJECT IN MOTION REMAINS IN MOTION UNLESS ACTED ON BY AN OUTSIDE FORCE.

If your statement is not a multiple of four, add null letters (or dummy letters) so that it is. We're in luck, though, as the above statement has sixty letters.

Then divide the text by a certain number (we're using sixteen):

AN OBJECT IN MOTION | REMAINS IN MOTION U | NLESS ACTED ON BY AN | OUTSIDE FORCE

Take the first section and separate it by every-other letter:

A O J C I M T O
 N B E T N O I N


Then take the bottom letters and move them to the end of the top letters:

AOJC IMTO NBET NOIN

Repeat this for all the sections and put them together.

http://www.flickr.com/photos/ai-momo/4955322375/AOJC IMTO NBET NOIN RMIS NOIN EANI MTOU NESC EOBA LSAT DNYN OTIE OCUS DFRE

To decypher, group them in numbers of sixteen letters, and count every other:

AOJC IMTO | NBET NOIN
First group, second group
Odd numbers, even numbers

A O J C I  M  T  O | N B E T  N  O  I  N
1 3 5 7 9 11 13 15 | 2 4 6 8 10 12 14 16


Then put them in order and repeat for each segment.

* * *

The twisted path cypher uses an empty cell matrix. You write your message inside and take the letters from an agreed-upon path.

Ex. AN OBJECT AT REST REMAINS AT REST UNLESS ACTED ON BY AN OUTSIDE FORCE.

I'm using a seven-by-eight matrix for this, because there are fifty-six letters.

twisted path cypher cipher matrix

Write your letters in the manner agreed upon. This is just across from left to right.

twisted path cypher cipher matrix

And then take the letters from the agreed-upon path.

twisted path cypher cipher matrix

So, you get "ANOB JECT ERSN SECR OFED IBSE MATR ESTR TEOT UONA YASA INSA LDET CTUN."
pukipuki puki georgia panpipes pan flute twisted path cipher

Cryptology: The Substitution and Shift Cyphers


In a substitution cypher, the letters of the message are substituted by other letters or symbols, but the letters of the message are never rearranged.

A simple substitution cypher exchanges one letter for one letter. When using more letters, it is a polygraphic substitution cypher.

A monoalphabetic cypher is a cypher that has a fixed substitution: So, plaintext a is always equivalent to cyphertext b, plaintext b always becomes cyphertext c, &c. Whereas in a polyalphabetic cypher, the plaintext letter could be a number of letters: Plaintext a could be cyphertext b, c, or d, plaintext b could be cyphertext c, d, or e, &c.

Often times, the message is made to be grouped by four letters, so as not to help those unintended to view the message with decyphering it by word length and other patterns. Other letter groups could be used, but four is most common. If the last group is not complete, null letters are added.

To help prevent decyphering, elimination of grammatical marks is also common (no apostrophes or periods, &c.).
espionage, cypher, cipher wheel, alberti disc, disk
A shift cypher is a kind of substitution cypher. It is what it sounds like: You shift the alphabet to replace plaintext letters. Imagine the alphabet all in one line. Then imagine a second one below it. The top is the plaintext, the bottom the cyphertext. Now shift the second line, -- the cyphertext, -- a certain number of letters.

Starting position:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
ABCDEFGHIJKLMNOPQRSTUVWXYZ

Now shift 5:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
FGHIJKLMNOPQRSTUVWXYZABCDE

So, "SCREW YOUR COURAGE TO THE STICKING PLACE" becomes "XHWJB DTZW HTZWFLJ YT YMJ XYNHPNSL UQFHJ."

pukipuki, julius caesar, death, et tu, brute, mu filiThe shift cypher is also commonly called the Caesar cypher, after the Roman emperor Julius Caesar, who reportedly used a shift of three to protect messages of military importance. Many believe he created the cypher, but we can't be sure, though he is the first we have found to have used it. (It's possible it was "invented" twice, since it's such a simple cypher.) It's a very easy cypher to crack, but it seems it was quite affective at the time.

* * *

Monoalphabetic example:
WGBP FWPM SGNM MCIG FNBO MQPD CCES.

This cypher is created using a password: PRINCESS TOADSTOOL

The two words are put together (PRINCESSTOADSTOOL) and repeat letters are taken out (PRINCESTOADL). After this, the rest of the alphabet is added (PRINCESTOADLBFGHJKMQUVWXYZ). Place this under the plaintext alphabet:

ABCDEFGHIJKLMNOPQRSTUVWXYZ
PRINCESTOADLBFGHJKMQUVWXYZ


That is the key: The top is plaintext, the bottom cyphertext. To encode a message: Look for your letter on the top, then it becomes the letter below it (K = D, Z = Z). To decypher, look for the letter on the bottom, and it's equivalent is on the top (F = N, N = D).

mario green mushroomYou should get the message "WOMAN WAS GOD'S SECOND MISTAKE."
* * *

Polyalphabetic example:
VHXP IFWS MDEM JYEC DRZY.

This is a Vigenère cypher. It is like you have multiple shift cyphers. Usually, a password is used, in this case it is "CAT."

Write out the plaintext alphabet, then add three cyphertext alphabets, each arranged according to the letters in the password (in the first C = A, in the second A = A, and in the final one T = A; or shift 3, shift 0, shift 20). In this cypher, you don't have to take out repeat letters in the password (you can if you want to).

ABCDEFGHIJKLMNOPQRSTUVWXYZ

CDEFGHIJKLMNOPQRSTUVWXYZAB
ABCDEFGHIJKLMNOPQRSTUVWXYZ
TUVWXYZABCDEFGHIJKLMNOPQRS


It is decyphered like above, except you keep going through the cyphertext alphabets in turn. You should get "THEN I MUST BE THY LADY."
pukipuki, midsummer night's dream, william shakespeare, what, jealous oberon?

Cryptology/Steganography: Null Cyphers/Acrostics

pukipuki georgia null cipher

"Null" comes from the Latin word nūllus, meaning not any. It is a word that means without value, amounting to nothing, nil, lacking, nonexistent; zero. In cryptology it is something that is useless when it comes to decoding the message, and is often times used to throw others off the right track to decyphering the message. It can be pretty much anything, but is most often random letters, or sometimes words.

pukipuki georgia at museum contemplating encrypted pictureEx. Monoalphabetic substitution/shift cypher:

XFBS FPGG UPTF FUIF XJAB SEXY

This is split into sections of four letters each so word length won't give it away. It's actually quite easy: To get the plaintext (the message intended for the recipient), just take the letter in the alphabet before the cyphertext (the encoded message). So A = Z, B = A, C = B, &c.

The null letters are X and Y. It works out well that the last four letters actually spell a word, because that can also throw people off the real message.

A null cypher is a cypher where the plaintext is hidden in a lot of material unrelated to the message. It is not only a cypher, but a form of steganography as well.

pukipuki georgia null cypherSteganography is, in essence, the art and study of hidden messages. Whereas cyphers are obviously secret messages (DPXT), steganographic messages are hidden, either as a cypher or not (Catherine objects whatever's said), and should not be obvious. Invisible ink is a good example: It's invisible, -- hidden. The message written in invisible ink can then be plaintext or cyphertext. (COWS)

Acrostics, in poetry, is where each line's first letter spells out a word or message. This is one of the most common forms of null cyphers. In poetry, often the message is intended to be known, but, of course, for a null cypher that intention is reversed.

You can, of course, mix it up a bit and take the second, third, last, &c. letter of every word, or take certain letters at specific distances apart to try and hide your message better. If no one but the recipient knows to take the first letter of the first word, the fifth letter of the second, the second of the third, and the fourth of the fourth, &c. then your message is pretty well hidden.

alias season two episode nineteen endgame russiaThis method of encryption is called acrostic cypher (which makes too much sense, if you ask me). It was featured in JJ Abrams's television show "Alias," but was called "skip sequence cyphertext" (season two, episode nineteen: Endgame). Aside from modern uses, it became quite popular in the Renaissance period of Europe and was used in many forms of literature.

pukipuki georgia null cypher diary

Cryptology: Pigpen Cypher

pigpen cypher / freemason's cipher, common method, click for full sizeOne of the easiest cyphers out there is the Pigpen Cypher (left, click for full size), also know as the Freemason's Cypher, the Masonic Cypher, and the Rosicrucian Cypher.

freemason's symbolThe origins of this cypher are unknown, but there are records of it dating back to the 1700s. The Rosicrucian brotherhood and the Freemasons were among those to use it most (to our knowledge); the Freemasons so much so that it is frequently referred to as the "Freemason's Cypher."

pigpen cipher, variation, click for full sizeThere are a number of variations of the cypher, some of which rearrange the letters randomly (to make it more difficult to crack), some of which rearrange the grids (##XX , #X#X , &c.), and others which use multiple dots rather than multiple grids (left, click for full view; A = 1 dot, B = 2 dots, C = 3 dots, D = 1 dot, &c.).




pukipuki georgia with freemason's cipher, click for full view