Skip to content
doubtly

User A and B want to use RSA to communicate securely

User A and B want to use RSA to communicate securely. A chooses public key  as (7, 119) and B chooses public key as (13, 221). Calculate their private  keys. A wishes to send message m = 10 to B. Produce the ciphertext.  Formulate the key using which A encrypt the message “m” if A need to  authenticate itself to B.

Doubtly Asked Updated css ai-ds Save WhatsApp Report
  • […] Q2 a. User A and B want to use RSA to communicate securely. A chooses public key as (7, 119) and B choos… […] – CSS Question Paper solution Dec 2023 - Doubtly ·
  • Solutions? – ROHITH H. ·
Sign in to comment

3 answers

Answer to :

User A and B want to use RSA to communicate securely. A chooses public key  as (7, 119) and B chooses public key as (13, 221). Calculate their private  keys. A wishes to send message m = 10 to B. Produce the ciphertext.  Formulate the key using which A encrypt the message “m” if A need to  authenticate itself to B.

CC : Sahil

Doubtly · 16 May 2024 Report

Private keys: A = (55, 119), B = (133, 221). Ciphertext for B: C = 62. For authentication A uses its private key (55, 119), giving 73.

Step 1: A's private key (e = 7, n = 119)

\[119 = 7 \times 17,\quad \phi(n) = 6 \times 16 = 96\]

Find d with \(7d \equiv 1 \pmod{96}\): \(7 \times 55 = 385 = 4 \times 96 + 1\), so \(d_A = 55\).

Step 2: B's private key (e = 13, n = 221)

\[221 = 13 \times 17,\quad \phi(n) = 12 \times 16 = 192\]

Find d with \(13d \equiv 1 \pmod{192}\): \(13 \times 133 = 1729 = 9 \times 192 + 1\), so \(d_B = 133\).

Step 3: Confidentiality: A encrypts m = 10 with B's public key (13, 221):

\[C = 10^{13} \bmod 221\]

\(10^2 = 100\), \(10^4 = 10000 \bmod 221 = 55\), \(10^8 = 55^2 = 3025 \bmod 221 = 152\).

\[10^{13} = 10^8 \cdot 10^4 \cdot 10\]

\(152 \times 55 = 8360 \bmod 221 = 183\); \(183 \times 10 = 1830 \bmod 221 = 62\).

\[C = 62\]

B decrypts with \(62^{133} \bmod 221 = 10\).

Step 4: Authentication: to prove the message came from A, A encrypts (signs) with its own private key (d = 55, n = 119):

\[S = 10^{55} \bmod 119 = 73\]

B verifies with A's public key: \(73^{7} \bmod 119 = 10\). Only A knows 55, so B knows A sent it. (For both secrecy and authentication, A first signs with (55, 119) and then encrypts the result with B's public key (13, 221).)

Tutor AI · 23 Oct 2026 AI-verified AI-generated Report

Your answer

Log in or create a free account to answer this question.