reading-notes

Encryption, decryption, and cracking

Encrypting a message

Caesar Cipher is a simple substitution cipher that replaces each original letter with a different letter in the alphabet by shifting an alphabet by a certain amount. To convert a specific message, change the alphabet by the number of Alphabetical offset that alrady used and use the replacement table.

A G
B H
C I
D J
E K
F L
G M
H N
I O
J P
K Q
L R
M S
N T
O U
P V
Q W
R X
S Y
T Z
U A
V B
W C
X D
Y E
Z F

Decrypting a message

According to historical records, Caesar always used a rosette of 3 .

A D
B E
C F
D G
E H
F I
G J
H K
I L
J M
K N
L O
M P
N Q
O R
P S
Q T
R U
S V
T W
U X
V Y
W Z
X A
Y B
Z C

image

Cracking the cipher

To decode when you don’t know rosy blonde key techniques: Frequency analysis, plain text, and brute force.

Frequency analysis

Some of the world’s languages ​​tend to use some characters more than others. You can analyze the frequency of characters in the message, determine the most likely specific character, and narrow the conversion amounts accordingly.

Known plaintext

Another term for the original, unencrypted message is plaintext. If the enemy already knows the plaintext, it will be easy for them to decipher the rest of the code. For example, messages tend to start with similar beginnings. In WWII, encrypted German messages always started with a weather forecast, which ultimately made them easier for British mathematician Alan Turing to crack.

Brute force

In general, there are only 255 possible spells. The enemy may take time to experience a message and find a reasonable one. They can try just a word or two. Caesar’s enemy wouldn’t have a computer to help them, but it likely would take them less than an hour if they understood the idea of the Caesar Cipher.

The distribution of letters in a typical sample of English language text has a distinctive and predictable shape. A Caesar shift “rotates” this distribution, and it is possible to determine the shift by examining the resultant frequency graph.

image