Professional Documents
Culture Documents
Four-Square Cipher
Four-Square Cipher
SQUARE
CIPHER
Sibgha Saleem UET-02
Shanza Arooj UET-37
Arooba Masood UET-52
Introduction 01 03 Algorithm
2
INTRODUCTION
3
The algorithm of the four-
square cipher provides better
security than the Playfair
cipher and the two-square
cipher.
SECURITY
4
ALGORITHM ENCYPTION
1 2 3
There are four Grids and two The whole plaintext should Find the first letter of each pair in the
Keys. Top-Left and Bottom- be split into pairs. Each pair upper left table and the second letter
Right contain letters in should consist of two in the lower right table. Then, create a
the alphabetical order. In consecutive letters. If rectangle that covers over four tables.
Top-Right first fill secret required, a rare letter Q The letters are encrypted by replacing
key1 then all the other should be appended to them by another two letters, that are
alphabets. Bottom-Left with the original text. pointed by two other corners of the
secret key2. rectangle.
5
ALGORITHM DECRYPTION
1 2 3
There are four Grids and two The whole plaintext should Find the first letter of each pair in the
Keys. Top-Left and Bottom- be split into pairs. Each pair upper left table and the second letter
Right contain letters in should consist of two in the lower right table. Then, create a
the alphabetical order. In consecutive letters. rectangle that covers over four tables.
Top-Right first fill secret The letters are encrypted by replacing
key1 then all the other them by another two letters, that are
alphabets. Bottom-Left with pointed by two other corners of the
secret key2. rectangle.
6
EXAMPLE
● Pairs: HE LL OQ
● CipherText: NS CD CR
7
IMPLEMENTATION
8
REFRENCE
http://www.crypto-it.net/eng/
simple/four-square.html
9
THANK YOU