Anda di halaman 1dari 9

The rail fence cipher

The rail fence cipher is a form of transposition cipher that gets its name from the way in which it is
encoded. In the rail fence cipher, the plaintext is written downwards on successive "rails" of an
imaginary fence, then moving up when we get to the bottom rail and again. The message is then read
off in rows. For example, using eight "rails" ( key) and a message of MATHEMATICS ISNT ONLY
REAL BUT IT IS THE ONLY REALITY (Martin Gardner), the cipherer writes out:

T
A

N
T

S
H

I
E

S
M

C
A

I
T

T
O

S
N

I
L

T
Y

Y
E

T
O

U
R

B
E

L
A

I
N

L
L

A
Y

E
R

Then reads off:

MTTA NOSH YTSN IETH ILTO IESY UNLM CRBL AAIE LYET AR

Task:
Decode the following message, ciphered with a a rail fence code. The key is given by the number of
used rows (Key 8)
MSAA ODTS LLHI DRES AOMC SWAI TETH

The Carbonari
alphabet
The Carbonari alphabet was a
substitution cipher used by the
Carbonari, Italian secret society
founded in Naples in the early 19th
century, to deliver ciphered
messages during the Italian
Uprisings of 1830-31. The cipher
was based on the simple
substitution of letters.
We have to exchange the couples A/O, B/P, C/G, D/T, E/I, F/V, L/R, M/N, S/Z, except H, K, J, Q,
U, W, Y, X that remain the same.

ABCDEFGHIJKLMNOPQRSTUVWXYZ
||||||||||||||||||||||||||
OPGTIVCHEJKRNMABQLZDUFWXYS

Example:
Plaintext/original text
Mathematics is the result of mysterious powers which no one understands, and in which the
unconscious recognition of beauty must play an important part. Out of an infinity of designs a
mathematician chooses one pattern for beauty's sake and pulls it down to earth.

Encoded text
Nodhinodegz ez dhi lizurd av nyzdileauz bawilz whegh ma ami umtilzdomtz, omt em whegh dhi
umgamzgeauz ligacmedeam av pioudy nuzd broy om enbaldomd bold. Aud av om emvemedy av
tizecmz o nodhinodegeom ghaaziz ami boddilm val pioudyz zoki omt burrz ed tawm da ioldh.

Task 1
You have intercepted the following message encoded with the Carbonari alphabet. Can you decode
it?
Nodhinodegz hoz pioudy omt lanomgi. Edz mad o palemc brogi da pi, dhi nodhinodegor walrt.
Edz om ixdloaltemoly brogi; edz waldh zbimtemc deni dhili.

Task 2
You must send the following message. Cipher it with the Carbonari alphabet , so that no indiscreet
eyes will be able to understand it!
The essence of mathematics is its freedom. (Georg Cantor)

Our cipher
We have invented a simple cipher where some letters of the alphabet have been substituted with
numbers. Each equal number corresponds to an equal letter.

Task
Decode the following text in order to get to the original one:
I m l22king f2r fri3nd5. W41t d235 t41t m31n t1m3?"
"It i5 1n 1ct t22 2ft3n n3gl3ct3d," 51id t43 f2x. "It m31n5 t2 35t1bli54 ti35."
"T2 35t1bli54 ti35?"
"Ju5t t41t," 51id t43 f2x. "T2 m3, you 1r3 5till n2t4ing m2r3 t41n 1 littl3 b2y w42 is ju5t lik3
14undr3d t42u51nd 2t43r littl3 b2y5. 1nd I 41v3 n2 n33d 2f y2u. 1nd y2u, 2n y2ur p1rt, 41v3 n2
n33d 2f m3. T2 y2u I 1m n2t4ing m2r3 t41n 1 f2x lik3 1 4undr3d t42u51nd 2t43r f2x35. But if y2u
t1m3 m3, t43n w3 541ll n33d 31c4 2t43r. T2 m3, y2u will b3 uniqu3 in 1ll t43 w2rld. T2 y2u, I
541ll b3 uniqu3 in 1ll t43 w2rld....

ROUTE CIPHER
In a route cipher, the plaintext is first written out in a grid of given dimensions, then read off in a
pattern given in the key. For example, using the text: Pure mathematics is the poetry of logical
ideas (Albert Einstein), we could have:
P
U
R
E
M

A
T
H
E
M

A
T
I
C
S

I
S
T
H
E

P
O
E
T
R

Y
O
F
L
O

G
I
C
A
L

I
D
E
A
S

The key might specify "reading spiral inwards, counterclockwise, starting from top right". That
would give this cipher text:
IGYPIAAPUREMMSEROLSAEDIOOSTTHECHTLACFETI

Task:
decipher the following text using a grid sized 5 x 5
NUMBEEURYELESNSRRULEEVITH
Key: read spiral inwards, counterclockwise, starting from top left, after writing the words from top
to bottom in the columns.

Columnar transposition
In the columnar transposition the message is written along the grid rows of predetermined size and
then it is read out along the columns, according to a particular order. Both the line length and the
column permutation are defined by a keyword. For example, the word LACTOSE has7 letters (is
of length 7), so the rows will also be of length 7 and the permutation is defined by the alphabetic
order of the keyword letters. In this case the order would be 2-3-7-1-5-6-4 because the alphabetical
order of the letters in LACTOSE is ACELOST.
In code books with a regular columnar transposition the empty positions at the end of the last row
are filled with random characters, while in irregular ones they are left white. In the end, the message
is read in the columns in the order specified by the keyword. For example, supposing you are using
the keyword LACTOSE and the message Maths is the alphabet God wrote the Universe with, in a
regular columnar transposition, we would have this grid:

L
4
M
T
A
W
E
S

A
1
A
H
B
R
U
E

C
2
T
E
E
O
N
W

T
7
H
A
T
T
I
I

O
5
S
L
G
E
V
T

S
6
I
P
O
T
E
H

E
3
S
H
D
H
R
Y

AHBRUE TEEONW SHDHRY MTAWES SLGEVT IPOTEH HATTII


KEY WORD: LACTOSE

Task:
the following message has been encoded with a regular columnar transposition cipher. Decipher it
using the keyword HOTMAIL:

SINSSSTQ MTEHRXOT IGDTESRZ SHTPEIUL HHAOIEFY AHSEEPNH TEMCROW

SOLUTIONS
The rail fence cipher

1. Mathematics is as old as the world.


The Carbonari alphabet
1. Mathematics has beauty and romance. It's not a boring place to be, the mathematical world. It's
an extraordinary place; it's worth spending time there.

2. DHIIZZIMGIAVNODHINODEGZEZEDZVLIITAN
Our Cipher
1. a=1; o=2;e=3;h=4;s=5

I am looking for friends. What does that mean -- tame?"


"It is an act too often neglected," said the fox. "It means to establish ties."
"To establish ties?"
"Just that," said the fox. "To me, you are still nothing more than a little boy who is just like a
hundred thousand other little boys. And I have no need of you. And you, on your part, have no need
of me. To you I am nothing more than a fox like a hundred thousand other foxes. But if you tame
me, then we shall need each other. To me, you will be unique in all the world. To you, I shall be
unique in all the world....
Antoine de Saint-Exupry, The Little Prince

Route Cipher
1.

N
U
M
B
E

R
R
U
L
E

"Number rules the universe. (Pythagoras)

S
T
H
E
U

N
I
V
E
R

S
E
L
E
Y

Columnar transposition
1.

H
2
M
T
E
H
R
X
O
T

O
6
A
H
S
E
E
P
N
H

T
7
T
E
T
M
C
R
O
W

M
5
H
H
A
O
I
E
F
Y

A
1
S
I
N
S
S
S
T
Q

I
3
I
G
D
T
E
S
R
Z

MATHS IS THE HIGHEST AND THE MOST PRECISE EXPRESSION OF TRUTH

L
4
S
H
T
P
E
I
U
L

Anda mungkin juga menyukai