Skip to content

Extended Group Autokey (XGAK)

Lymm edited this page Dec 24, 2025 · 3 revisions

Extended group autokey (XGAK) ciphers are an extension of group autokey (GAK) ciphers which, in terms of ciphertext alphabet permutations, are able to select different letters from the alphabet at each step depending on the plaintext alphabet letter that was used. In terms of a deck implementation, GAK always outputs the top card of the deck, while XGAK is able to output cards in different positions, and is able to use the same permutation for multiple cards. Every plaintext letter has to have a fixed permutation which it applies to the deck, and a fixed position in the deck to output. To ensure reversibility, the outputs from an unshuffled deck have to be unique for every plaintext letter, similar to a normal deck cipher.

Like GAK ciphers, this kind of cipher consistently produces isomorphs for repeated plaintext sequences, so it is perfectly isomorphic. It's fairly easy to choose the plaintext mapping to ensure doubles will always be avoided. An example of how to do this from a deck perspective is to have all the output card indices near the top of the deck, and consider those cards effectively "discarded" until the next step by moving them to the back of the deck and having all other cards moved by the permutations not move any of those cards back to the front. And like GAK, this kind of cipher produces chaining conflicts when the group generated by the PT permutations is non-commutative.

Based on these properties, XGAK is a good candidate cipher method for the eyes, however so is GAK, so based on Occam's razor, we're choosing not to look too closely into XGAK at the moment, since it's just more complicated and there aren't currently any properties of the eyes that require XGAK vs. just GAK to be explained.

This is the last known cipher class in the isomorphic cipher hierarchy that is within the perfectly isomorphic region. It's currently unknown whether or not this covers all perfectly isomorphic ciphers.

An example of a cipher which is XGAK but not GAK is the classical progressive cipher. This is equivalent to a XGAK cipher where the permutation is the same cyclic rearrangement of the alphabet for every PT letter, and the index chosen for each PT letter is the same as the index of the letter in the PT alphabet. This is also a good example of how generalized group based ciphers can end up being equivalent to existing ciphers despite seeming like abstract generalizations of different cipher methods.

Clone this wiki locally