The "key" for an ADFGVX cipher consists of some arrangement of the 26 letters of the alphabet as well as the digits 0 through 9 in a six-by-six grid, plus a keyword used to determine how certain columns of ciphertext are rearranged at the appropriate point in the enciphering process.
a. Suppose you know that a keyword of length 4 has been used. How many distinct "keys" are there in this case? (Hint: The keywords KNOT and BENT have the same effect on the column rearrangement, so you should treat them as identical in your count of keys.)
b. Suppose you know that the length of the keyword is 4, 5, or 6. How many distinct "keys" are there in this case? (How many key possibilities for key length of 4, 5, and 6?)