Security Evaluation of Ciphers
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 k independent bits has 2k possible values. In a fixed trial order, every distinct key may have to be tested, so the worst case is 2k trials.
If the true key is uniformly distributed over that order, its exact mean position is (2k+1)/2; 2k−1 is a close approximation for large k. 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⊕K, so K=P⊕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, giving 512.5/64=8.0078125 seconds on average under the same rate assumption. The half-trial arises from averaging positions 1 through 1024.
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?
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?