# Network Security

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?

Encryption: X’s private key followed by Y’s private key; Decryption: X’s public key followed by Y’s public key | |

Encryption: X’s private key followed by Y’s public key; Decryption: X’s public key followed by Y’s private key | |

Encryption: X’s public key followed by Y’s private key; Decryption: Y’s public key followed by X’s private key | |

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’= MWhich of the above equations correctly represent RSA cryptosystem?^{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)

I and II | |

I and III | |

II and IV | |

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)III is true because below is true^{e}mod n Plain-Text = (Encrypted-Text)^{d}mod n

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

P and R only | |

Q and R only | |

Q and S only | |

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

2N | |

N(N – 1) | |

N(N – 1)/2 | |

(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?

Sender encrypts using receiver’s public key | |

Sender encrypts using his own public key | |

Receiver decrypts using sender’s public key | |

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 | |

B | |

C | |

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.
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

Anarkali’s public key. | |

Salim’s public key. | |

Salim’s private key. | |

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?

Both are false | |

Statement (i) is true and the other is false | |

Statement (ii) is true and the other is false | |

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 3

^{p}modulo 17 = 1 is5 | |

8 | |

12 | |

16 |

**C 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

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 b

^{n}mod m,0≤b,n≤m ?O(logn) | |

O(√n) | |

O(n/logn) | |

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**.
There are 24 questions to complete.