RSA Algorithm MCQs: 12 Solved Questions with Step-by-Step Explanations
Practise RSA key generation, modular inverses, encryption, signatures and defining equations, with concise working for conceptual and numerical answers.
KnowledgeGate Team
Exam prep & CS education

RSA questions look like formula recall, but most wrong answers come from using n where phi(n) belongs, choosing a non-coprime exponent, or losing a remainder during modular exponentiation. The questions move from prime selection and key inverses to encryption, signatures and equation checks. Select an option and write one line of modular working before reading each explanation.
Place RSA in the wider syllabus through GATE CS Exam Preparation. After this set, use the RSA Algorithm PYQ Questions hub for extra RSA drills.
RSA Algorithm formulas to use before the MCQs
Step | RSA calculation |
|---|---|
Choose primes | Select distinct primes |
Form the moduli |
|
Choose the public exponent | Pick |
Find the private exponent | Solve |
Encryption uses C = M^e mod n; decryption uses M = C^d mod n. These tiny values are teaching examples, not secure real-world key sizes.
Take p = 5, q = 11, e = 3 and M = 7. Then n = 55, phi(n) = 40, and d = 27 because 3 x 27 = 81 ≡ 1 (mod 40). Encrypt: C = 7^3 mod 55 = 343 mod 55 = 13.
For decryption, repeated squaring gives 13^2 mod 55 = 4, 13^4 mod 55 = 16, 13^8 mod 55 = 36, and 13^16 mod 55 = 31. Therefore 13^27 = 13^(16+8+2+1), so the remainder is 31 x 36 x 4 x 13 mod 55 = 7.
Keep the moduli separate: e and d are inverses modulo phi(n), while message and ciphertext powers are reduced modulo n. If decryption does not recover M, recheck the arithmetic.
RSA Algorithm MCQs 1-3: primes and modular inverses
Question 1
A fundamental requirement of the RSA public-key encryption scheme is the ability to generate ________ numbers.
A. complex numbers
B. prime numbers
C. pseudo random numbers
D. random numbers
Correct answer: B. prime numbers.
RSA starts with two large primes, p and q. Their product is the public modulus, and factoring a sufficiently large modulus is difficult. Thus prime numbers is the precise choice. Try this question again.
Question 2
In RSA algorithm if p = 7, q = 11 and e = 13 then what will be the value of d?
A. 23
B. 13
C. 37
D. 40
Correct answer: C. 37.
phi(n) = (7 - 1)(11 - 1) = 60. Now solve 13d ≡ 1 (mod 60). Because 13 x 37 = 481 = 8 x 60 + 1, d = 37.
Question 3
An RSA cryptosystem selects two primes, p = 11 and q = 13. If the private exponent is d = 7, which option can be the public exponent e?
A. 103
B. 143
C. 21
D. 19
Correct answer: A. 103.
Here phi(n) = 10 x 12 = 120, so 7e ≡ 1 (mod 120). Option A works: 7 x 103 = 721 = 6 x 120 + 1. Try this question again.
RSA Algorithm MCQs 4-6: key generation and one-number encryption
Question 4
Using the RSA algorithm, if p = 13, q = 5 and e = 7, the value of d and the cipher value of 6 with the (e, n) key are
A. 7,4
B. 7,1
C. 7,46
D. 55,1
Correct answer: C. 7,46.
n = 65 and phi(n) = 48. Since 7 x 7 = 49 ≡ 1 (mod 48), d = 7. Also, 6^2 mod 65 = 36, 6^4 mod 65 = 61, and 6^7 mod 65 = 61 x 36 x 6 mod 65 = 46. Try this question again.
Question 5
Match List I with List II:
List I | List II |
|---|---|
(A) DES | (I) Key size: 256 bits |
(B) AES | (II) Key size: 1024 bits |
(C) 3DES | (III) Key size: 56 bits |
(D) RSA | (IV) Key size: 168 bits |
A. (A)-(I), (B)-(II), (C)-(IV), (D)-(III)
B. (A)-(III), (B)-(I), (C)-(IV), (D)-(II)
C. (A)-(III), (B)-(IV), (C)-(II), (D)-(I)
D. (A)-(IV), (B)-(II), (C)-(III), (D)-(I)
Correct answer: B. (A)-(III), (B)-(I), (C)-(IV), (D)-(II).
The question matches DES to 56, AES to 256, 3 DES to 168, and RSA to 1024, producing B. This fixed legacy exercise does not mean AES or RSA has only one key size, and it is not current security guidance. Try this question again.
Question 6
Using the RSA public-key cryptosystem, if p = 3, q = 11 and d = 7, find e and encrypt the number 19.
A. 20, 19
B. 33, 11
C. 3, 28
D. 77, 28
Correct answer: C. 3, 28.
n = 33 and phi(n) = 20. Since 7 x 3 = 21 ≡ 1 (mod 20), e = 3. Then 19^2 mod 33 = 31 and 19^3 mod 33 = 31 x 19 mod 33 = 28. Try this question again.
RSA Algorithm MCQs 7-9: signatures and plaintext-to-ciphertext mapping
Question 7
The RSA encryption algorithm also works in reverse, that is, you can encrypt a message with the private key and decrypt it using the public key. This property is used in
A. instruction detection systems
B. digital signatures
C. data compression
D. certification
Correct answer: B. digital signatures.
A verifier uses the public key to check a value produced with the private key. This supports digital signatures, not compression or intrusion detection. Try this question again.
Question 8
The plain text message BAHI is encrypted with the RSA algorithm using e = 3, d = 7, and n = 33; the characters of the message are encoded using the values 01 to 26 for letters A to Z (i.e., A = 1, B = 2, …, Z = 26). Suppose character-by-character encryption is implemented. Then the ciphertext message is _____.
A. ABHI
B. HAQC
C. IHBA
D. BHQC
Correct answer: B. HAQC.
Apply C = M^3 mod 33: B = 2 gives 8 = H; A = 1 gives A; H = 8 gives 512 mod 33 = 17 = Q; and I = 9 gives 729 mod 33 = 3 = C. Thus the ciphertext is HAQC. Try this question again.
Question 9
Using p = 3, q = 13, d = 7 and e = 3 in RSA, what is the ciphertext for plaintext 5?
A. 8
B. 21
C. 26
D. 33
Correct answer: A. 8.
n = 3 x 13 = 39. Encryption uses e = 3, not the given d, so C = 5^3 mod 39 = 125 mod 39 = 8. Try this question again.
RSA Algorithm MCQs 10-12: defining equations and inverse checks
Question 10
In the RSA public key cryptosystem, the private and public keys are (e, n) and (d, n) respectively, where n = p*q and p and q are large primes. Besides, n is public and p and q are private. Let M be an integer such that 0 < M < n and f(n) = (p- 1)(q-1). Now consider the following equations.
I. M’= M^e mod n
M = (M’)^d mod n
II. ed ≡ 1 mod n
III. ed ≡ 1 mod f(n)
IV. M’= M^e mod f(n)
M = (M’)^d mod f(n)
Which of the above equations correctly represent RSA cryptosystem?
A. I and II
B. I and III
C. II and IV
D. III and IV
Correct answer: B. I and III.
This question reverses the usual key labels. Standard notation makes (e, n) public and (d, n) private. Powers use modulo n, while ed ≡ 1 (mod phi(n)), called f(n) here. Thus I and III are correct.
Question 11
An RSA system uses p = 5 and q = 11. What is the decryption key if the encryption key is 27?
A. 3
B. 7
C. 27
D. 40
Correct answer: A. 3.
phi(n) = 40, so 27d ≡ 1 (mod 40). Since 27 x 3 = 81 = 2 x 40 + 1, d = 3. The value 40 is the inverse modulus, not the inverse. Try this question again.
Question 12
Using the RSA public key crypto system, if p = 13, q = 31 and d = 7, then the value of e is
A. 101
B. 103
C. 105
D. 107
Correct answer: B. 103.
phi(n) = 12 x 30 = 360. Because 7 x 103 = 721 = 2 x 360 + 1, e = 103, confirming B without a full extended-Euclid table. Try this question again.
RSA Algorithm traps: prime selection, inverse modulo phi(n), public exponents, private-key operations and legacy key-size matching
Trap or skill | Questions that expose it |
|---|---|
Prime selection | Q1 |
Inverse modulo | Q2, Q3, Q10, Q11, Q12 |
Public exponent for encryption | Q4, Q6, Q8, Q9 |
Private operation and public verification | Q7 |
Legacy key-size matching | Q5, whose fixed values must not be generalised |
Timed routine:
Separate
nfromphi(n).Verify
gcd(e, phi(n)) = 1.Write the exponent as powers of two.
Ensure the remainder is in
[0, n - 1].
Q4 checks the arithmetic: 6^7 mod 65 must finish at 46, and no remainder modulo 65 can exceed 64. Next, solve Computer Networks MCQs, then try Subnetting MCQs: 12 Solved IP Addressing Questions as another calculation-heavy set.
RSA Algorithm MCQs: the next practice step
Redo Questions 2, 4, 6, 8, 10 and 12 without looking at the answers. The selected topics are a modular inverse, a complete key-and-cipher calculation, public-exponent recovery, character mapping, the defining equations and a larger totient. If any answer fails, return to the formula table and identify which modulus belongs to that step.
For a sequenced Computer Networks route that places network security beside the rest of the subject, use GATE Guidance by Sanchit Sir.
The short version: RSA questions become mechanical when you keep the two moduli separate, check the inverse relation before exponentiation, and reduce after every multiplication.
Keep learning

Computer Networks Basics & Criteria MCQs: 12 Solved Questions with Explanations
Solve 12 Computer Networks questions, then use clear explanations and worked criteria checks to separate similar terms confidently.

TCP Timers, RTT Estimation & SWS: 10 Solved MCQs and NATs
Solve 10 TCP exam questions covering timer roles, Silly Window Syndrome, recursive RTT estimates, Jacobson/Karels RTO and Karn's rule.

Firewall, VPN, IDS and IPS MCQs: 11 Network Security Questions Solved
Solve 11 previous-year questions on firewalls, VPNs, IDS and IPS. Learn rule filtering, connection state, DMZ design, IPsec modes, tunnels and signatures.

Network Security Goals, Threats and Attacks MCQs: 12 Solved Questions
Solve 12 network-security MCQs covering confidentiality, integrity, attack types, spoofing, DDoS and protection properties. Every answer has a clear explanation and a link to practise the question again.