Source redundancy in cryptanalysis (source code)

= Source redundancy in cryptanalysis

For a <plaintext> <alphabet> of size $m$ and <entropy rate> $h$ in <bits> per symbol, put $d=\log_2m-h$. In the random-cipher approximation, the <unicity distance> scale is
$$
U\approx H(K)/d\qquad(d>0),
$$
where $H(K)$ is <cryptographic key> <Shannon entropy>. Uniform <cryptographic keys> on a <finite set> $\mathcal K$ give $H(K)=\log_2|\mathcal K|$. For correlated <plaintext>, its one-symbol <Shannon entropy> cannot replace the <entropy rate> without justification.<Communication Theory of Secrecy Systems by Claude Shannon>[Sections 14–15, Figure 7 and corrections for ordinary ciphers, printed pp. 691–695]{ref}

For example, a 40-<bit> uniform <cryptographic key> and redundancy two <bits> per symbol suggest about twenty symbols under this model. This estimate does not bound computation time or guarantee unique recovery for each <ciphertext>. At zero redundancy it supplies no finite threshold; a <probability>-preserving <source symmetry> can also invalidate the random-cipher uniqueness intuition.