ADFGX is a transpotion cypher that uses a secret alphabet and a key to encrypt a plain-text message.
In order to encrypt a message, a Polybius square with columns and rows titled
ADFGX is filled with the secret alphabet. In this case we use the alphabet
A D F G X A b t a l p D d h o z k F q f v s n G g j c u x X m r e w y
j are combined in order to make the alphabet fit into a grid.
The plain-text message, supposed
no square is then looked-up in the square and the row and column titles are written two letters at a time:
n o s q u a r e FX DF FG FA GG AF XD XF
For the second step a key is used, for example the key
CLOVER, and the letters are arranged row-by-row:
C L O V E R ----------- F X D F F G F A G G A F X D X F
In the next step, the columns are sorted in alphabetical order by the letters of the key:
C E L O R V ----------- F F X D G F F A A G F G X D X F
and the letters are read out in columns, yielding the cypher-text
FFX FA XAD DGX GF FGF.
In order to decrypt, the key has to be known as well as the chosen alphabet and if those are known, then the reverse operation can be performed to obtain the plain-text.