Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If an attacker were able to get a hold of 2 encrypted messages that were both encrypted in a one time pad with a password that were each similar but had one change in the first character, could it still be cracked? Let's say my first set of data was encrypted with "1password" and my second set of data was encrypted with "2password". Could it still be easily cracked?

share|improve this question
If you use it twice, it's not a one time pad. That's a two time pad, or as you described it: "almost a two time pad". It's called a one time pad for a reason, and "one time" is required to ensure it remain secure. – TTT Jun 3 '14 at 13:54
up vote 5 down vote accepted

What do you mean 'a one time pad with a password'? One time pads don't take passwords, they take samples of truly random data as long as the message.

If what you're doing is taking the password, repeating it N times, and using that as if it were a random one-time pad, well, that can usually be broken even if you don't send a second message.

If what you're doing is you do have a truly random pad (which you are calling the password; however if you message is 10,000 characters long, so is your 'password'), and if you send a second message with a slight modification of the pad, then yes, it can be broken; the standard attacks against a 'two-time-pad' will work well (even if the pads are slightly different).

Bottom line: if you're relying on a 'one time pad', then it is mandatory that the pad be random, as long as the message, and not related to any other pad you may use. If you violate this, the security proof for one time pad does not apply (and you are usually, in fact, insecure).

share|improve this answer
I would upvote you right now but I can't, but thank you. – Riley Galloway Aug 8 '13 at 15:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.