ArticleslgStudy

computer science

Three-pass protocol

Three-pass protocol is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Three-pass protocol rather than just read about it. In short: In cryptography, a three-pass protocol for sending messages is a framework which allows one party to securely send a message to a second party without the need to exchange or distribute encryption keys. Such message protocols should not be confused with various other algorithms which use 3 passes for authentication.

Key takeaways

  • Three-pass protocol belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Three-pass protocol to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Three-pass protocol from memory before moving on to harder problems.

Reference excerpt

In cryptography, a three-pass protocol for sending messages is a framework which allows one party to securely send a message to a second party without the need to exchange or distribute encryption keys. Such message protocols should not be confused with various other algorithms which use 3 passes for authentication. It is called a three-pass protocol because the sender and the receiver exchange three encrypted messages. The first three-pass protocol was developed by Adi Shamir circa 1980, and is described in more detail in a later section. The basic concept of the three-pass protocol is that each party has a private encryption key and a private decryption key. The two parties use their keys independently, first to encrypt the message, and then to decrypt the message. The protocol uses an encryption function E and a decryption function D. The encryption function uses an encryption key e to change a plaintext message m into an encrypted message, or ciphertext, ⁠ E ( e , m ) {\displaystyle E(e,m)} ⁠. Corresponding to each encryption key e there is a decryption key d which allows the message to be recovered using the decryption function, ⁠ D ( d , E ( e , m ) ) = m {\displaystyle D(d,E(e,m))=m} ⁠. Sometimes the encryption function and decryption function are the same. In order for the encryption function and decryption function to be suitable for the three-pass protocol they must have the property that for any message m, any encryption key e with corresponding decryption key d and any independent encryption key k, ⁠ D ( d , E ( k , E ( e , m ) ) ) = E ( k , m ) {\displaystyle D(d,E(k,E(e,m)))=E(k,m)} ⁠. In other words, it must be possible to remove the first encryption with the key e even though a second encryption with the key k has been performed. This will always be possible with a commutative encryption. A commutative encryption is an encryption that is order-independent, i.e. it satisfies ⁠ E ( a , E ( b , m ) ) = E ( b , E ( a , m ) ) {\displaystyle E(a,E(b,m))=E(b,E(a,m))} ⁠ for all encryption keys a and b and all messages m. Commutative encryptions satisfy ⁠ D ( d , E ( k , E ( e , m ) ) ) = D ( d , E ( e , E ( k , m ) ) ) {\displaystyle D(d,E(k,E(e,m)))=D(d,E(e,E(k,m)))} ⁠. The three-pass protocol works as follows:

The sender chooses a private encryption key s and a corresponding decryption key t. The sender encrypts the message m with the key s and sends the encrypted message ⁠ E ( s , m ) {\displaystyle E(s,m)} ⁠ to the receiver. The receiver chooses a private encryption key r and a corresponding decryption key q and super-encrypts the first message ⁠ E ( s , m ) {\displaystyle E(s,m)} ⁠ with the key r and sends the doubly encrypted message ⁠ E ( r , E ( s , m ) ) {\displaystyle E(r,E(s,m))} ⁠ back to the sender. The sender decrypts the second message with the key t. Because of the commutativity property described above ⁠ D ( t , E ( r , E ( s , m ) ) ) = E ( r , m ) {\displaystyle D(t,E(r,E(s,m)))=E(r,m)} ⁠ which is the message encrypted with only the receiver's private key. The sender sends this to the receiver. The receiver can now decrypt the message using the key q, namely ⁠ D ( q , E ( r , m ) ) = m {\displaystyle D(q,E(r,m))=m} ⁠ the original message. Notice that all of the operations involving the sender's private keys s and t are performed by the sender, and all of the operations involving the receiver's private keys r and q are performed by the receiver, so that neither party needs to know the other party's keys.

Shamir three-pass protocol The first three-pass protocol was the Shamir three-pass protocol developed circa in 1980. It is also called the Shamir No-Key Protocol because the sender and the receiver do not exchange any keys, however the protocol requires the sender and receiver to have two private keys for encrypting and decrypting messages. The Shamir algorithm uses exponentiation modulo a large prime as both the encryption and decryption functions. That is E(e,m) = me mod p and D(d,m) = md mod p where p is a large prime. For any encryption exponent e in the range 1..p-1 with gcd(e,p-1) = 1. The corresponding decryption exponent d is chosen such that de ≡ 1 (mod p-1). It follows from Fermat's Little Theorem that D(d,E(e,m)) = mde mod p = m. The Shamir protocol has the desired commutativity property since E(a,E(b,m)) = mab mod p = mba mod p = E(b,E(a,m)).

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Three-pass protocol

Start with the simplest possible case. Write down what Three-pass protocol claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Three-pass protocol before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Three-pass protocol ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Three-pass protocol

In research
Three-pass protocol appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Three-pass protocol in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Three-pass protocol is common in secondary-school and first-year university syllabi. It links to neighbouring topics Asymmetric-key algorithms, so understanding it makes those chapters shorter.
In everyday life
Look for Three-pass protocol outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Three-pass protocol in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Three-pass protocol means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Three-pass protocol out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Three-pass protocol in simple terms?

In cryptography, a three-pass protocol for sending messages is a framework which allows one party to securely send a message to a second party without the need to exchange or distribute encryption keys. Such message protocols should not be confused with various other algorithms which use 3 passes f…

Why does Three-pass protocol matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Three-pass protocol?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Three-pass protocol.

Tags

  • Asymmetric-key algorithms

Keep exploring