Talk:One-time pad

{{WikiProject banner shell|class=C|vital=yes|1=

{{WikiProject Cryptography|importance=Top}}

}}

{{todo}}

{{archives|search=yes}}

Padding as a form of authentication?

I've removed the following claim, because it is not backed up by a reference.

: The classical pencil and paper techniques of padding and Russian copulation can block such a substitution attack by denying the attacker knowledge of where to modify the cipher text.

The problem here is that both methods are heuristical and the arguments are mainly based on unproven assumptions. This looks rather odd compared to the information theoretical secrecy of the one-time pad and the security guarantees of the universal hashing. In particular, the supposed strength of adding some padding seems to assume that there is some variable length padding that is prepended to the message. I.e., this is an implicit assumption not made clear in the text. Without a clear definition of what the supposed countermeasures are it is not possible to make claims about the strength of those countermeasures. Hence the text is vague and does not add content to the article. Without a reliable reference it is unclear whether these countermeasures provide significant strength. 62.203.12.206 (talk) 17:15, 26 December 2008 (UTC)

:First of all, the entire section on authentication is unreferenced. One time pads were used for decades at the highest security levels and I am not aware of any authentication problems encountered. The substitution attack described in the section is common to all stream ciphers and depends on an adversary knowing the exact offset from the start of the ciphertext to where the characters to be altered lie. It is obvious that random length padding or Russian copulation at a random offset prevent an attacker from knowing this. The best an attacker can do is guess the position, which has a likelihood on the order of 1/n, when n is the length of the padding or the message respectively. While that is not as strong a protection as what can be achieved with modern methods, it makes it much more likely that an attack will be detected than succeed. Also the security guarantees of universal hashing depend on the availability of a trusted computer, something hard to achieve in the real world. We can remove the entire section as unreferenced, but if not, I beleive the comments I added are needed for balance. --agr (talk) 20:31, 26 December 2008 (UTC)

:: There are two main claims in the contested section: (1) The one-time pad does not provide authentication. Several of the references given for this article talk about this problem. (2) Universal hashing can be used to provied information theoretical authentication. Universal hashing has its own wikipedia article an is reliably source. Furthermore just because something else is not referenced doesn't mean you have a free pass to add whatever you like to wikipedia. Regarding you proposal: a success probability of 1/n (assuming for the moment that this is indeed the correct result) for an authentication scheme that has length O(n) is a weak result, as the success probability is not negligible. Hence such a result is of no interest. A slightly different matter is, if the authentication you proposed was used in the pre-computer age. But again in this case some reliable reference would be necessary and the addition would would probably be better in the history section. 81.62.44.149 (talk) 11:22, 27 December 2008 (UTC)

superencryption scheme

Shouldn't this "the combination would be at least as strong as the strongest layer." be "the combination would be at least as strong as the weakest layer." The strongest layer is OTP can you achieve the strength of OTP if you combine with another weaker encryption system? To me it looks like the encryption would be at least as strong as the weakest link, but not as strong as OTP, right? Or I totally missed the idea... man with one red shoe 22:09, 30 April 2009 (UTC)

:Makes perfect sense to me... If a given message is encrypted using the Caesar cipher, and then with OTP, being able to break the Caesar cipher layer alone doesn't give you the plaintext -- you also have to break the strongest (OTP) layer. -- intgr [talk] 19:10, 1 May 2009 (UTC)

::Well, I thought like this, if one-time pad is theoretically unbreakable a combination of one-time pad and another method cannot be "at least as strong as" because you can't have anything stronger than "unbreakable". But I guess in case of the discovery of the one-time pad the cypher would still have the strength of the weakest link... (the difference between "theoretically" unbreakable and the real-life) I still find that sentence a bit awkward... man with one red shoe 23:48, 15 May 2009 (UTC)

:::I think you have a point here. The statement is unclear and possibly incorrect. It reminds me of the paper by Maurer and Massey "Cascade Ciphers: The Importance of Being First". There the authors show that a superencryption with two ciphers and idependent keys is at least as strong as the first cipher, but not necessarily as strong as the second cipher. If two stream ciphers are used then the order is exchangeable and hence the cascade is at least as the stronger stream cipher used in the cascade. Note they are talking about stream ciphers not OTPs. On the other hand assume that the first cipher in the cascade uses compression. Then the encryption of n random letters is distinguishable from the encryption of n letters 'a', if the latter results in a shorter ciphertext. Hence the cipher is not semantically secure. Adding a layer using a OTP doesn't change the length of the ciphertext and therefore the cascade isn't semantically secure either. Since the statement is confusing, potentially incorrect, unreferenced and simple just doesn't make sense I'm removing it from the article. 92.106.132.178 (talk) 04:56, 16 May 2009 (UTC)

:::man with one red shoe: Your reasoning is logically inconsistent. "at least as strong as" means "strength is equal to or greater than"; the cascade needn't be stronger than OTP to satisfy the condition; it suffices if it's just as strong. I can't see what's unclear here.

:::I don't have time right now to digest the paper though. -- intgr [talk] 11:40, 17 May 2009 (UTC)

::::don't know about that, it might be logically valid but not linguistically correct, for example nobody says "at least as strong as God" you'd say "as strong as God". But I think my confusion here was between theoretical strength and practical (while OTP is theoretically unbreakable, it might still be breakable if somebody recovers the pad, so yes, superencryption would offer more protection, but I would still not call it "stronger than OTP" because it sounds weird in the context) man with one red shoe 15:10, 17 May 2009 (UTC)

Use cases, advantage, etc.

The article talks about the advantage and lack there of of OTP, particularly that to implement OTP you need to securely transport something just as big as the plain text. However it doesn't (or didn't last I checked) bring in the point that the constraints on transporting the key are much more relaxed: 1) It has very relaxed latency constraints in that the next key taking weeks to arrive is not a problem as long as the last key isn't used up yet. 2) Security failures are acceptable as long as they can be reliably detected before the key gets used. In effect, OTP trades one set of constraints for another, sometimes easier, set of constraints.

I attempted to add that in a while back but never really liked what I ended up with (and someone else yanked it back out again) so if someone who is a better writer than I could figure out how to work it in somewhere... —Preceding unsigned comment added by 99.72.154.66 (talk) 20:10, 6 July 2010 (UTC)

How it is impossible if one can check if the final grammar of a text is simply linguistically sane?

I don't get that from the article. --Athinker (talk) 11:30, 7 January 2011 (UTC)

:I assume you mean "why can't someone try all the keys and figure out which give a sane output"

:The answer is partly given in the "Attempt at cryptanalysis" section. With one time pads, every fitting-length outcome is possible. By applying this proposed cryptanalysis, you will get a list of all possible linguistically sane constructions, but you still don't know which one was intended to be transmitted. Thus you aren't any wiser regardless of whether you have the ciphertext or not. -- intgr [talk] 17:40, 7 January 2011 (UTC)

Error in example?

The example says "If a number is larger than 25, then the remainder after subtraction of 26 is taken in modular arithmetic fashion". Should this not be 26? Paul Magnussen (talk) 18:46, 10 April 2011 (UTC)

: The example is correct. The result of the modular operation should be in the range 0 .. 25, since 0 corresponds to A and 25 corresponds to Z. Thus any result up to 25 is in the correct range and any result 26 or higher must be reduce modulo 26. Also, since the addition of two integers <= 25 can be at most 50 it is possible to do the modular reduction with a single subtraction. 85.1.93.222 (talk) 21:26, 10 April 2011 (UTC)

So ... how may pads do you have to use in sequence to beat the best super computer. (answer later) — Preceding unsigned comment added by 71.232.252.76 (talk) 20:25, 25 May 2011 (UTC)

Phony Message

This is about the "Dubious" tag I added to the following sentence: "The straightforward XORing with the keystream creates a potential vulnerability in message integrity especially simple to exploit—for example, an attacker who knows that the message contains "Meet Jane and me tomorrow at 3:30 pm" at a particular point can replace that content by any other content of exactly the same length, such as "3:30 meeting is cancelled, stay home", without having access to the one-time pad."

Something seems wrong. If the assumption is that the key is simple "mod 26," maybe, but the paragraph needs to be more clear, especially for non-experts, like myself.

Take ENABLE, the correct message from BOB, and DEFEND, the phony message Charlie wants Alice to get. For simplicity, everything's just plus one (but Chariie doesn't know that). Therefore, the code is FOBCMF. Charlie can send EFGFOE, which Alice will see as DEFEND, thus being fooled.

But Charlie cannot afford to get the phony message wrong. He must have 3 things: the real encrypted message, the real unencrypted message, and certainty that simple mod 26 substitution was used. He has no way of being certain of this last (unless he has a copy of the key). Just because FOBCMF gets ENABLE, does not mean EFGFOE gets DEFEND.

If Bob and Alice just agree on a different ordering of the alphabet, Charlie is stumped. He might make educated guesses, but the message is too short to be certain of the substitution key.

Different substitution is not universal hashing or message authentication.

This is a very important paragraph in this article. Would someone with expert knowledge please rewrite it so that it is clearer and less ambiguous. Anthony717 (talk) 10:00, 30 July 2011 (UTC)

:It's standard in analyzing any crypto system to assume the attacker knows the details of the system used, in this case how the key is combined with the plaintext to encode the message. Also there is no requirement that the attacker knows the unencrypted message, just it's exact format. --agr (talk) 15:22, 31 July 2011 (UTC)

I added the dubious tag to this and came in here to create a section and I find there is already this one. The assertion "an attacker who knows that the message contains "Meet Jane and me tomorrow at 3:30 pm" at a particular point can replace that content by any other content of exactly the same length, such as "3:30 meeting is cancelled, stay home", without having access to the one-time pad" seems plainly wrong to me and needs to be either removed or very convincingly supported. GS3 (talk) 17:23, 30 October 2011 (UTC)

:I added a reference to the article. This is very standard stuff; the technical term is malleability. There is a worked out example there and at stream cipher attack. Do a google search on "one time pad malleability " and you'll find lots of other references.--agr (talk) 19:29, 31 October 2011 (UTC)

I am still not seeing it and it goes contrary to everything I know. I would say the opposite is "very standard stuff". The reference link you added just leads me to the cover of a book and I would need to see what it says. Can you cite the exact text and examples which support the assertion? At stream cipher attack I cannot see any "worked out example"; only a bare assertion. Can you please provide a clear supporting citation and a worked out example? For instance, there is a simple example in this article where Alice encrypts the plaintext "HELLO" using the key "XMCKL" which results in cyphertext "EQNVZ". Suppose an attacker wants to change the message to something else *and does not know the key*, how can he do it? I believe there is no way. Please show us how "malleability" allows this to be done because I am not seeing it. I think it is pretty well established and accepted that one time pad keys are an uncrackable system. Thanks.GS3 (talk) 16:31, 3 November 2011 (UTC)

: I'm not Arnold, but no, this is a legitimate flaw if you use an invertible function (as stated in the lines leading up to this), and the attacker knows your plaintext. Without looking at your key (except for verification) at the end - if the key is A + B % 26. , I take H (7) + ?? = E (4) (mod 26). Therefore, 7 - 4 = - ?? mod 26. -3 == ?? mod 26. Therefore -3 + 26 = ?? mod 26, which means ?? == 23 mod 26 - which is X. Which should be the key. I've derived the key for the position from the function, ciphertext and plaintext. Similarly, E (4) + ?? == Q (16) % 26. ?? == 16 - 4 % 26. ?? = 12 (M). etc. Now I know the key and function, so if I want to change the first character to F, I just do F (5) + X (23) == C (2 mod 26). Etc. etc. An OTP is uncrackable in the sense that if all I have is the ciphertext, even if know the algorithm, but without the OTP or the plaintext, I cannot possibly generate one or the other. As any result is possible. This is of course useless for all further messages, since the OTP key is not reused, but if I intercept the message and know a portion of it, I most certainly can manipulate it. — Preceding unsigned comment added by 24.5.145.245 (talk) 00:24, 6 November 2011 (UTC)

:A Google search for "one time pad malleability" (including the quotation marks) leads to class notes for a single class, nothing else. If I understand this phenomenon, a person who knew the exact format of messages, but not the key, could change a value in a message, but not know what it would be changed to. For example, if the symbol set for the key were only upper case letters, the space, and numerals, and the plain text were "PAY_ALICE_______5" and the name field was known to be 6 characters, then a space, then a six character payment field, an adversary could alter the message to read "PAY_ALICE__5T_8QP", and would have no idea what the recipient would see in the payment field after decryption. Jc3s5h (talk) 17:01, 3 November 2011 (UTC)

::See my above comment, if you know what it said before, you can decipher that portion of the key, and then you're able to change it at will. Also, it's not one time pad specific - it can apply to many stream ciphers - http://en.wikipedia.org/wiki/Malleability_(cryptography) — Preceding unsigned comment added by 24.5.145.245 (talk) 00:26, 6 November 2011 (UTC)

Nope. That is not what is being asked. The assertion is "an attacker who knows that the message contains "Meet Jane and me tomorrow at 3:30 pm" at a particular point can replace that content by any other content of exactly the same length, such as "3:30 meeting is cancelled, stay home", without having access to the one-time pad". That is what is being asked. Just corrupting the message without being able to determine what the corrupted message will be is not the same thing at all. GS3 (talk) 19:31, 3 November 2011 (UTC)

I have added the "dubious" tag again to the phrase in question. Please do not remove it until this matter is convincingly settled. After some time if the phrase is not proven I will remove it. It just seems very obviously wrong to me. The XORing operation is extremely simple and is done on characters one by one. You have the plaincharacter, the key-mask character and the cyphercharacter. If you know two of the three you can obtain the third. If you know only one you have no way of obtaining the other two because each depends on the other. No way. This is true for one or for a million characters as they are encoded and decoded one by one. That is the basic principle underlying the one time pad. GS3 (talk) 13:03, 5 November 2011 (UTC)

: You seem to be missing the fact that in order to manipulate a portion of the ciphertext to a known value, I would generally need to have the ciphertext value in the first place. Otherwise I wouldn't be able to replace one section of it in the first place (I wouldn't know the rest of the message). If I know the message contains "foo" at a given point, and I know the cyphertext says "bar", then I do in fact know two of the three, and can work out the third- like add key mod 26, I can most certainly compute b - f (mod 26) a - o (mod 26) and r - o (mod 26) to get that particular portion of the OTP. (4, 14, -3). Now I can apply the key to my new message ZIP, (25 + 4, 8 + 14, 14 + -3) to get CWJ. See above for a worked out example of this (from my same IP) 24.5.145.245 (talk) 00:00, 6 November 2011 (UTC)

First, I want to apologize for resurrecting this issue, but I also had the same reservations mentioned above when I read the article a few minutes ago. This interception method only works if the attacker knows the methodology of the OTP; if it is simply addition, then it can be beaten. However, it would be very easy to counter this potential attack by mixing in other or additional operands. In the case of a physical pad this would be easy to communicate; for a digital form (like a simple list of random numbers) it would not. For instance: if the second term was = +7+(first plain term) [which would need to to be physically communicated on the pad], then the attacker would be stymied. Perhaps this is viewed as something other than OTP (like a form of superencryption)? If so, then I apologize again; my knowledge of the subject is very limited. It just seams to me that such an vulnerability would be easy to counter. Nwilde (talk) 17:53, 28 November 2017 (UTC)

serious drawback ?

Why is the need of a "careful treatment to make sure that it continues to remain secret from any adversary" listed as a serious drawback of one-time pads? This problem seems common to every cryptosystem known, whether it is based on symmetric cryptography (the key must remain secret) or asymmetric cryptography (the secret key must remain... secret). — Preceding unsigned comment added by 82.121.127.28 (talk) 20:24, 2 November 2011 (UTC)

:Some cryptographic protocols prevent an attacker from reading earlier messages even if the secret key is compromised. See perfect forward secrecy--agr (talk) 02:22, 6 November 2011 (UTC)

::This is not a serious drawback though. As the key does not have to be re-used and in fact should never be re-used, the simple destruction of used parts of the key already creates perfect forward secrecy. So OP is still right. — 2A0A:A546:59D2:1:4D8E:2A19:88D7:634 (talk) 16:14, 15 November 2024 (UTC)

:3000 103.115.198.62 (talk) 03:23, 30 November 2024 (UTC)

"Perfect Security"

Is it really still acceptable to describe one-time-pad as 'perfect security'? Any cryptographic encryption can eventually be broken by a computer, particularly if you are able to validate whether a guessed key was able to decrypt the data successfully or not.

One-time-padding, like all encryption, is ultimately bound by time constraints; a one-time-pad is only "perfectly" secure so long as it's only used once, and that the message, if intercepted, is useless beyond the time that it would take to brute-force the encryption, which in itself is a requirement that is subject to chance as computers get faster and faster. For example, no matter how well implemented a one-time-padding scheme is, if it's only being used to encrypt 8-bits of data then pretty much any device with a microchip can decrypt that. It's only really a viable method so long as the data is at least a certain length (which is where, confusingly, padding schemes should almost always be combined with one-time-padding). This length will increase over time as computing power available to an attacker increases as well.

For example, if you used a one time-pad to encrypt a newly issued credit-card number, then I wouldn't consider that secure, as it's relatively easy to match a credit card number to test for success, and the data isn't long enough to prevent it being decrypted within the 3+ years that that card would be valid for. Similarly, the fact that one-time pad exposes the length of the data is also significant, as that could (to continue the example) expose the fact that the data contains, say, five credit card numbers, allowing you to break the data down into five smaller, easier to break pieces. Haravikk (talk) 19:04, 14 August 2012 (UTC)

:With a one time pad, there is no way to distinguish one guess from another guess of the same length. Consider the case of the case of a credit card number that has encrypted with a one-time pad. There is nothing associated with the cryptogram that would lead a cryptanalyst to favor one guess over another. So one would do just as well guessing credit card numbers, and using whatever scheme is available to test the guesses them, without bothering to intercept the cryptogram. Padding could be useful however. If one observed someone receive a 16 character cryptogram, one might surmise it is a credit card number, and it would be a good time to begin employing non-crypanalytic means to discover the number.

:First, note that the title of the section is "perfect secrecy" and not "perfect security". Perfect secrecy has a formal definition, which basically means that an attacker can not distinguish the ciphertexts of two equally long messages. As you noticed and as it is also pointed out in the section "problems" perfect secrecy does not include every security notion. In particular, perfect secrecy does not imply authentication, which is frequently a requirement for a secure cryptosystem. Thus the main problem here is not an incorrect claim, rather it is that the term 'perfect secrecy' is sometimes misunderstood. 178.195.225.28 (talk) 21:10, 14 August 2012 (UTC)

Why no 6-dice?

In the section on making pads by hand: "Six-sided dice should not be used." Why is this? 99.4.123.58 (talk) 01:24, 30 August 2012 (UTC)

:I tried to clarify how to use six sided dice to make a random digit one time pad. I think the editor who said they should not be used was suggesting 10-side dice were more efficient for this purpose, which they are.--agr (talk) 19:30, 3 September 2012 (UTC)

:Frankly, any crappy camera’s noise, if filtered/processed a bit, is a vastly superior source of randomness. Dice just take forever. — 2A0A:A546:59D2:1:4D8E:2A19:88D7:634 (talk) 16:12, 15 November 2024 (UTC)

Making one time pads by hand

I copied the section on Making one time pads by hand, which was deleted, to the Wikibooks article: http://en.wikibooks.org/wiki/Cryptography/One_time_pads --agr (talk) 18:53, 14 January 2013 (UTC)

Unsourced statement

The article claims

:In discussing the one-time pad, two notions of security have to be kept distinct. The first is the perfect secrecy of the one-time pad system as proved by Shannon (Shannon security). The second is the security offered by state-of-the-art ciphers (e.g. AES) designed with principles learned in the long history of code breaking and subjected to extensive testing in a standardization process, either in public or by a top notch security service (empirical security). The former is mathematically proven, subject to the practical availability of random numbers. The latter is unproven but relied upon by most governments to protect their most vital secrets (insofar as publicly known thus far)."

I would like to see a citation for the claim made in the last sentence. Why should governments use any method other than OTP for their most vital secrets? That governments use state-of-the-art-ciphers for this seems not plausible at all, given the fact that one runs a substantial risk of the cipher being broken, and storage capacities of even something as small as an USB stick that easily provide storage for random numbers in large enough quantity to allow for any practically conceivable application in environments where secrecy is vital, perhaps even where it is merely a desire. --rtc (talk) 21:43, 13 April 2013 (UTC)

:I've added an NSA cite for the US government use of AES-256 at all levels or classification. Perhaps they are not telling the whole truth, but absent a reliable source to the contrary we take their word for it. --agr (talk) 04:11, 14 April 2013 (UTC)

:The Wikipedia article makes a bad job expliaining this, but it's because one-time pads are useless in most scenarios: https://www.schneier.com/crypto-gram-0210.html#7 -- intgr [talk] 11:44, 14 April 2013 (UTC)

::I think the phrase in our article, "most vital secrets", is unfortunate. My guess would be that the most vital secrets would have an effective classification beyond top secret; chances are even the name of the classification is itself top secret. Hence, a cite telling us that AES can be used for top secret really doesn't tell us what is used for "most vital secrets".

::Schneier's argument against one-time pads is the usual one: the difficulty of distributing long keys. I would think there would be a select set of most vital secrets where the key distribution hassles might be worth it. Of course situations will also arise where a most vital secret must be sent to a destination which does not ordinarily deal with these secrets, and is thus not equipped with the crypto method(s) used for the most vital secrets, and so a less-trusted system will have to be used. Jc3s5h (talk) 14:11, 14 April 2013 (UTC)

:::Is Schneier's argument up to date? When did he make it? Some years ago, it was quite valid, but as technolgy progresses, things change. Also, if we are talking about asymmetric encryption combined with symmetric encryption to extend efficiency, I would agree. Then it does not make much sense to use OTP: The increase in efficiency inherently is lost again, with hardly any gain in secrecy (since the asymmetric part is the weakest and might still be broken). But for completely symmetric encryption needs where key exchange happens outside of some asymmetric framework, one needs a secure exchange of keys anyway, and with today's technology, it does really not make much of a difference whether the key is 256 bits or 256 Gigabytes. Standard flash technology makes it easy to store large OTP keys and (taking all necessary precautions into account) securely delete any part that has been used up, even on very small devices. A 8 kbit/s phone with a 256GB key inside, for example, would need to survive a cumulative call time of 8 years before depletion of the key--this probably exceeds the lifetime of such equipment by far! --rtc (talk) 15:39, 14 April 2013 (UTC)

::::Let's just take out the part about "most vital secrets", it cannot be verifiable and is not terribly relevant.

::::As for the usefulness of OTP, you're missing the point: it's not that "the OTP key is too large" or "key management is hard", it's that it defeats the purpose of encryption if the key is as large as the data you're storing (barring some exceptions, which Schneier highlights).

::::In order for any (symmetric) encryption to be secure, you have to store the key securely. OTP, requires the key to be at least as large as the data. And you cannot ever re-use the key.

::::So if you have a secure and large enough medium to store the key, why not store the whole data there in plain already? Again, we already established that the storage must be secure anyway.

:::::Because the data may not exist yet. You can exchange the keys through physically secure (real-world) means, and then use them for future data exchanges. For instance share a 1 TB HDD with your correspondent during a meeting, then use it for future exchanges. 217.128.255.181 (talk) 13:15, 9 July 2013 (UTC)

::::Also, with OTP you can't derive the key from a human-learnable password like you can with symmetric encryption. The pad has to be truly random, not generated from a deterministic process. Otherwise you'd just be reinventing stream ciphers. -- intgr [talk] 22:24, 14 April 2013 (UTC)

:::::"So if you have a secure and large enough medium to store the key, why not store the whole data there in plain already? Again, we already established that the storage must be secure anyway." If anything, you are disputing that symmetric encryption makes any sense outside of an asymmetric framework. All symmetric methods require a secure medium to store the key, so it can only be a question of whether the medium is large enough, and that this is not a problem with today's technology was exactly the point I was making. You seem to implicitly make the incorrect assumption that the human brain is under all circumstances the only secure storage and hence the key must fit into human memory. You will have a hard time finding any medium other than the human brain which is better in even one single respect than modern mass data storage, such that your argument could possibly make sense. I actually described an obvious, practical use of OTP in secure phones (such as for "most vital secrets"), so how can you claim that "it defeats the purpose of encryption"? --rtc (talk) 23:44, 14 April 2013 (UTC)

:Sorry, I don't want to get bogged down in an argument about the usefulness of OTP, which is unrelated to the real issue. My bad for bringing it up.

:As said before, I agree that this claim doesn't belong in the article. We don't know what "most governments" do with their "most vital secrets". Per verifiability policy we should stick to saying what we do know.

:I made [https://en.wikipedia.org/w/index.php?title=One-time_pad&diff=550777289&oldid=550255195 an edit to that end]. While I couldn't find a reference for "[empirical security] is used by the vast majority of practical cryptography uses", I would guess nobody really disputes that? -- intgr [talk] 08:59, 17 April 2013 (UTC)

::Much better now. --rtc (talk) 19:32, 17 April 2013 (UTC)

Khan Academy video

After reading the lead section of this article and the Example section (lots of 'blah blah blah'), I checked the tiny Simple English article about the subject (almost nothing there). I then decided to watch a less than three minute Khan Academy video about the subject ([http://www.youtube.com/watch?v=FlIG3TvQCBQ here]) and I immediately understood the - very simple, as it turns out - concept of the one-time pad. I'm not sure what exactly this says about me, the Wikipedia articles or the Khan Academy video, but maybe it would be useful for certain visitors if we'd add the Khan Academy video to the External links section? --82.170.113.123 (talk) 18:18, 23 May 2013 (UTC)

OTP generation by a fres/traceable OS?

"One approach might be to use an older laptop for OTP generation, purged and rebuilt with a fresh, traceable copy of an open source operating system, such as Linux or BSD"

This doesn't look like a very good advice. Assuming you don't code the OTP generation software yourself, using a fresh version of an OS introduces a possible source for baked-in malicious code targeted at tagging or negatively affecting the OTP generation software. Since the system isn't going to be connected, security issues of older OS versions are irrelevant. So the installed OS version should preferably be one that predates the OTP generation software (and the OTP software should only rely on the OS for I/O, not generation, that goes without saying). 217.128.255.181 (talk) 13:11, 9 July 2013 (UTC)

authentication section is erroneous

it confuses mod 26 addition with the use of a random number to conclude that the message can be changed withOUT knowing the OTP values.

the whole point of a OTP is that you can NOT read the message at all without the pad and thus

cannot change the message at all with vanishingly small probability.

the mod 26 stuff tossed into this section does not belong and is confusing as well as erroneous wrt the example. — Preceding unsigned comment added by 108.18.29.96 (talk) 18:44, 17 July 2013 (UTC)

If an attacker knows both the plaintext and the corresponding ciphertext for a section of the message then the attacker can extract the relevant section of keystream and use it to change the message. Perhaps this could be made clearer? Doctorhook (talk) 21:54, 21 July 2013 (UTC)

The whole section seems to be confusing the ideas of authentication and integrity checking. First of all, OTP actually does have authentication by design. Authentication doesn't work if multiple parties use the same pad, but if every participant has their own unique pad then the pads act as authentication in and of themselves. Having per-user pads is actually very simple and doesn't negatively effect physical key exchanges. This is not a new idea and even the Soviets were using multiple pads per communication channel.

As far as integrity goes it should be mentioned that nearly any cipher, including OTP, can incorporate a simple hashing function to verify against corruption or data tampering(ruling out a full-fledged MITM attack of course). This would "defeat" a known plaintext attack in the sense that the recipient would know that the message has been tampered with if the given and computed hashes don't match. The only way that Mallory could forge a new hash would be if she knew the entire plaintext, which is wildly unlikely unless there's been a serious problem in the way that the OTP was implemented. However, using a hash could also make an OTP cryptext potentially breakable through brute force.— Preceding unsigned comment added by Ravenstine (talkcontribs) 21:49, 28 September 2013 (UTC)

Revised Ravenstine (talk) 21:54, 29 September 2013 (UTC)

True randomness requirements

This section is poorly referenced. Also because of its size and detailed content, it is more appropriate for Random number generation. I propose to delete it from the article and copy it here, to the talk page, in case someone wants to re-use it in another article. The Yeti 23:05, 31 December 2013 (UTC)

:Please don't copy to talk page, that makes talk pages unnecessarily long with stuff that has no relevance to discussion. It's still available in the article history if someone goes looking for it. -- intgr [talk] 10:53, 9 January 2014 (UTC)

BATCO

BATCO is not an OTP system, six so-called keys correspond to the same encipherment table and there is always a limited chance for repeated uses of a key. I commented out the paragraph and I shall delete it if there are no objections. The Yeti 17:03, 1 January 2014 (UTC)

:+1. In the future, just delete it per WP:BOLD. -- intgr [talk] 00:47, 2 January 2014 (UTC)

False Messages Vulnerability

I am going to try to provide context via Occam's Razor. The weakess of mod 26 allows false messages if the unencrypted source message and the encrypted message is known. Using global random mixing for each OTP that applies to all letters in each tied encryted message removes this issue. I am going to seriously press this simple fact. Obviously there will be little literature to help. — Preceding unsigned comment added by Anthony717 (talkcontribs)

:The Wikipedia Verifiability policy is a pillar of Wikipedia and editors who don't believe in it should find someplace else to write. Jc3s5h (talk) 09:46, 3 August 2014 (UTC)

Update on the history of the invention

It seems like the section on the history of the invention relies heavily on Kahn. There was a recent paper published by a historian who, at Kahn's urging, reconsidered the claim of credit for the invention of the OTP. The historian's paper is at https://mice.cs.columbia.edu/getTechreport.php?techreportID=1576

Perhaps there should be some amendment to the section?

Hawkinsw (talk) 04:39, 20 April 2015 (UTC)hawkinsw

:I see the author has placed a list of his publications [https://www.cs.columbia.edu/~smb/papers/ online]. I don't know if there is any peer review required to place papers on the mice.cs.columbia.edu website, but Professor Bellovin seems to qualify for the expert exception to Wikipedia's guideline concerning self-published sources. Jc3s5h (talk) 14:53, 20 April 2015 (UTC)

Re. "Authentication" - Invitation for extended debate - Please help with sources (Wanting Change)

My argument (awaiting sources, mine or others): I believe that Wikipedia should use accessible language to discuss debatable issues. The "Authentication" issue is, to me, quite debatable. I can't imagine being a spy. But I can imagine being a average person. If I were an average person put in a situation, like in the movies, where I needed a one time pad (OTP) to escape the bad guys, I would know two things: (1) Each character in the key must be randomly selected using a physical method, such as drawing letters from a bag; and (2) The key must include a scrambler derived from the random selection of all needed characters. My assertion is that any average person clever enough to use an OTP would automatically know this. Further, I ask, why would a person of average intelligence and good sense risk using fancy math to scramble an OTP (to prevent false or misleading messages) when they could just draw messages from a Scrabble bag? I know that Wikipedia is not meant to be original research, but the Authentication section is so obtuse and misleading for average people that it needs intervention. However, I need support before doing any edits. Anthony717 (talk) 06:25, 12 November 2015 (UTC)

:: I don't think the section on authentication is misleading. In fact, it addresses an important topic: the one-time pad is sometimes called perfectly secure, a clear misconception given that it lacks authentication. Commonly used encryption modes (e.g. AES with HMAC) are preferable since they prevent a larger range of attack scenarios. But you are certainly right: Wikipedia is not the right place to discuss original research. 2A02:120B:C3C8:F260:605E:CAD4:F2B8:FC2A (talk) 08:11, 12 November 2015 (UTC)

Thank you for agreeing about original research (but that does not include the talk page). I'm looking for sources. Part of the attraction of one time pads is that they don't require math. If the recipient can substitute characters once for encryption, he can do it twice to prevent false messages, and the second key only needs to be as large as the character set. If the recipient has multiple keys, the keys will also need page numbers to match to the messages. It may take a while to find a source, because mathematicians find these ideas too obvious to write down. Anthony717 (talk) 11:46, 12 November 2015 (UTC)

:Creation of scenario in hope of getting sources: I'm working on this point long term, so I ask for patience (on the talk page). The reason for this section is to argue that the authentication section needs a colloquial paragraph, and the reason I'm sharing is to encourage input. Therefore I would like to create a simple scenario using pseudo-random numbers (only 10 characters makes it simpler). Alice (good) wants Bob (good) to get to the auction at dawn, but Charlie (bad) wants Bob to sleep late until the auction is over. The translation "5341876140" means "Get there by dawn." The translation (each previous plus one) "6452987251" means "You can sleep in because the auction doesn't start until noon." Bob's key (that Alice handed to him weeks before) is "-3,-6,-4,-1,-5,-3,-7,-0,-6,-8," which means he has to subtract these amounts from the numbers on the letter that Alice sends him. Therefore the message is "8982303108." Of course Charlie, being an postman, steams open the envelope and forges the message "9093414219." It is important to note here that the arbitrarily simple example is essential: If "pen and paper" OTP encryption is not perfectly uncrackable and perfectly authenticable (with perfect dice), then there are important questions to be asked about the concept. I want to repeat the scenario with Alice knowing that Charlie works at the Post Office. I am tired now, but I know I will need to add a key to each character to Bob's sheet, and that will change some of the above numbers. Anthony717 (talk) 05:24, 15 November 2015 (UTC)

Edit claims unknown authors are wrong

[https://en.wikipedia.org/w/index.php?title=One-time_pad&type=revision&diff=739226648&oldid=738865850 This edit] by 103.1.57.224 makes this change:

There is some ambiguity to the term because some authors{{Who|date=August 2015}} incorrectly use the terms "Vernam cipher" and "one-time pad" synonymously, while others refer to any additive stream cipher as a "Vernam cipher", including those based on a cryptographically secure pseudorandom number generator (CSPRNG).{{cite book| last=Kahn| first=David| title=The Codebreakers| publisher=Macmillan| year=1967| isbn=0-684-83130-9| pages=398 ff |authorlink=David Kahn (writer)}}

The paragraph claims that some authors use the terms "Vernam cipher" and "one-time pad" synonymously. Unfortunately, these authors are not named. No single authority is in charge of cryptography, nor is one single authority in charge of the English language. Before we can decide if these authors are incorrect or not, we would have to know who they are, their stature in the cryptography community, and how widely accepted their definitions have, or have not, become.

Unless we find out who the author are, we should either leave the passage alone, or completely remove it. Who are we to say that some unknown authors are wrong? Jc3s5h (talk) 14:09, 13 September 2016 (UTC)

{{reflist-talk}}

Latest talk

The authentication section is getting better, but it still needs practical thinking. The whole article needs practical thinking. The whole article is annoying. How do you use totally random one time data to send false or misleading messages? Since a one time pad is possibly perfect, the detractors need to use some layperson language to serve other than themselves. — Preceding unsigned comment added by Anthony717 (talkcontribs)

All we need is random!

We just need a squence of random numbers. We can for example use MD5 or some other hash function to calculate it. The random sequence must not be transfered, if the same sequence is calculated while encrypting and decrypting.

--84.118.82.226 (talk) 18:14, 6 February 2018 (UTC)

:No. If you're using MD5 or some other deterministic function to generate the random numbers for the pad, then you've basically built a new cipher -- which is not a one-time pad. The CTR mode of block ciphers is like a one-time pad, where the pad is generated with a block cipher. -- intgr [talk] 18:33, 6 February 2018 (UTC)

::I skimmed CTR mode and it does not appear to be random, it appears to be deterministic. The sequence of numbers or characters used for a one-time pad must be completely random. Jc3s5h (talk) 19:57, 6 February 2018 (UTC)

:::{{ping|Jc3s5h}} Yes, that was my point, I brought up CTR mode as an example of something that's like OTP but actually isn't, as the pad is generated by an algorithm -- similarly to MD5 proposed by IP editor here. -- intgr [talk] 10:11, 7 February 2018 (UTC)

:The core problem with randomness is, that it is just a word for “too many factors and hence too complex to understand and keep track of”. So randomness is not a real thing, and not even an emerging concept, but merely a problem of every brain being limited by finite size and speed. We just judge the quality of “randomness” by how little we can still discern from it. Even slight patterns being detectable is defined as bad “randomness”. And MD5 or the like actually have almost completely predictable patterns. — 2A0A:A546:59D2:1:4D8E:2A19:88D7:634 (talk) 16:09, 15 November 2024 (UTC)

Removed factoid about invasion of Grenada

Hi. I wanted to log that I removed a fact mentioning that books containing one-time pads from Cuba were found in a warehouse during the 1983 U.S. invasion of Grenada. I spent quite a while searching for a source for this and could find nothing besides sources that re-publish this article. If anybody finds such a source or objects to this removal, please add it back! — Preceding unsigned comment added by A40585 (talkcontribs) 20:50, 5 June 2022 (UTC)

Ah, one more thing, there is a copy of this document on one of those sketchy course note/exam reupload sites that wants my email. The link is here https://www.yumpu.com/en/document/view/30002213/4-secret-bits-harvard-school-of-engineering-and-applied-sciences-/21 if you want to throw your personal information into the abyss but maybe help find a good citation for 2 facts in this article (that the OTP and quantum crypto are intimately connected and the 1983 invasion of grenada. A40585 (talk) 02:36, 7 June 2022 (UTC)

:Just use one of the many, many free throwaway e-mail services, like Mailinator. :) (They also have lots of unofficial alternate domains.)

:I’m never giving out my private address to anything anymore. Also, on GMail one is of course already lost to the ultimate data kraken, but they have a function to add a “+sometext” before the @, and receive the mail anyway. So you can filter by it. So you can just mark everything with such a tag as spam. (In my case, I made it a whitelist, by marking everything *without* a tag as spam. But I use my own implementation on my own mail servers.) 2A0A:A546:59D2:1:4D8E:2A19:88D7:634 (talk) 16:04, 15 November 2024 (UTC)

DVD movies as OTP

Hi, I "invented" this method at University.

Interesting note here, the more obscure the DVD the better, ie a film that is long out of copyright.

Also worth noting that the only data you need to send is the ISBN which doesn't change, and the offset within the encrypted stream. The decode and encode operations only need the most basic of computers, ie a Pentium class CPU and optical drive.

Supposedly this is being used by (folks) in (location) to send data to UK authorities in real time in a way that can't be intercepted, but at the moment I can't confirm or deny this. 78.111.195.1 (talk) 07:50, 9 March 2023 (UTC)

:DVDs are not random. If it isn't random, it isn't a one time pad. Jc3s5h (talk) 14:02, 9 March 2023 (UTC)

NSA Orion and Medea description

I think that it is inaccurate to describe the second line (or the other side) alphabets as random (as in randomly mixed). They are still sequential (but reversed) - the randomness comes from random shift (or rotation) of each second line.

Also it may be worth mentioning that unlike Diana they include digits so the alphabet is 36 characters long which simplifies and shortens encoding numbers. 46.113.0.10 (talk) 22:52, 29 September 2024 (UTC)

Misuse of the term of mathematical “proof”

Mathematics itself cannot prove anything. Gödel’s incompleteness theorem showed that that would result in a self-contradiction. So the use of “proof” in mathematics, especially as if it were somehow superior to anything from the real world, is not just questionable, but harmful pseudo-science. In reality, there is only statistical reliability of predictions in relation to to relativistic observation. Without that, the axioms of mathematics would be no different than religious dogma. … So the text in the article needs to be worded very differently, to gain any notion of being scientific, and not just feed the schizophrenic cults that want to claim a higher authority of their delusions than of actual reality. (As in: Those nutjobs who want to claim that reality is based on mathematics, instead of mathematics simply being a formalization of neural pattern matching.) — 2A0A:A546:59D2:1:4D8E:2A19:88D7:634 (talk) 16:00, 15 November 2024 (UTC)

:Your reasoning regarding the use of a mathematical proof in the real world is socalled original research. Against the source cited for the contested content something more is needed. Lklundin (talk) 16:06, 15 November 2024 (UTC)