LearnFrenzy
Sign in Take a free test

Computer Networks · Topic 10 of 10

Network Security and Socket Programming: questions with answers

Confidentiality, integrity and authentication, symmetric vs public-key cryptography, RSA and Diffie-Hellman numericals, hashes, MACs and digital signatures, certificates and TLS, firewalls, VPNs, common attacks and socket programming.

Questions
45
Timed sets
3
Answers run or computed
22
Your accuracy
–

What this topic covers

11 subtopics
  • Attacks7
  • Cryptography7
  • RSA7
  • Hashes5
  • Diffie-Hellman4
  • Sockets4
  • TLS4
  • Firewalls2
  • Signatures2
  • VPN and IPsec2
  • Security goals1
  • Beginner 15
  • Intermediate 15
  • Advanced 15

About this topic

Security sits across every layer: TLS protects HTTP, IPsec protects IP, firewalls filter traffic, and cryptography underpins all of it. GATE asks RSA and Diffie-Hellman numericals; interviews ask how HTTPS works and how to defend against common attacks. Every key and ciphertext here was computed (RSA with modular inverses, DH with modular exponentiation), and the socket programs really ran over localhost.

Free preview

Sample questions

Try each one first, then open the answer for the explanation and why the other options are wrong.

Question 1 Security goals Beginner Practice

Which security goal does encrypting a message mainly provide?

Confidentiality – only the intended recipient can read it
Integrity alone
Non-repudiation
Availability
Show answer and explanation
Correct answer A

Explanation

Integrity comes from MACs or signatures, authentication from proving identity, availability from defending against DoS.

Why the other options are wrong

  • BEncryption alone does not detect tampering.
  • CNeeds signatures.
  • DKeeping the service up.
Question 2 RSA Intermediate Practice Answer computed

RSA with p = 3, q = 11 and public exponent e = 3. What is the private exponent d?

The answer is a number – work it out, then open the solution.

Show answer and explanation
Correct answer 7

Explanation

n = 33, φ(n) = 2 × 10 = 20. d is the inverse of 3 mod 20: 3 × 7 = 21 ≡ 1, so d = 7.

Question 3 RSA Advanced Practice Answer computed

RSA with p = 5, q = 11, e = 3. Bob receives ciphertext c = 26. What is the plaintext?

The answer is a number – work it out, then open the solution.

Show answer and explanation
Correct answer 16

Explanation

n = 55, φ = 40, d = 3⁻¹ mod 40 = 27 (3 × 27 = 81 ≡ 1). m = 26²⁷ mod 55 = 16; check: 16³ = 4096 = 74 × 55 + 26, so 16³ mod 55 = 26.

42 more questions in the timed setsSame format as the samples, with a timer, a question palette and a full review at the end.
Start practising

Computer Networks

All 10 topics

Topics, levels and full mocks
  1. 01 Network Models, Devices and Delays45 questions · 3 levels
  2. 02 Error Detection and Correction45 questions · 3 levels
  3. 03 Flow Control and Sliding Window45 questions · 3 levels
  4. 04 MAC Layer, Ethernet and Switching45 questions · 3 levels
  5. 05 IP Addressing and Subnetting45 questions · 3 levels
  6. 06 Routing Algorithms and Protocols45 questions · 3 levels
  7. 07 IPv4, IPv6, ARP, NAT, ICMP and DHCP45 questions · 3 levels
  8. 08 TCP, UDP and Congestion Control45 questions · 3 levels
  9. 09 Application Layer: DNS, HTTP and Email45 questions · 3 levels
  10. 10 Network Security and Socket Programming45 questions · 3 levels

Search LearnFrenzy

Esc

Quick links