Question 1
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?
 A Encryption: X’s private key followed by Y’s private key; Decryption: X’s public key followed by Y’s public key B Encryption: X’s private key followed by Y’s public key; Decryption: X’s public key followed by Y’s private key C Encryption: X’s public key followed by Y’s private key; Decryption: Y’s public key followed by X’s private key D Encryption: X’s private key followed by Y’s public key; Decryption: Y’s private key followed by X’s public key
GATE CS 2013    Network Security
Discuss it

Question 1 Explanation:
 Question 2
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’= Me mod n
M = (M’)d mod n

II.  ed ≡ 1 mod n

III. ed ≡ 1 mod f(n)

IV. M’= Me 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
GATE-CS-2009    Network Security
Discuss it

Question 2 Explanation:
I is true because below is true in RSA-Cryptosystem.
Encrypted-Text = (Plain-Text)e mod n
Plain-Text = (Encrypted-Text)d mod n 
III is true because below is true
   d-1 = e mod ϕ(n)
OR ed = 1 mod ϕ(n) 
 Question 3
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
 A P and R only B Q and R only C Q and S only D R and S only
Network Security    GATE-CS-2014-(Set-1)
Discuss it

Question 3 Explanation:
• RSA – It is an algorithm used to encrypt and decrypt messages.
• SHA 1 – Secure Hash Algorithm 1, or SHA 1 is a cryptographic hash function. It produces a 160 bit (20 byte) hash value (message digest).
• DES – Data Encryption Standard, or DES is a symmetric key algorithm for encryption of electronic data.
• MD5 – Message Digest 5, or MD5 is a widely used cryptographic hash function that produces a 128 bit hash value (message digest).
Q and S i.e SHA 1 and MD5 are used to generate a message digest by the network security protocols. So, C is the correct choice.
 Question 4
Suppose that everyone in a group of N people wants to communicate secretly with the N–1 others using symmetric key cryptographic system. The communication between any two persons should not be decodable by the others in the group. The number of keys required in the system as a whole to satisfy the confidentiality requirement is
 A 2N B N(N – 1) C N(N – 1)/2 D (N – 1)2
Network Security    GATE-CS-2015 (Set 1)
Discuss it

Question 4 Explanation:
In Symmetric Key Cryptography, access of key is with both the parties. It implies every person needs to communicate N-1 other users using different keys i.e 1+2+3...N-2+N-1 This is like number of edges needed in a complete graph with N vertices is N(N-1)/2. Answer is therefore C
 Question 5
A sender is employing public key cryptography to send a secret message to a receiver. Which one of the following statements is TRUE?
 A Sender encrypts using receiver’s public key B Sender encrypts using his own public key C Receiver decrypts using sender’s public key D Receiver decrypts using his own public key
Network Security    GATE-IT-2004
Discuss it

 Question 6
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 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?
 A A B B C C D D
Network Security    GATE-CS-2016 (Set 1)
Discuss it

Question 6 Explanation:
Digital signature are electronic signatures which ensures the integrity ,non repudiation and authenticity of message.Message digest is a hash value generated by applying a function on it. Message digest is encrypted using private key of sender ,so it can only be decrypted by public key of sender.This ensures that the message was sent by the known sender. Message digest is sent with the original message to the receiving end,where hash function is used on the original message and the value generated by that is matched with the message digest.This ensures the integrity and thus,that the message was not altered. Digital signature uses private key of the sender to sign digest. So option B is correct as it is encrypting digest of message H(m) using its private key K-B. Image source This solution is contributed by Shashank Shanker khare.
 Question 7
Anarkali digitally signs a message and sends it to Salim. Verification of the signature by Salim requires
 A Anarkali’s public key. B Salim’s public key. C Salim’s private key. D Anarkali’s private key.
Network Security    GATE-CS-2016 (Set 2)
Discuss it

Question 7 Explanation:
Sender uses its private key to digitally sign a document. Receiver uses public key of sender to verify. So option A is correct.
 Question 8
Consider the following two statements: i. A hash function (these are often used for computing digital signatures) is an injective function. A. encryption technique such as DES performs a permutation on the elements of its input alphabet. Which one of the following options is valid for the above two statements?
 A Both are false B Statement (i) is true and the other is false C Statement (ii) is true and the other is false D Both are true
Network Security    Gate IT 2007
Discuss it

Question 8 Explanation:

Injective Function:

A function F(X) is said to be injective if it has one-to-one mapping. Statement 1: Hash function is an injective function Statement 2: DES Encryption technique performs a permutation on the elements of its input alphabet

1) Generally, a hash function H(X) is mapping from a larger set to a predefined output set For example, let H(X) = (X)%5 The above function H(X) is not injective because Let X1 = 10, X2 = 15 H(10) = H(15) = 0 As the output of H(X1) = H(X2) where X1!= X2 => H(X) is many-to-one function. Statement 1 is false.

2) In DES encryption scheme, it performs P-Box permutation. Statement 1 is false, Statement 2 is true.

This solution is contributed by Anil Saikrishna Devarasetty.

 Question 9
The minimum positive integer p such that 3p modulo 17 = 1 is
 A 5 B 8 C 12 D 16
Misc    Network Security    Gate IT 2007
Discuss it

Question 9 Explanation:
Either use Fermat's Little Theorem (reference)
Or put the value of p and get the answer
 Question 10
Exponentiation is a heavily used operation in public key cryptography. Which of the following options is the tightest upper bound on the number of multiplications required to compute bn mod m,0≤b,n≤m ?
 A O(logn) B O(√n) C O(n/logn) D O(n)
Network Security    Gate IT 2007
Discuss it

Question 10 Explanation:
This Problem can be solved using Divide And Conquer Paradigm Algorithm :

Binary_exp(b,n)                            // Compute bn mod m

{

if(n == 0)

Return 1;

Else if(n == 1)

Return b mod m;

Else

{

Half = Binary_exp(b,n/2);

if(n%2 == 0)                                // n is even

Return (Half*Half) mod m;

Else                                    // n is odd

Return (((Half*Half) mod m)*n) mod m;

}

}


Recurrence Relation for computing the time complexity of the above given algorithm is T(n) = T(n/2) + constant = (log2n) This solution is contributed by Pranjul Ahuja.
 Question 11
A firewall is to be configured to allow hosts in a private network to freely open TCP connections and send packets on open connections. However, it will only allow external hosts to send packets on existing open TCP connections or connections that are being opened (by internal hosts) but not allow them to open TCP connections to hosts in the private network. To achieve this the minimum capability of the firewall should be that of
 A A combinational circuit B A finite automaton C A pushdown automaton with one stack D A pushdown automaton with two stacks
Misc Topics in Computer Networks    Network Security    Gate IT 2007
Discuss it

Question 11 Explanation:
A) A combinational circuit => Not possible, because we need memory in Firewall, Combinational ckt has none.
B) A finite automaton => We need infinite memory, there is no upper limit on Number of TCP ckt so Not this.
C) A pushdown automaton with one stack => Stack is infinite. Suppose we have 2 connections , we have pushed details of those on stack we can not access the details of connection which was pushed first, without popping it off. So Big NO.
D) pushdown automaton with two stacks => This is TM. It can do everything our normal computer can do so Yes. Firewall can be created out of TM.
 Question 12
The total number of keys required for a set of n individuals to be able to communicate with each other using secret key and public key crypto-systems, respectively are:
 A n(n-1) and 2n B 2n and ((n(n - 1))/2) C ((n(n - 1))/2) and 2n D ((n(n - 1))/2) and n
Network Security    Gate IT 2008
Discuss it

Question 12 Explanation:
If there are 2 individuals then total number of distinct keys for communication will be 1 Similarly for 3 individuals we will need 2 distinct keys. Like ways for n users we will need n-1 keys So, total number of keys will be 1+2+3+…n-1 = (n (n-1)/2) Now for a public key encryption scheme every individual will have two keys one public key and one private key. Therefore, for n individuals to communicate we will have 2* n keys Hence, the correct answer will be ((n(n – 1))/2) and 2n. This solution is contributed by Namita Singh.
There are 12 questions to complete.

## GATE CS Corner

See Placement Course for placement preparation, GATE Corner for GATE CS Preparation and Quiz Corner for all Quizzes on GeeksQuiz.