Cryptography Assignment
Cryptography Assignment
Substitution Cipher
Overview
Operational Framework
H -> I
E -> T
L -> S
O -> G
Security
The Polybius Square cipher is a substitution cipher that uses a 5x5 grid
filled with letters to encrypt the plaintext. Invented by an ancient Greek
historian and scholar Polybius.
Working Principle
1. Create a 5x5 grid and fill it with the alphabet, typically combining 'I'
and 'J' to fit 25 letters.
1 2 3 4 5
1 A B C D E
2 F G H I/J K
3 L M N O P
4 Q R S T U
5 V W X Y Z
H----23
E----15
L----31
L----31
O---34
Ciphertext: 2315313134
Caesar Cipher
Introduction
Julius Caesar is credited with creating the Caesar cipher, a kind of
substitution cipher that he allegedly used to communicate with his
officials. Among the most popular and straightforward encryption methods
is this one.
Operational Concept
Security
Frequency analysis can help break the Caesar encryption. It can also be
readily broken by brute force because there are only 25 potential shifts.
Plaintext: "HELLO"
Rot13: "URYYB"
Plaintext H E L L O
:
Numeric: 7 4 11 11 14
Shift 20 17 24 24 1
+13:
Cipherte U R Y Y B
xt:
Transposition Cipher
Overview
A transposition cipher, sometimes referred to as a permutation cipher, is
an encryption technique in which the ciphertext is created by shifting the
plaintext's character locations in accordance with a predetermined
scheme. Transposition ciphers, in contrast to substitution ciphers, change
the locations of the characters in the message rather than the characters
themselves.
Operational Concept
In the Rail Fence cipher, the plaintext is written in a zigzag pattern across
multiple rows and then read row by row to create the ciphertext.
R O
E H U E
D S
Rail 1:RO
Rail 2: EHUE
Rail 3: DS
Ciphertext: ROEHUEDS
T b Rail 1: TB
h s l
Rail 2: HSL
e i u
s y e Rail 3: EIU
k
Rail 4: SYE
Ciphertext: TBHSLEIUSYEK
Rail 5: K
With the use of a key that dictates the sequence in which columns are
read and a predetermined number of columns, the Columnar Transposition
cypher reorganizes the characters in the plaintext.
Operational Concept
- Plaintext into a Grid: The length of each column in the plaintext grid
corresponds to the length of the keyword.
- Go through the columns sequentially: To produce the ciphertext, the
columns are read in the sequence that the keyword specifies.
For this example, let's utilize the term "KEY". Firstly, we arrange the
keyword in numerical order:
K -> 2
E -> 1
Y -> 3
K E
Y
R E D
H O U
S E
Based on the numerical sequence obtained from the keyword (2, 1, 3), we
will use the following columns:
Column 1 (E): E, O, E
Column 2 (K): R, H, S
Column 3 (Y): D, U,