One-time pad Created 2026-09-24 Updated 2026-09-24
For messages in a finite additive group, a one-time pad encrypts as , where the key is uniform and independent of , as long as the message, and never reused. Then is uniform and independent of , giving perfect secrecy.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 4 3I a Solution Created 2026-09-24 Updated 2026-09-29
A cipher has perfect secrecy when the conditional probability of every plaintext given a ciphertext equals its prior probability: whenever . Equivalently, the plaintext and ciphertext are independent random variables.
Fix a ciphertext that can occur. Perfect secrecy requires every possible plaintext to remain possible after observing . For a deterministic decryption rule, two different plaintexts producing require two different keys, so the key space has cardinality at least that of the message space.
In a one-time pad, the message and key belong to the same finite additive group, the key is uniform and independent of the message, and encryption is . For every there is exactly one key , soindependent of . Bayes theorem then gives , proving perfect secrecy.
Past exam of the mathematics course of the University of Cambridge 2020 ii Paper 4 3I b Solution Created 2026-09-24 Updated 2026-09-29
Perform every addition in the finite field . From the two transmitted strings and one obtainsChoosing one candidate value of recursively determines , and hence determines the candidate plaintext . There are only two candidates: changing complements every recovered key bit and every plaintext bit. The information that the message makes sense normally selects the intended candidate.
Once this ambiguity is resolved, any other ciphertext positions encrypted with the recovered segment can be decrypted. Key bits outside that segment remain independent and uniformly distributed, so this mistake gives no information about messages using only those bits. This is the two-time pad attack: reusing related one-time-pad key material destroys perfect secrecy.
Past exam of the mathematics course of the University of Cambridge 2023 ii Paper 2 12I a Solution Created 2026-09-24 Updated 2026-10-03
A one-time pad over the finite additive group uses a key that is uniform on , independent of the plaintext , as long as the plaintext, and never reused. Encryption and decryption are
For independent random variables , conditioning reduces entropy and translation by a known element of the finite additive group preserves entropy, soInterchanging and gives , henceThis is the entropy of a sum of independent finite-group variables.
The result explains why adding independent pad symbols cannot reduce uncertainty. For a uniform pad, is itself uniform and is independent of , which is the perfect-secrecy property. Independence is necessary: if is nonconstant and , then is constant, so