Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

So for the play fair case, the number of possible keys is : 26x26 = 676 possible keys

But if we consider the repeated letters, how many unique keys will the play fair have? I mean how will considering the redundant letters affect the number of possible keys?

share|improve this question

marked as duplicate by figlesquidge, e-sushi, DrLecter, rath, AFS Mar 9 '14 at 1:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 1 down vote accepted

The Playfair cipher has a key consisting of a square of $5 \times 5$ letters (usually the J is not used, or I/J are considered one letter).

Filling the square can be done in $25!$ ways (pick a letter for left upper corner, a new one for the place next to it, and so on), but then every square has equivalent forms, formed by rotating the columns and/or rotating the rows. So we have get $\frac{25!}{5 \cdot 5}$ different keys.

See also here, where the same question is asked.

share|improve this answer
thanks for this! I was actually wondering if a similar question was asked. – Scarl Mar 8 '14 at 6:11

Not the answer you're looking for? Browse other questions tagged or ask your own question.