Categories of Ciphers

Download Report

Transcript Categories of Ciphers

Categories of Ciphers



Substitution ciphers - replace letters in
the plaintext with other letters or symbols,
keeping the order in which the symbols fall
the same.
Transposition ciphers - keep all of the
original letters intact, but mix up their
order.
Use both methods, one after the other, to
further confuse an unintended receiver as
well.
Substitution Ciphers


Substitution ciphers could properly
be called codes in most cases
Standard Public Codes
• Morse code, shorthand, ASCII code

Secret Codes
• Captain Midnight Decoder Ring
• Julius Caesar’s secret code
"encoder" ring/ Caesar’s
code






Uses two concentric wheels of letters, A to Z.
Rotate outside ring and substitute the letters in
your message found on the outside ring with
the letters directly below on the inside ring.
Algorithm - offset the alphabet using a key
(number of characters to offset it).
Julius Caesar used this simple scheme,
offsetting by 3 characters
Example: "EXPLORATORIUM"
Answer: "HASORUDWRULXP"
Another Substitution
Code

Little tougher to decode: Randomly assign
a code to each letter.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
QWERTYUIOPASDFGHJKLZXCVBNM

Example:
“MEET ME AFTER SCHOOL BEHIND THE GYM.”

Answer:
“DTTZ DT QYZTK LEIGGS WTIOFR ZIT UND.”
Tricks to breaking code

Word lengths - especially the short words - give
great clues as to the nature of the code (see
frequency charts).
Example: Cryptoquip puzzles
To help conceal your message, ignore the
spaces and break the message up into equalsized chunks.
Five letters are customary in the spy biz

Example: DTTZD TQYZT KLEIG GSWTI OFRZI TUNDM



diagrammatic cipher

Used by many children in school,
substitutes symbols for letters
instead of other letters.
ABCDEFGH IJK LMNOPQR STUVWXYZ
abcdef ghijkmnopqr


stuvwxyz
Easier to remember than 26 randomly
picked letters.
Example:
Meet
me
after
schoo behind the
gym
Frequencies




An arm-chair cryptologist would take less
than 10 minutes to figure out the outer-space
alien text. Why?
Given enough ciphertext, certain patterns
become obvious.
Notice how often eappears: 6 times out of 29
characters (about 20% of the time).
The eis almost certainly the symbol for "E,"
the most frequently used letter in English.
Francis Bacon’s secret
code



Uses two different type faces slightly
differing in weight (boldness).
Break up ciphertext into 5 character groups,
each of which would represent one
character in plaintext.
Depending on which characters of the group
were bold, one could determine the plaintext
character using the following table (* stands
for a plain character and B for a bold
character)
Francis Bacon’s code

Secret Code
A=*****
B=****B
C=***B*
D=***BB
E=**B**
F=**B*B
G=**BB*
H=**BBB
I=*B***
J=*B**B
K=*B*B*
L=*B*BB
M=*BB**
N=*BB*B
O=*BBB*
P=*BBBB
Q=B****
R=B***B
S=B**B*
T=B**BB
U=B*B**
V=B*B*B
W=B*BB*
X=B*BBB
Y=BB***
Z=BB**B
Francis Bacon’s code

Secret Message:
To be or not to be that is the question. Whether 'tis nobler in the
mind to suffer the slings and arrows of outrageous fortune or to
take arms against a sea of troubles and by opposing end them?

Decoded:
M
E
E
T
M
E
B
E
H
I
N
Tobeo rnott obeth atist heque stion Wheth ertis noble rinth emind
D
T
H
E
G
Y
M
A
F
T
E
tosuf ferth eslin gsand arrow sofou trage ousfo rtune ortot akear
R
S
C
H
O
O
L
msaga insta seaof troub lesan dbyop posin gendt hem
Transposition ciphers



Original letters are kept intact, but
rearranged in some way.
oo-day oo-yay ow-knay ig-pay atin-lay?
Scytale : Spartans in 5th century B.C
• Uses a cylinder with a ribbon wrapped helically
around it from one end to the other.
• The message was written across the ribbons, and
then unwrapped from the cylinder.
• Someone with an identical diameter cylinder
could re-wrap and read the message.




The scytale depended on a piece of hardware,
the cylinder, which could be stolen or broken.
It would be better if the method were
completely "intellectual" and could be
remembered and used without resorting to a
physical device.
Both the sender and receiver must use this
algorithm for enciphering and deciphering.
Geometrical figures serve as the basis for a
whole class of transposition ciphers.
Transcription Code

Let's put our message into
the shape of a box. Since
there are 29 characters, we'll
add a dummy ("O") to make
30 and write the message in
a six by five box.
M
A
C
E
H
E
F
H
H
E
E
T
O
I
G
T
E
O
N
Y
M
R
L
D
M
E
S
B
T
O
• We can now transcribe
the message by moving
down the columns
instead of across the
rows.
MACEH EFHHE ETOIG
TEONY MRLDM ESBTO
•You don't have to write
your plaintext into the
box row by row
columnar transposition



Think of a secret key word. Example: “SECRET”.
Write it above the columns of letters in the square.
Number the letters of the key word in alphabetical
order. (If there are duplicate letters, like the "E", they are
numbered from left to right.)
5
S
M
A
C
E
H
2
E
E
F
H
H
E
1
C
E
T
O
I
G
4
R
T
E
O
N
Y
3
E
M
R
L
D
M
6
T
E
S
B
T
O
• Now write the columns down in
the order indicated by the numbers.
The result:
ETOIG EFHHE MRLDM TEONY
MACEH ESBTO