Overview
A one-time pad can hide plaintext perfectly only when the pad is random, secret, as long as the message, and never reused.
Encrypts a message by combining it with a truly random key used exactly once.
Compact metadata for implementation and discovery.
A one-time pad can hide plaintext perfectly only when the pad is random, secret, as long as the message, and never reused.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(n)
ciphertext = plaintext xor padCombines each message bit with the matching random pad bit.
Show the major cryptographic rounds or data dependencies without exposing secrets.
One-Time Pad should be used with the assumptions and tradeoffs of symmetric Encryption in mind.
What each reference supports for this entry.
Cryptography reference covering perfect secrecy and one-time pad requirements.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Both are symmetric encryption methods, but the one-time pad requires single-use random keys.