Questions tagged [one-time-pad]

A one-time pad is an encryption method that uses a key (the pad) that is as long as the message. It provides perfect secrecy but at the cost of having as much key data as payload. Not to be confused with one-time passwords.

A one-time pad is an encryption method that consists of encrypting each character in the message independently. The nth character of the pad specifies how to encrypt the nth character of the message: ciphertext[n] = pad[n] xor plaintext[n]. As the name indicates, the pad may only be used once.

This (or variations thereof) is the only encryption method that provides theoretical perfect secrecy (revealing only the length of the message). However, as it requires a key (the pad) that as long as the message, that must be perfectly random, that must be shared between the sender and the recipient, and that may not be reused, one-time pads are often not practical.

Not to be confused with OTP as in .

39 questions
77
votes
10 answers

Why even use a one-time pad if the key distribution is fully secured?

I had a job interview yesterday where they asked what the only scenario where a one-time pad can be broken would be, my answer to which was "when the key distribution process is not secure enough". They praised my answer, but they asked me another…
Riley Willow
  • 1,129
  • 9
  • 10
30
votes
3 answers

Why is one-time pad informationally secure?

I am reading "Serious cryptography" and he wrote the following: Informational security is based not on how hard it is to break a cipher, but whether it’s conceivable to break it at all. A cipher is informationally secure only if, even given…
YozNacks
  • 403
  • 2
  • 4
29
votes
7 answers

Can you say that since one time pad encryption is unbreakable, it is the best if used properly?

I'm currently reading about one time pad encryption, and I have a question. They say OTP encryption is unbreakable, and this can be proved mathematically. This is provided that the key used is truly random and is used only one time, right? What if I…
Saoud
  • 407
  • 1
  • 4
  • 6
22
votes
9 answers

Are there any systems out there that use a one-time pad?

I'm still new to information security, but I have read a bit about the one-time pad. The point that sticks out to me the most is that it is supposedly unbreakable. Has this method of encryption ever been incorporated in any internet web applications…
rackonnoiter
  • 339
  • 2
  • 5
7
votes
4 answers

Best practices for usefully storing two factor authentication backup codes?

For a lot of web services offering two factor authentication, after setting up the system, you are given a short list of backup codes (one-time pads) that are around 7-10 characters long. These are meant to be used in cases where you do not have…
7
votes
2 answers

Decrypt cipher texts encypted with the same one time pad key

I have two pieces of ciphertext encrypted with a stream cipher using the same key. How do I recover the plaintext of both ciphertext messages without knowing the key used?
Alan Coromano
  • 183
  • 1
  • 1
  • 5
6
votes
2 answers

Why is using a pseudo-random key considered more practical than a one-time pad?

I am experiencing confusion regarding one-time pads. I have read that a one-time pad generates a key that has the same length as the plaintext. This is considered to be an overhead in sharing such a large key. So how could a pseudo-random key…
Humam Shbib
  • 171
  • 3
5
votes
1 answer

How to Encrypt Credit Card number for storing it in sql server database according to PCI DSS Requirement?

According to PCI-DSS 3.4 Requirement: Render PAN unreadable anywhere it is stored by using the below methods: One-way hash Truncation Index tokens and pads Strong cryptography with associated key-management processes and procedures My question…
RajeshKannan
  • 585
  • 2
  • 7
  • 12
5
votes
2 answers

How to use one time pad if the key is shorter than the plaintext?

I understand that one of the requirements (and a major drawback) of OTP is that the key has to be as long as the message is. What happens if I have a key that is shorter? The message would only get encrypted partially, right? For example if my Key…
user34483
5
votes
2 answers

Attack against OTP Cipher

What would be an attack against an insecure instance of the OTP cipher given two challenge ciphertexts using the same key in order to get the plaintext? I've tried to implement some approaches with Python but it did not work.(I'm a beginner in cyber…
Coga
  • 69
  • 3
4
votes
1 answer

Infinite one time pads, brute force multiple pads?

So based on my understanding using the same key for encrypting two completely random plain texts when using an otp cipher will still retain perfectly secret. This is based on the answers on this question. The answers to those questions also say…
3
votes
2 answers

Can this modified 'Many' Time Pad be made 'stronger' by using an extrememly long key?

Starting with a one time pad say you want to encrypt some small strings like the words in this sentence but you want to reuse the same OTP key for each string so that when you encounter the same word the ciphered text comes out the same. But say…
erotavlas
  • 133
  • 5
3
votes
1 answer

How to fix this broken crypto protocol?

I am considering a protocol where you upload a one time pad to a server, using public key encryption and then the result (using the pad) is sent back in plaintext: Alice uses Bobs RSA public key to request a file Bob replies over RSA that it is…
emberfang
  • 199
  • 8
3
votes
5 answers

Advantages of one time pad

I always hear that one time pad'ing something is so great because you won't know if you've successfully decrypted the data. I understand the idea that you can XOR any bits just the same as any other bits and you won't inherently be "alerted" to the…
tau
  • 397
  • 3
  • 8
3
votes
2 answers

What is ("ASCII" redundancy) which is said to be required to retrieve the original plain text in 2 times pad?

Sorry for the long title :$ In a video speaking about attacks on the one time pad which uses psudorandom generators (PRG), It's said that Eve can retrieve the plain text of 2 messages that have been encrypted using the same key by XORing the two…
HSN
  • 1,188
  • 12
  • 23
1
2 3