Score:1

Instead of asymetric encryption, why not use two One-time pad?

lc flag

Why is the following protocol never used to share a symetric key between two parties ? ⊕ is the XOR operation.

Alice has M and wants to send it to Bob. Alice generates K₁ randomly. Bob generates K₂ randomly.

  • Alice has M.
  • Alice : M -- ·⊕K₁ --> M⊕K₁
  • Alice sends M⊕K₁ to Bob.
  • Bob : M⊕K₁ -- ·⊕K₂ --> M⊕K₁⊕K₂
  • Bob sends M⊕K₁⊕K₂ to Alice.
  • Alice : M⊕K₁⊕K₂ -- ·⊕K₁ --> M⊕K₂
  • Alice sends M⊕K₂ to Bob.
  • Bob: M⊕K₂ -- ·⊕K₂ --> M
  • Bob has M.

Of course, K₁ and K₂ need to be the same size as M.

cn flag
This is the [Three-pass_protocol](https://en.wikipedia.org/wiki/Three-pass_protocol). It's not secure when using xor, but secure for certain other operations.
cn flag
If you look through the [tag:three-pass-protocol]-tag you'll find a couple of duplicates.
Score:6
my flag

Here's why it doesn't work:

Suppose someone in the middle hears $M \oplus K_1$, $M \oplus K_1 \oplus K_2$ and $M \oplus K_2$.

Then, what they could do is xor the three of them together, giving:

$$(M \oplus K_1) \oplus (M \oplus K_1 \oplus K_2) \oplus (M \oplus K_2) = M$$

Thus recovering the message.

Pierromer avatar
lc flag
Thank you, I am really brain dead :|
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.