Back to blog list Atbash cipher

The ADFGVX cipher

The ADFGVX cipher was a cipher developed by Germany in 1918 for World War I. It is a fractionating transposition cipher which combined a modified Polybius square with a single columnar transposition. The cipher just uses the letters A, D, F, G, V and X (because at the time those letters were very different in morse code). By using some simple matrix operations, the cipher encrypts the plaintext.





CIPHERTEXT:

MORSE CODE:

POLYBIUS SQUARE:




Matrix

The cipher works by making a 6x6 matrix that looks up the letters and encodes them by the adfgvx values.

A polybius square is a device used for fractionating plaintext characters. It's a sort of lookup table and it the foundation of the adfgvx cipher. ADFGVXAOTRF37DB6XKZIFU6XKZEGQPMHGSVS0J9ALX8YZWND

By looking up these letters on the table above and looking at their ADFGVX letter at the row, then column a string twice the size of the original message

The Keyword

By looking up the word "hello", I get the array of characters [[GG],[FX],[VX],[VX],[AA]]

The keyword is any word that would be used to rearrange the characters. In this example we'll use "WAFFE", or weapon in German.

WAFFEGGFXVXVXAA

This new matrix is rearranged alphabetically (AEFFW) along with each letter's respective column. By doing so the letters are rearranged once again.

AEFFWGVFXGVAXAX

In the program the above was done by transposing the matrix and then sorting the arrays alphabetically, then transposing the matrix once again.

Once we reach this final matrix, we get the code by reading the columns.

GVVAFXXAGX is the final ciphertext.






Thanks for visiting this website! I'm Vedu, a senior at Northview High School in Johns Creek, GA. If you have any questions please feel free to contact me.
I look forward to writing more posts here! ✌🏼


🔗 Check out these other links 🔗

Bio

Résumé

Contact