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

In an RSA system, the public key of a given user is $e = 65$, $n = 2881$. What is the private key of this user?

The correct answer is
725

RSA Key Generation Overview

The RSA system is a widely used method for asymmetric encryption. It relies on the mathematical difficulty of factoring large integers. A key pair, consisting of a public key and a private key, is generated. The public key is used for encryption, while the private key is used for decryption.

Here are the fundamental steps in RSA key generation:

  • Select two large, distinct prime numbers, denoted as p and q.
  • Calculate the modulus n by multiplying p and q (n = p * q). This modulus n is part of both the public and private keys.
  • Compute Euler's totient function, represented as \(\phi(n)\), using the formula \(\phi(n) = (p-1)(q-1)\).
  • Choose a public exponent e. This integer must satisfy 1 < e < φ(n) and be relatively prime to \(\phi(n)\) (i.e., \(\gcd(e, \phi(n)) = 1\)). The public key consists of the pair (e, n).
  • Calculate the private exponent d. This value is the modular multiplicative inverse of e modulo \(\phi(n)\), meaning it satisfies the congruence relation \(d \times e \equiv 1 \pmod{\phi(n)}\). The private key consists of the pair (d, n).

RSA Factoring the Modulus n=2881

The first step in finding the private key is to factor the given modulus n = 2881 into its prime factors, p and q.

To find these primes, we can test divisibility by prime numbers. It's efficient to start testing primes near the square root of n. The square root of 2881 is approximately \(\sqrt{2881} \approx 53.67\).

By testing primes around this value, we discover that 43 is a divisor:

2881 / 43 = 67

Both 43 and 67 are prime numbers. Thus, we have found our p and q: p = 43 and q = 67 (or vice versa).

Totient Function Calculation

Next, we calculate the value of Euler's totient function, \(\phi(n)\), using the identified primes p=43 and q=67.

The formula is \(\phi(n) = (p-1)(q-1)\).

Substituting the values:

\(\phi(n) = (43 - 1) \times (67 - 1)\)

\(\phi(n) = 42 \times 66\)

\(\phi(n) = 2772\)

So, the value of \(\phi(n)\) is 2772.

Private Key Calculation

We need to compute the private exponent d. This value d must satisfy the condition \(d \times e \equiv 1 \pmod{\phi(n)}\), where e = 65 and \(\phi(n) = 2772\).

This requires finding the modular multiplicative inverse of e = 65 modulo 2772. The Extended Euclidean Algorithm is the standard method for this calculation.

First, we apply the Euclidean Algorithm to find the greatest common divisor (GCD) of 2772 and 65:

Iteration Division Step
1 \(2772 = 42 \times 65 + 42\)
2 \(65 = 1 \times 42 + 23\)
3 \(42 = 1 \times 23 + 19\)
4 \(23 = 1 \times 19 + 4\)
5 \(19 = 4 \times 4 + 3\)
6 \(4 = 1 \times 3 + 1\)

The GCD is 1, confirming that an inverse exists. Now, we rearrange the equations to express the GCD (1) as a linear combination of 2772 and 65:

Back-Substitution Step Linear Combination
1 (from Iteration 6) \(1 = 4 - 1 \times 3\)
2 (substitute 3 from Iteration 5) \(1 = 4 - 1 \times (19 - 4 \times 4) = 5 \times 4 - 19\)
3 (substitute 4 from Iteration 4) \(1 = 5 \times (23 - 1 \times 19) - 19 = 5 \times 23 - 6 \times 19\)
4 (substitute 19 from Iteration 3) \(1 = 5 \times 23 - 6 \times (42 - 1 \times 23) = 11 \times 23 - 6 \times 42\)
5 (substitute 23 from Iteration 2) \(1 = 11 \times (65 - 1 \times 42) - 6 \times 42 = 11 \times 65 - 17 \times 42\)
6 (substitute 42 from Iteration 1) \(1 = 11 \times 65 - 17 \times (2772 - 42 \times 65)\)
\(1 = 11 \times 65 - 17 \times 2772 + 714 \times 65\)
\(1 = (11 + 714) \times 65 - 17 \times 2772\)
\(1 = 725 \times 65 - 17 \times 2772\)

The final equation shows that \(725 \times 65 = 1 + 17 \times 2772\). This confirms that \(725 \times 65 \equiv 1 \pmod{2772}\).

Therefore, the modular multiplicative inverse d is 725.

RSA Private Key Result

The private key d corresponding to the public key (e=65, n=2881) is 725.

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