1. Three Square Cipher encoder
Text : ABCD efghi
Key1 : one
Key2 : two
Key3 : three
Padding Character : zSolution:The Three Square Cipher is a digraph substitution cipher, which uses three grids to enctypt the message
Key1 = oneabcdfghiklmpqrstuvwxyz
Key2 = twoabcdefghiklmnpqrsuvxyz
Key3 = threabcdfgiklmnopqsuvwxyz
Grid-1 | 1 | 2 | 3 | 4 | 5 |
| 1 | o | n | e | a | b |
| 2 | c | d | f | g | h |
| 3 | i | k | l | m | p |
| 4 | q | r | s | t | u |
| 5 | v | w | x | y | z |
Grid-2 | 1 | 2 | 3 | 4 | 5 |
| 1 | t | w | o | a | b |
| 2 | c | d | e | f | g |
| 3 | h | i | k | l | m |
| 4 | n | p | q | r | s |
| 5 | u | v | x | y | z |
Grid-3 | 1 | 2 | 3 | 4 | 5 |
| 1 | t | h | r | e | a |
| 2 | b | c | d | f | g |
| 3 | i | k | l | m | n |
| 4 | o | p | q | s | u |
| 5 | v | w | x | y | z |
Plaintext = abcdefghi
Split into pairs of letters (digraphs)Pairs : ab cd ef gh i
Pad at end, if necessaryIf one letter is left at the end, then pad to make it pair
Pairs : ab cd ef gh iz
Encryption : ab `=` a(G1,r1,c4), b(G2,r1,c5) `=>` a(G1,r1,c4), a(G3,r1,c5), t(G2,r1,c1) `=` aat
cd `=` c(G1,r2,c1), d(G2,r2,c2) `=>` o(G1,r1,c1), c(G3,r2,c2), c(G2,r2,c1) `=` occ
ef `=` e(G1,r1,c3), f(G2,r2,c4) `=>` e(G1,r1,c3), e(G3,r1,c4), c(G2,r2,c1) `=` eec
gh `=` g(G1,r2,c4), h(G2,r3,c1) `=>` a(G1,r1,c4), b(G3,r2,c1), h(G2,r3,c1) `=` abh
iz `=` i(G1,r3,c1), z(G2,r5,c5) `=>` o(G1,r1,c1), n(G3,r3,c5), u(G2,r5,c1) `=` onu
| Plaintext | : abcdefghiz |
| Ciphertext | : aatocceecabhonu |
2. Three Square Cipher encoder
Text : hello world
Key1 : one
Key2 : two
Key3 : three
Padding Character : zSolution:The Three Square Cipher is a digraph substitution cipher, which uses three grids to enctypt the message
Key1 = oneabcdfghiklmpqrstuvwxyz
Key2 = twoabcdefghiklmnpqrsuvxyz
Key3 = threabcdfgiklmnopqsuvwxyz
Grid-1 | 1 | 2 | 3 | 4 | 5 |
| 1 | o | n | e | a | b |
| 2 | c | d | f | g | h |
| 3 | i | k | l | m | p |
| 4 | q | r | s | t | u |
| 5 | v | w | x | y | z |
Grid-2 | 1 | 2 | 3 | 4 | 5 |
| 1 | t | w | o | a | b |
| 2 | c | d | e | f | g |
| 3 | h | i | k | l | m |
| 4 | n | p | q | r | s |
| 5 | u | v | x | y | z |
Grid-3 | 1 | 2 | 3 | 4 | 5 |
| 1 | t | h | r | e | a |
| 2 | b | c | d | f | g |
| 3 | i | k | l | m | n |
| 4 | o | p | q | s | u |
| 5 | v | w | x | y | z |
Plaintext = helloworld
Split into pairs of letters (digraphs)Pairs : he ll ow or ld
Encryption : he `=` h(G1,r2,c5), e(G2,r2,c3) `=>` b(G1,r1,c5), d(G3,r2,c3), c(G2,r2,c1) `=` bdc
ll `=` l(G1,r3,c3), l(G2,r3,c4) `=>` e(G1,r1,c3), m(G3,r3,c4), h(G2,r3,c1) `=` emh
ow `=` o(G1,r1,c1), w(G2,r1,c2) `=>` o(G1,r1,c1), h(G3,r1,c2), t(G2,r1,c1) `=` oht
or `=` o(G1,r1,c1), r(G2,r4,c4) `=>` o(G1,r1,c1), e(G3,r1,c4), n(G2,r4,c1) `=` oen
ld `=` l(G1,r3,c3), d(G2,r2,c2) `=>` e(G1,r1,c3), k(G3,r3,c2), c(G2,r2,c1) `=` ekc
| Plaintext | : helloworld |
| Ciphertext | : bdcemhohtoenekc |
This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then