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.
If two plaintexts are encrypted by adding the same one-time-pad key, subtracting the ciphertexts cancels the key and reveals the difference of the plaintexts. Redundancy in natural language or another structured message space can then reveal both messages, so a one-time pad must never reuse key material.
If an interceptor knows that an additive one-time-pad ciphertext encrypts plaintext and wants it to decrypt as , replacing it by
works without knowing the key, since .

Articles by others on the same topic (2)

The one-time pad (OTP) is a theoretically unbreakable encryption technique that uses a key that is as long as the message being encrypted. Here are key characteristics and principles behind the one-time pad: 1. **Key Usage**: In the one-time pad, a random key or "pad" is generated. This key must be statistically random, as long as the message, and used only once.
One-time pad by Ciro Santilli 40 Updated 2025-07-16
The only perfect cryptosystem!
The problem is that you need a shared key as large as the message.
Systems like advanced Encryption Standard allow us to encrypt things larger than the key, but the tradeoff is that they could be possibly broken, as don't have any provably secure symmetric-key algorithms as of 2020.