Medium ●●

🔐 Network Security

Why it matters: RSA arithmetic, who signs with which key, and which algorithm is a hash or a cipher are quick marks.

Subtopics

Each subtopic has its own page: idea, why, how, example, play, check. Mark each one understood when it clicks. 0 of 3 done.

Formulas

RSA keys
n = pq, φ = (p−1)(q−1), e·d ≡ 1 (mod φ)
RSA encrypt / decrypt
c = m^e mod n ; m = c^d mod n
Factor n from φ
p + q = n − φ + 1, then solve the quadratic
Signature
sign = D_senderPrivate(H(m)), verify with the sender public key

What GATE asks from this

Question types seen repeatedly in past papers. More stars means more frequent.

★★★
RSA: find the private key or a prime factor
φ = (p−1)(q−1); d = e⁻¹ mod φ; or solve p + q = n − φ + 1.
★★★
Digital signature: which keys are used and in which order
Sign with your private key, encrypt with the receiver's public key; decrypt in reverse.
★★★
Hash vs cipher; birthday attack
MD5 and SHA-1 are hashes; RSA and DES are ciphers.

Ratings are approximate, based on recurring patterns in past GATE CSE papers.

Previous year questions

6 real questions from the official GATE CSE papers (2013 to 2019), newest first, each with the official answer key and a worked solution. Questions are the property of the GATE organising institutes; this copy is for your personal study.

6 questions · 0 correct of 0 attempted · marks 0 / 9

Year:
GATE 2019 Set 2 · Q54NAT2 marks
In an RSA cryptosystem, the value of the public modulus parameter n is 3007. If it is also known that φ(n) = 2880, where φ() denotes Euler's Totient Function, then the prime factor of n which is greater than 50 is ______.
GATE 2017 Set 1 · Q15MCQ1 mark
A sender S sends a message m to receiver R, which is digitally signed by S with its private key. In this scenario, one or more of the following security violations can take place.
(I) S can launch a birthday attack to replace m with a fraudulent message.
(II) A third party attacker can launch a birthday attack to replace m with a fraudulent message.
(III) R can launch a birthday attack to replace m with a fraudulent message. Which of the following are possible security violations?
GATE 2017 Set 1 · Q44NAT2 marks
In a RSA cryptosystem, a participant A uses two prime numbers p = 13 and q = 17 to generate her public and private keys. If the public key of A is 35, then the private key of A is ______.
GATE 2016 Set 1 · Q52MCQ2 marks
Consider that B wants to send a message m that is digitally signed to A. Let the pair of private and public keys for A and B be denoted by Kx− and Kx+ for x = A, B, respectively. Let Kx(m) represent the operation of encrypting m with a key Kx and H(m) represent the message digest. Which one of the following indicates the CORRECT way of sending the message m along with the digital signature to A?
GATE 2014 Set 1 · Q24MCQ1 mark
Which of the following are used to generate a message digest by the network security protocols? (P) RSA (Q) SHA-1 (R) DES (S) MD5
GATE 2013 Code A · Q13MCQ1 mark
Using public key cryptography, X adds a digital signature σ to message M, encrypts <M, σ>, and sends it to Y, where it is decrypted. Which one of the following sequences of keys is used for the operations?

Common traps

You sign with your private key but encrypt with the receiver's public key.
d is the inverse of e modulo φ(n), not modulo n.
RSA and DES do not generate message digests.
A birthday attack on a signed message is possible by the signer, not only by a third party.