What a cipher strength claim must survive

A cipher's keyspace measures how many keys an attacker might test, but a security evaluation also asks what the ciphertext leaks. Exhaustive search gives a useful trial-count benchmark when the attacker has no faster method. State key selection, testing speed, and reuse assumptions.

Keyspace and trial time

A binary key with kk independent bits has 2k2^k possible values. In a fixed trial order, every distinct key may have to be tested, so the worst case is 2k2^k trials.


If the true key is uniformly distributed over that order, its exact mean position is (2k+1)/2(2^k+1)/2; 2k−12^{k-1} is a close approximation for large kk. Divide trials by the sustained testing rate to obtain time.

Leakage beyond key search

A fixed monoalphabetic substitution always maps a given plaintext letter to the same ciphertext symbol. It therefore preserves equality patterns and letter frequencies, which can give an attacker statistical clues in a long message.


A conspicuous count alone cannot establish a unique plaintext letter or message; context and sample length matter. A large nominal substitution keyspace does not remove this leakage.


Known plaintext and aligned ciphertext can expose a substitution mapping or, in an XOR construction, a segment of the keystream. For XOR, C=P⊕KC=P\oplus K, so K=P⊕CK=P\oplus C at each known position.


If the same keystream bytes are used at corresponding positions of another message, those recovered bytes can decrypt that segment. This depends on key reuse and reveals no unrelated fresh keystream.

Worked example

Consider a toy 10-bit key tested in a fixed order at 64 keys per second, with no shortcut attack. Its 1024 candidates require at most 1024 trials, or 16 seconds at that sustained rate.


If the true key is uniformly selected, its mean position is (1024+1)/2=512.5(1024+1)/2=512.5, giving 512.5/64=8.0078125512.5/64=8.0078125 seconds on average under the same rate assumption. The half-trial arises from averaging positions 1 through 1024.



A toy cipher changes from a uniformly chosen 20-bit key to a uniformly chosen 24-bit key, with the same trial rate and no shortcut attack. By what factor does the worst-case exhaustive trial count increase?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A long ciphertext from a fixed monoalphabetic substitution has one symbol in 39 of its 100 letter positions. Which security inference is best supported by this observation alone?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Two messages use the same XOR keystream at the same byte positions. An attacker knows the first message’s plaintext and ciphertext for bytes 1 through 5. What follows for bytes 1 through 5 of the second ciphertext?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors