Home > College Algebra > Ciphers > ADFGX Cipher (encoder / decoder) example

3. ADFGX Cipher (encoder / decoder) example ( Enter your problem )

1. Examples





1. ADFGX Cipher encoder

Text : ABCD efghi
Key : key
Alphabet25 : abcdefghiklmnopqrstuvwxyz


Solution:
The ADFGX Cipher is a combination of modified polybius square with columnar transposition. It uses five letters A,D,F,G,X

Alphabet : abcdefghiklmnopqrstuvwxyz

Build the square:
Fill the 5x5 square row by row by Alphabet : abcdefghiklmnopqrstuvwxyz
and labeling both rows and columns with adfgx
adfgx
aabcde
dfghik
flmnop
gqrstu
xvwxyz

Fractionate the plaintext
Remove all the symbols except available in the square.
Each character is replaced by its row and column labels, producing a stream of adfgx pairs.
This step turns the Text into fractionated form
Plaintextabcdefghi
Pairsaaadafagaxdadddfdg

Apply the columnar transposition on fractionated message
columnar transposition steps :

Write the plaintext in row-by-row
k
2
e
1
y
3
aaa
daf
aga
xda
ddd
fdg

The columns are sorted alphabetically, based on the keyword and the new table is
e
1
k
2
y
3
aaa
adf
gaa
dxa
ddd
dfg

Read the ciphertext in column-by-column
aagddd,adaxdf,afaadg

Plaintext : aaadafagaxdadddfdg
Key : key
Ciphertext : aagdddadaxdfafaadg

Plaintext : abcdefghi
Key : key
Ciphertext : aagdddadaxdfafaadg

2. ADFGX Cipher encoder

Text : hello world
Key : code
Alphabet25 : abcdefghiklmnopqrstuvwxyz


Solution:
The ADFGX Cipher is a combination of modified polybius square with columnar transposition. It uses five letters A,D,F,G,X

Alphabet : abcdefghiklmnopqrstuvwxyz

Build the square:
Fill the 5x5 square row by row by Alphabet : abcdefghiklmnopqrstuvwxyz
and labeling both rows and columns with adfgx
adfgx
aabcde
dfghik
flmnop
gqrstu
xvwxyz

Fractionate the plaintext
Remove all the symbols except available in the square.
Each character is replaced by its row and column labels, producing a stream of adfgx pairs.
This step turns the Text into fractionated form
Plaintexthelloworld
Pairsdfaxfafafgxdfggdfaag

Apply the columnar transposition on fractionated message
columnar transposition steps :

Write the plaintext in row-by-row
c
1
o
4
d
2
e
3
dfax
fafa
fgxd
fggd
faag

The columns are sorted alphabetically, based on the keyword and the new table is
c
1
d
2
e
3
o
4
daxf
ffaa
fxdg
fgdg
faga

Read the ciphertext in column-by-column
dffff,afxga,xaddg,fagga

Plaintext : dfaxfafafgxdfggdfaag
Key : code
Ciphertext : dffffafxgaxaddgfagga

Plaintext : helloworld
Key : code
Ciphertext : dffffafxgaxaddgfagga





This material is intended as a summary. Use your textbook for detail explanation.
Any bug, improvement, feedback then Submit Here





Share this solution or page with your friends.
 
 
Copyright © 2026. All rights reserved. Terms, Privacy
 
 

.