# Questions tagged [one-time-pad]

A cipher which uses a different encryption key every time, as long as the message. The key is XOR'ed with the message to render the cipher text which can then be XOR'ed with the same key to get the plain text.

65 questions
3answers
61k views

### How does one attack a two-time pad (i.e. one time pad with key reuse)?

My question might appear the same as the question Taking advantage of one-time pad key reuse?, but actually I did read all the answers and none of them helped me with the details I need. I am new to ...
7answers
75k views

### Taking advantage of one-time pad key reuse?

Suppose Alice wants to send encryptions (under a one-time pad) of $m_1$ and $m_2$ to Bob over a public channel. Alice and Bob have a shared key $k$; however, both messages are the same length as the ...
2answers
1k views

### Mathematical formula for switching the key for OTP?

Instead of generating the random key for the one time pad cipher over and over again, is there a mathematical formula that allows you to switch the key to a new key? The new key must be as random and ...
1answer
26k views

### How to attack a “many-time pad” based on what happens when an ASCII space is XORed with a letter?

I've already sent my correct solution to a homework exercise from Dan Boneh's Introduction to Cryptography class on Coursera: "Let us see what goes wrong when a stream cipher key is used more than ...
3answers
3k views

### Can I use a one time pad key twice with random plaintext?

I understand the basics of OTP: $|\text{key space}| = |\text{plaintext space}|$ implies perfect security, key reuse destroys this. Cryptanalysis on the $N$-Time Pad for $N > 1$ involves finding ...
3answers
6k views

### How is the One Time Pad (OTP) perfectly secure?

The Wikipedia entry on One Time Pads (OTPs) states that if this cipher is used properly; ie, the keys are truly random and each part of the key is independent of every other part, it's uncrackable, ...
8answers
26k views

### Simply put, what does “perfect secrecy” mean?

I would like to ask for a clear (but maybe not so deep) explanation of what the term "perfect secrecy" means. As far as I have researched and understood, it has to do with probabilities of assuming ...
1answer
1k views

### Hash functions to generate one time pad

Newbie question... may be... Stream cypher, will XOR message bits with one time pad bits Suppose I have a pseudo random number generator, like a Mersenne twister or sort of. I could use the speudo-...
2answers
1k views

### Using hash for one time pad key

Recently I've been delving into security algorithms, I already knew some of the (easy) math behind AES and RSA and how to and not to implement it. But well, i got a bit bored so i thought I'd just do ...
2answers
6k views

### Proving the semantic security of the One Time pad

Currently hearing a lecture on cryptography, and the professor gave us the definition of semantic security, which is roughly the following (formally not quite complete, but you get the idea): Given ...
3answers
4k views

### One time pad: why is it useless in practice?

The symmetric cryptosystem one-time pad (OTP) seems to be very beautiful since it is perfectly secret according to Shannon. Many books, however, point out the main drawback: one must create a secret ...
1answer
7k views

### Many time pad attack (XOR) [duplicate]

The question is quite similar to Many time pad attack and I was trying to rely on the top answer, but still am a bit confused, so any explanation and help will be much appreciated. Assume I have a ...
1answer
1k views

### For a one-time pad, which MAC method is information-theoretically secure?

In the the main post about MAC methods it mentions a few methods: Authenticate And Encrypt: The sender computes a MAC of the plaintext, encrypts the plaintext, and then appends the MAC to the ...
2answers
1k views

### Is OTP useful in modern electronic communication?

I have seen from time to time questions about various OTP schemes and "OTP" (i.e. stream cipher) schemes. The most common OTP troubles appear to be: How to extend size of previously generated key or ...
2answers
583 views

### Is there a companion algorithm for OTP to ensure integrity and/or authentication?

One-Time Padding is (theoretically) perfect encryption algorithm. Let's assume that these problems are solved: Fast generation of independent and identically distributed random variables Perfect key ...
3answers
747 views

### Why in one time pad must the key distribution to be truly random

One time pad required a truly random key. Why canwt it be a psudo-random key? For example, if the key distribution is that for each bit the probability to get 1 is 0.6 and the probability to get 0 is ...
7answers
11k views

### What is the difference between a stream cipher and a one-time-pad?

A (synchronous) stream cipher is an algorithm which maps some fixed-length key to an arbitrary-length key-stream (i.e. a sequence of bits): $C : \{0,1\}^k \to \{0,1\}^{\infty}$. This key-stream is ...
4answers
2k views

### If I am about to generate one-time pad, where should I generate my pads from?

If I want to generate a few one-time pads, is it OK to just read required number of bytes from /dev/urandom without weakening information-theoretical security?
1answer
1k views

### A “one time pad” can be thought of a Vigenere cipher with

A "One Time Pad" can be thought of a Vigenere cipher with... An infinitely long key A secure symmetric key Multiple ciphertext alphabets A columnar transposition I had this question come up ...
4answers
1k views

### Is the One Time Pad (OTP) considered a cryptographic hash function?

As the title states, would the One Time Pad (OTP) be considered a cryptographic hash function?
2answers
70 views

### Is one time pad cipher reuse and random key secure?

The sender and receiver share two different secret keys: s1 and s2 both y bit values. 'x' is a randomly generated y bit value. The reader sends to the tag a challenge y = x ⊕ s1, and the receiver ...
3answers
1k views

### Implementing a one-time pad without binary?

I found a program which takes a purely alphabetical message, converts the letters to their ASCII values and combines them with the ASCII values of an alphabetical key (wrapping around when it gets to ...
2answers
262 views

### Present an attack for the combination of OTP and textbook RSA

Let $N=p \times q$ where $p$ and $q$ are two primes. Compute $\Phi (N) = (p-1)(q-1)$. Choose $e$ s.t. $1 < e < \Phi(N)$ and $gcd(e,\Phi(N))=1$. Compute $d = e^{-1}(mod \ \Phi(N))$. Set ...
1answer
457 views

### Explain same encryption time for two files of different sizes

I am encrypting files in a two layered fashion as follows: Inner layer is 128 bit AES-CTR encryption Outer/Second layer is a simple one time padding with a particular key. While testing the running ...
2answers
5k views

### What to do when crib dragging does not work in OTP (One-time pad) ciphers?

With a Cipher text of ...
7answers
11k views

### Why is OTP not vulnerable to brute-force attacks?

I saw this question on the book Understanding Cryptography. At first glance it seems as though an exhaustive key search is possible against an OTP system. Given is a short message, let’s say 5 ...
1answer
5k views

### One-time pad and zero key

I'm doing some exercises before my exam, and I am stuck with task number 4 in this file: http://www.cs.umd.edu/~jkatz/crypto/f10/hw1.pdf Could you help me with this task? When using the one-time ...
6answers
1k views

### Are picture files “random enough” to be usable as a one-time pad?

Say you have a picture with 1 megapixels taken at random and with $2^{24}$ possible colours per pixel (RGB-24). That image would be unique and the possible combinations $(2^{24})^{10^6}$ immense. ...
4answers
3k views

### Is One Time Pad considered Chosen-Plaintext Attack Secure?

If we're considering Chosen-Plaintext Attack setting, then the adversary has access to the Encryption Oracle right, and we know that OTP is only considered secure if we use the key only once. How ...
2answers
220 views

### Perfect Deniability of a MAC

Overview One feature that is often underlooked of the One-Time Pad is its perfect deniability. i.e. If Alice sends a message to Bob that is seen by Eve then if Eve later goes to Alice with the ...
1answer
266 views

### Is the one-time pad still perfectly secret if all-zero keys are excluded?

I'm trying to solve this question related to one-time pads and perfect secrecy: My solution is: I assumed that the current message space is $M = \left\{ 0,1 \right\}^l$ and the new keyspace after ...
1answer
410 views

### What is the name of this kind of protocol

There is a communication protocol that I believe creates the equivalent of a one time pad, with the downside that the secret message must be transferred multiple times. The protocol is so simple that ...
1answer
368 views

### Having 4096 bit keys and short (< 256 byte) messages, can I simply use the key as OTP?

Assumptions: Alice and Bob use (cryptographically secure, hardware-rng generated) 4096 bit keys. Each message is encrypted using a new key; meaning: once a key is used, it's destroyed. Alice and Bob ...
2answers
115 views

### Little problem with Vernam Cipher

We have got a task with the following content: Given is a language with 3 letters: A, B, C. The binary expression is: A = 000, B = 1111 and C = 0011 Two ...
1answer
4k views

### decryption many time pad [duplicate]

I have eleven ciphertexts that were encrypted with the same key (which I don't know). I want to decrypt the last ciphertext. I read similar question like Many time pad attack but I can't solve my ...
1answer
464 views

### Breaking One Time Pad with CCA

I was taught that: although OTP is CPA secure, it is not the case with CCA. I'm trying to figure how to break OTP with CCA by showing how it fails the IND test. ...
6answers
581 views

### Does one time pad randomness help brute force attacks?

I understand that attempting to brute force the decryption of a message coded with a one time pad results in generating every possible message. The Wikipedia example is that decoding "EQNVZ" with key ...
1answer
119 views

### Can I securely refill a one time pad over the same connection?

If you have a channel where you are communicating using a one time key, is it possible to receive additional key over that same coonection without compromising security? Naively sending it through ...
2answers
876 views

### Vigenère cipher with sha512 and a little foresight turns to one-time pad. How safe can be?

I'm doing some exercises and of course I have read about the weaknesses of Vigenère cipher because it repeats the key. But what if I use a different hash every time? The hash of the "key + an ...
1answer
162 views

### Is this transposition cipher information-theoretically secure for 1 message?

Given: $m = \{0,1\}^{n}$; a plaintext message of length $n$ encoded in binary $k = randomshuffle([0, 1, ..., 2n-1])$; A secret key consisting out of unique numbers between 0 and $2n-1$ in a true ...
4answers
1k views

### Randomized algorithms and the one time pad

The way I understand it, an algorithm is said to be randomized if it uses randomness as part of its logic (quoting Wikipedia). Now, in the case of encryption algorithms, I assume this means that for ...
1answer
105 views

2answers
858 views

### Two-timing a one-time pad [duplicate]

Is a one-time pad still breakable on a depth of 2+ if the plaintext is completely random? I'm assuming this idea is wrong, mostly because it occurred to me, but let me walk you through my logic so ...
2answers
395 views

### Can you really insert the text you want in one-time pad?

The Wikipedia article "One-time pad ~ Authentication" says : For example, an attacker who knows that the message contains "meet jane and me tomorrow at three thirty pm" at a particular point can ...
3answers
695 views

### One Time Pads and reuse of the decrypted message?

How is it insecure when Alice encrypts a message with a One-Time-Pad to Bob, and Bob then uses the decrypted message from Alice as the next One-Time-Pad? For example: Alice sends Bob a message ...
2answers
540 views

### What are the correct order of operations for One Time Pad Cipher?

According to Wikipedia the One Time Pad Cipher is unbreakable. On the Wikipedia page it explains how to perform this simple encryption process by hand. For the encryption it adds (+) the message and ...
2answers
905 views

### Avalanche noise RNG for one-time pad use

I came across this little HRNG widget and was really intrigued as I have been looking for a decent but afordable source for truly random bits to use in a one-time pad. The question is, would a HRNG ...
3answers
798 views

### Does a stream cipher provide perfect secrecy?

From WAR10CK here: If I actually do create a machine using RC4 or AES-CTR and have a TRNG continually feed it a constant steady stream of random bits. Provided that the stream of bits is purged ...
2answers
438 views

### Can I generate OTP secrets by using a hash?

Since I learned about one time pads in last security lecture, I'm quite fascinated how easy the concept is, but how it still is absolutely safe. Learning from implementing a multi time pad attack, ...