All Exams Test series for 1 year @ ₹349 only
Question

If A and B choose $p = 47$, $g = 3$, and A picks a random number $x = 8$ and B picks a random number $y = 10$, what are the secret keys for A and B, respectively, using the Diffie-Hellman key exchange algorithm?

The correct answer is
3, 3

Diffie-Hellman Algorithm Overview

The Diffie-Hellman key exchange is a method for two parties to establish a shared secret key over an insecure network. It utilizes public parameters and private keys for calculation.

Diffie-Hellman Calculation Steps

The required parameters are:

  • Prime modulus: $p = 47$
  • Generator: $g = 3$
  • A's private key: $x = 8$
  • B's private key: $y = 10$

The core of the Diffie-Hellman calculation is to find the shared secret key $S$, which is computed as $S = g^{xy} \pmod{p}$.

Compute the Exponent

First, multiply the private keys selected by A and B.

$xy = 8 \times 10 = 80$

Calculate the Shared Secret

Next, raise the generator $g$ to the power of the computed exponent $(xy)$, and find the result modulo $p$.

$S = g^{xy} \pmod{p}$

$S = 3^{80} \pmod{47}$

Following the calculation using the provided parameters, the resulting shared secret value is 3.

Since Diffie-Hellman generates a single shared secret key, both participants A and B will compute the same value.

Thus, the secret keys for A and B are respectively 3 and 3.

Was this answer helpful?

Important Questions from Cryptography

  1. SHA-1 is a cryptographic hash function used to generate a hash value of

  2. Symmetric encryption is also known as:

  3. Which of the following statement(s) is/are correct regarding digital certificates?

    I. A digital certificate does not include the name of the CA who issues it.

    II. Digital certificates are based on public key cryptography.

    III. These certificates are available only in one strength i.e. 128-bit encryption.

  4. Communication between end systems is encrypted using a key that is commonly referred to as a:
  5. The information transformed during encryption is _________.

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App