# Does a one-time pad of digits 0-9 have any weaknesses?

I'm working on one of those unsolved puzzles, and one theory I have is that one or more sections of it are using digits of pi, e, or some other irrational number as a one-time pad.

(The obvious approach would just be to try well-known irrational numbers, but I've tried that without success and if it is that there must be some other complication.)

Are there any cryptanalysis methods that that allows for that wouldn't apply to a one-time pad composed of letters? One thing that occurred to me is that since letters can't be shifted by more than 9 places, it ought to show very small peaks in its frequency distribution, one-tenth the size of ones for plain text and displaced about five letters to the right along the alphabet. But I don't know how much practical use that would be.

The question is probably equivalent to whether a Gronsfeld cipher has any weaknesses that a Vigenere cipher doesn't.

• Other things aside, does media.sciencephoto.com/c0/01/27/10/c0012710-400px-wm.jpg help? Commented Jan 27, 2021 at 2:10
• What am I looking at here? Can't make it out, except, obviously, that it's a scheme for coding letters as numbers. Commented Jan 28, 2021 at 1:03
• Infinite character sets can be fractionated to 0-9 decimals :-) Commented Jan 28, 2021 at 1:32
• Ah, I see now. Well, these puzzle makers generally favoured mathematically pretty methods, but they did also like cryptographic history, so it's not impossible they might have used such an existing system for auld lang syne! Commented Jan 28, 2021 at 1:53
• I know, I mean the people who made the puzzle I'm working on, not the people who made that chart! :-D Commented Jan 28, 2021 at 5:36

The one-time pad can be made of digits 0-9, and you can read more about that here. One could also use binary digits, 0 and 1, or letters such as A-Z. Those three alphabets are the most common.

Are there any cryptanalysis methods that that allows for that wouldn't apply to a one-time pad composed of letters?

No, there are not. A properly generated one-time pad is going to have equal strength no matter whether it is composed of letters A-Z, numbers 0-9, or the binary digits 0 and 1. The CIA, for example, was fond of using one-time pads composed of numbers 0-9 during the Cold War.

However, in practice, using numbers or binary could possibly introduce errors because of fractionation. In other words, using letters might be more straightforward.

One thing that occurred to me is that since letters can't be shifted by more than 9 places, it ought to show very small peaks in its frequency distribution...

Don't worry about that. It is not the case.

The question is probably equivalent to whether a Gronsfeld cipher has any weaknesses that a Vigenere cipher doesn't.

One can see what you mean by this, but Gronsfeld and Vigenere are a very different kind of cipher from the one-time pad.

• "Don't worry about that. It is not the case." - why? If a computer is used to guess portions of the key that result in valid words, there will be many candidates per position, but probably not too many to process by a human. "Gronsfeld and Vigenere are a very different kind of cipher from the one-time pad." - the only difference I know about is key size. Commented Jan 27, 2021 at 2:58
• One time pad has a random key equal to the size of the message, applied via a bijective transformation (it's reversible and 1:1). All plaintexts are thus equally likely for any given ciphertext: no statistical information about the plaintext is present. That's not the case for Vigenere or Gronsfeld, both leak statistical information about the plaintext. Commented Jan 27, 2021 at 3:09
• @the default One could guess portions of the key all day long and guess plaintext constantly, but that does not matter because there is not way to distinguish what guessed plaintext is correct from guessed plaintext that is incorrect. The key does not repeat like Vigenere. The key of the one-time pad was generated at random and it must be at least as long as the plaintext, something like "HWOXYEPPJNBGS...", etc. The Vigenere key is very different. It is usually a dictionary word(s) such as "apple", etc., and it repeats. Commented Jan 27, 2021 at 3:14
• @Patriot the Vigenere key doesn't have to be a word. "but that does not matter because there is not way to distinguish what guessed plaintext is correct from guessed plaintext that is incorrect." - there is a way: let a human choose results that fit the context the best. Commented Jan 27, 2021 at 3:19
• @the default On your first point, correct. I did say "usually". On the second point, I see what you are getting at, but in practice it does not work. One reason is that codewords could have been used Commented Jan 27, 2021 at 3:36