in cryptography, the adfgvx cipher was a field cipher used by the german army on the western front during world war i. adfgvx was in fact an extension of an earlier cipher called adfgx. invented by colonel fritz nebel and introduced in march 1918, the cipher was a fractionating transposition cipher which combined a modified polybius square with a single columnar transposition. == nomenclature == the cipher is named after the six possible letters used in the ciphertext: a, d, f, g, v and x. these letters were chosen deliberately because they sound very different from each other when transmitted via morse code. the intention was to reduce the possibility of operator error. nebel designed the cipher to provide an army on the move with encryption more convenient than trench codes but still secure. in fact, the germans believed the adfgvx cipher was unbreakable. == operation of adfgx == suppose we need to send the plaintext message, "attack at once". first, a secret mixed alphabet is filled into a 5 &times; 5 polybius square, like so: {| ! !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 |} i and j have been combined, to make the alphabet fit into a 5 &times; 5 grid. using this square, the message is converted to fractionated form: a t t a c k a t o n c e af ad ad af gf dx af ad df fx gf xf next, the fractionated message is subject to a columnar transposition. we write out the message in rows under a transposition key (here, "cargo"): c a r g o _________ a f a d a d a f g f d x a f a d d f f x g f x f next, we sort the letters alphabetically in the transposition key (changing cargo to acgor), rearranging the columns beneath the letters along with the letters themselves: a c g o r _________ f a d a a a d g f f x d f a a d d f x f f g f x then it is read off in columns, in keyword order, yielding the ciphertext: faxdf adddg dgfff afax afafx in practice, the transposition keys were about two dozen characters long. long messages sent in the adfgx cipher were broken into sets of messages of different and irregular lengths, thus making it invulnerable to multiple anagramming. both the transposition keys and fractionation keys were changed daily. == adfgvx == in june 1918, an additional letter, v, was added to the cipher. this expanded the grid to 6 &times; 6, allowing 36 characters to be used. this allowed the full alphabet (instead of combining i and j), plus the digits from 0 to 9. this mainly had the effect of considerably shortening messages which contained a large number of figures. the cipher is based on the 6 letters adfgvx. a table contain
Classical_ciphers