# Tag Info

3

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? No. (Please keep reading…) A single mathematical formula won’t cut it. That’s where cryptographic algorithms come in. There are more than a handfull of cryptographically secure ...

3

$c_2 \: = \: m\oplus k_2 \: = \: m\oplus k_1 \oplus k_1 \oplus k_2 \: = \: c_1 \oplus k_1 \oplus k_2$ $k_1 \oplus k_1 \: = \: 00000...00000$ Since fixing either argument turns xor into a bijection, the distribution of $\: k_1 \oplus k_2$ is uniform on non-zero strings. $\;\;\;$ Thus, knowledge of $c_1$ is enough to sample from $c_2$'s distribution, so ...

2

The most an attacker can find out is that $c_1 \oplus c_2 = m \oplus k_1 \oplus m \oplus k_2 = k_1 \oplus k_2$. But since both $k_1$ and $k_2$ are fully random and not reused it won't help the attacker to find either $k_1$ or $k_2$. Basically each key stream is still encrypted with the other key stream. Note that for OTP $k_1 \ne k_2$ is an invalid ...

2

What you need for this is something called an $n$-wise independent hash function (like "pairwise independent" but $n$ instead). Such a hash function has the property that when applied to at most $n$ different inputs, its outputs are completely random. These can be constructed efficiently; e.g., a random polynomial of the appropriate degree works. What you ...

2

Assume that $P_1$ contains " the ". In that case you can get the key stream by XOR'ing " the " with $C_1$, lets call this key stream $K^1$. If this key stream is correct then $P_3^1$ should make sense, where $P_3^1 = K^1 \oplus C_3$. If $P_3^1$ doesn't make sense then you can create $K^2$ and $P_3^2$ from $C_2$ in using an identical calculation and check ...

2

According to the definition on Wikipedia, both are valid uses of the term "one time pad" - "each bit or character of the plaintext is encrypted by combining it with the corresponding bit or character from the pad using modular addition." - that is: e=(d+p)%m, where e=encrypted data, d=decrypted data (input), p=pad, m is the number of possible values in e, d, ...

1

There is no security difference. Of course, purely random characters with entropy rate $\log M$ where $M$ is the size of the alphabet should be independently generated and used for the OTP, whatever the size $M$ of the alphabet.

1

Perfect secrecy requires that your key be as long as the plaintext you are encrypting. If you want to use the same key to encrypt multiple messages, you can use each part of the key once as a one-time pad. Your idea (assuming you fix the issue raised by poncho) seems to be just a more complicated way to achieve the same thing. If you remove the ...

1

Both constructions are not perfectly secure! In an attempt to express things a bit more mathematically, I'd say you can implement a one-time-pad with a message $m$ and a key $r$, when $m$ and $r$ are elements of $\mathbb{Z}/n\mathbb{Z}$, the additive group of integers modulo n, or when $m$ and $r$ are elements of a group $G$ isomorphic to ...

Only top voted, non community-wiki answers of a minimum length are eligible