Questions tagged [three-pass-protocol]

The three-pass protocol uses commutative encryption to let two people communicate privately without having to exchange keys in advance.

The three-pass protocol is a cryptographic protocol that allows two people to communicate privately without having to exchange keys in advance. It is based on commutative encryption, i.e. an encryption method $E$, and its corresponding decryption method $D$, which allow a message encrypted with two different keys to be decrypted using those keys in either order.

The protocol gets its name from the fact that transmitting a secret message $M$ from Alice to Bob requires the exchange of three messages:

  1. ${\rm Alice \to Bob}: \quad C_A = E(K_A, M)$
  2. ${\rm Bob \to Alice}: \quad C_{AB} = E(K_B, C_A)$
  3. ${\rm Alice \to Bob}: \quad C_B = D(K_A, C_{AB})$

Bob then calculates $M = D(K_B, C_B) = D(K_B, D(K_A, E(K_B, E(K_A, M))))$. Because $(E,D)$ is a commutative encryption method, the decryption succeeds even though it's done in the "wrong order".

For the three-pass protocol to be secure, an attacker observing the encrypted messages $C_A$, $C_{AB}$ and $C_B$ must not be able to determine the secret message $M$. A trivial implementation of the three-pass protocol using a synchronous stream cipher $E(K,M) = D(K,M) = S(K) \oplus M$ is not secure, since an attacker can calculate

$$C_A \oplus C_{AB} \oplus C_B = (S_A \oplus M) \oplus (S_B \oplus S_A \oplus M) \oplus (S_B \oplus M) = M,$$

where $S_A = S(K_A)$ and $S_B = S(K_B)$ are the keystreams used by Alice and Bob.

The first secure three-pass protocol was developed by Adi Shamir circa 1980, and is based on modular exponentiation, i.e. $E(K, M) = M^{e_K} \bmod p$, $D(K, C) = C^{d_K} \bmod p$, where $p$ is a large prime and $e_K d_K \equiv 1 \pmod{p-1}$. The Massey–Omura cryptosystem, a similar system developed in 1982 by James Massey and Jim K. Omura, uses exponentiation in the Galois field $GF(2^k)$ instead.

The three-pass protocol does not (and generally cannot) provide authentication. In particular, this means that, if Alice and Bob have no means of authenticating each other, an attacker controlling the communications channel between them can impersonate Bob to Alice and vice versa, and can thus decrypt and/or modify any messages, or even send completely bogus messages to either party.

19 questions
7
votes
1 answer

Can two people with different one time pads securely exchange a message like this?

Alice has a message, generates a one time pad, encrypts her message and sends it to Bob. Bob generates his own one time pad, encrypts the message again, and sends it back to Alice. Alice then decrypts this message using her one time pad, sends it…
5
votes
2 answers

2way cryptography

Imagine Alice sending Bob a message. They act like this: Alice encrypts a message with her key and sends it to Bob. Bob encrypts the message again with his key and sends it back to Alice. Alice decrypts the message with her key. So now it is…
4
votes
1 answer

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 I imagine that it has a name but I can't find a…
amccormack
  • 143
  • 5
3
votes
1 answer

Does there exist an agreeable algorithm to substitute XOR function in Shamir's no Key Protocol?

I think Shamir's no key protocol (also known as three-pass protocol) is a secure cryptography scheme but the designer only proposed the XOR function to encrypt the message which could be easily broken when the eavesdropper has all the encrypted…
polan
  • 33
  • 5
3
votes
2 answers

Ballot box with multiple parties. All can read it, or none can read it

I am trying to create a decentralized moderation system for the game Diplomacy, a game for seven players. In each round of a face-to-face game, each player writes their moves on paper then puts it in a box; all moves are read at once. The game was…
000
  • 133
  • 5
2
votes
0 answers

Shamir three-pass protocol Elliptic Curve

I want to know how I can implement this protocol. I know how Shamir three pass protocol operates without elliptic curve, but I don't know how I can perform it with elliptic curve. I read about this protocol; if Alice want to send to Bob then: Alice…
Cugar19
  • 21
  • 1
2
votes
1 answer

What would happen if the last message in a three-pass authentication protocol was undelivered?

I did read some articles about the protocol but couldn't figure out what would happen. Would the two parties be unable to verify each other? Or would it be something else? based on the international standard ISO/IEC 9798-2.
user658961
  • 45
  • 3
2
votes
1 answer

Requirements for the modulus in the Massey-Omura three pass protocol

In the Massey-Omura three pass protocol: How many bits long should the prime modulus $M$ be in order to be secure? Should the $M$ be secret? Should the $M$ be generated every time or it could be reused to generate new keys?
1
vote
1 answer

Two formulas work for this three-pass exchange problem, but I can't figure out why one of them works

Problem statement: "Suppose that users Alice and Bob carry out the 3-pass Diffie-Hellman protocol with p = 101. Suppose that Alice chooses a 1 = 19 and Bob chooses b 1 = 13. If Alice wants to send the secret message m=5 to Bob, show all the messages…
1
vote
1 answer

Multiple encryption using the same key

I am a newbie to this area. I have a program that uses a custom algorithm to encrypt a message. I can encrypt it as many times as I want, but using the same key. I have couple of questions so that I can improve my algorithm. My program support…
1
vote
1 answer

Is it safe to publicly announce the prime number in Shamir three-pass protocol

So say, I want to use a prime number p for anyone that wants to communicate with me using Shamir's Three Pass Protocol. I will be maintaining my secret keypair (encryption exponent, decryption exponent) and will be expecting other parties to create…
1
vote
1 answer

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

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₁…
0
votes
1 answer

Is establishing a secret key possible given this characteristic primitive?

I am wondering if there are any readily available solutions for the following problem: I have a ring-topology network with several devices connected to it, some malicious, some legitimate. I want to authenticate / establish a shared key between two…
0
votes
0 answers

Three Pass Protocol Question!

Alice and Bob have agreed to use the Three Pass Protocol. p=1009 Alice chooses the encryption exponent e_A = 101 Bob chooses the encryption exponent e_B = 209 Now Alice and Bob send three encrypted messages: y1, y2, and y3 in this order. Which of…
0
votes
2 answers

Would a OTP No-Key Protocol work?

Consider Shamir's No-Key protocol. What if you substitute the asymmetric operations with XOR, each party using an ephemeral OTP. It's symmetric, so you could apply the protocol scheme as if it were homomorphic It's much faster than Shamir's…
AdHominem
  • 141
  • 1
  • 7
1
2