Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
One-time pad
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===True randomness=== High-quality random numbers are difficult to generate. The random number generation functions in most [[programming language]] libraries are not suitable for cryptographic use. Even those generators that are suitable for normal cryptographic use, including [[/dev/random]] and many [[hardware random number generator]]s, may make some use of cryptographic functions whose security has not been proven. An example of a technique for generating pure randomness is measuring [[Radioactive decay|radioactive emissions]].<ref>{{Cite book|title=The Code Book|last=Singh|first=Simon|publisher=Anchor Books|year=2000|isbn=978-0-385-49532-5|location=United States|pages=[https://archive.org/details/codebook00simo/page/123 123]|url=https://archive.org/details/codebook00simo/page/123}}</ref> In particular, one-time use is absolutely necessary. For example, if <math>p_1</math> and <math>p_2</math> represent two distinct plaintext messages and they are each encrypted by a common key <math>k</math>, then the respective ciphertexts are given by: :<math>c_1 = p_1 \oplus k</math> :<math>c_2 = p_2 \oplus k</math> where <math>\oplus</math> means [[XOR]]. If an attacker were to have both ciphertexts <math>c_1</math> and <math>c_2</math>, then simply taking the [[XOR]] of <math>c_1</math> and <math>c_2</math> yields the [[XOR]] of the two plaintexts <math>p_1 \oplus p_2</math>. (This is because taking the [[XOR]] of the common key <math>k</math> with itself yields a constant bitstream of zeros.) <math>p_1 \oplus p_2</math> is then the equivalent of a running key cipher.{{cn|date=December 2023}} If both plaintexts are in a [[natural language]] (e.g., English or Russian), each stands a very high chance of being recovered by [[heuristic]] cryptanalysis, with possibly a few ambiguities. Of course, a longer message can only be broken for the portion that overlaps a shorter message, plus perhaps a little more by completing a word or phrase. The most famous exploit of this vulnerability occurred with the [[Venona project]].<ref name="nsa">{{cite news|title=The Translations and KGB Cryptographic Systems|url=http://www.nsa.gov/about/_files/cryptologic_heritage/publications/coldwar/venona_story.pdf|work=The Venona Story|publisher=[[National Security Agency]]|location=[[Fort Meade, Maryland]]|date=2004-01-15|pages=26β27 (28β29th of 63 in PDF)|access-date=2009-05-03|archive-url=https://web.archive.org/web/20090510052927/http://www.nsa.gov/about/_files/cryptologic_heritage/publications/coldwar/venona_story.pdf|archive-date=2009-05-10|quote=KGB's cryptographic material manufacturing center in the Soviet Union apparently reused some of the pages from one-time pads. This provided [[Arlington Hall]] with an opening.|url-status = dead}}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)