0% found this document useful (0 votes)
5 views29 pages

CNS Module3 Study Notes-1

The document provides an overview of key management, distribution, and authentication in cryptography and network security, focusing on symmetric and asymmetric encryption methods. It covers topics such as cryptographic hash functions, Kerberos authentication, and various techniques for public key distribution. Additionally, it includes detailed explanations, diagrams, and comparisons of hash functions like MD5 and SHA-512, emphasizing their applications and security implications.

Uploaded by

dandelii2026
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views29 pages

CNS Module3 Study Notes-1

The document provides an overview of key management, distribution, and authentication in cryptography and network security, focusing on symmetric and asymmetric encryption methods. It covers topics such as cryptographic hash functions, Kerberos authentication, and various techniques for public key distribution. Additionally, it includes detailed explanations, diagrams, and comparisons of hash functions like MD5 and SHA-512, emphasizing their applications and security implications.

Uploaded by

dandelii2026
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CRYPTOGRAPHY &

NETWORK SECURITY
MODULE 3
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

Key Management, Distribution & Authentication

Exam-Ready Study Notes


Questions 1 – 8 | Complete Answers | Figures from Reference Material

Reference: Stallings – Cryptography & Network Security (6th Ed.)

CNS Module 3 Notes (AJIE)

Cryptography & Network Security | Module 3 | Page 1


TABLE OF CONTENTS

Q1 Symmetric Key Distribution using Symmetric & Asymmetric Encryption 10 Marks

Q2 Cryptographic Hash Functions and Its Applications 10 Marks

Q3 Two Sample Hash Functions with Neat Diagram 10 Marks

Q4 Kerberos Authentication Service 12 Marks

Q5 X.509 Certificates 10 Marks

Q6 Various Techniques Used in Distribution of Public Keys 10 Marks

Q7 Four General Categories for Distribution of Public Keys 8/10 Marks

Q8 Decentralized Key Distribution with Neat Diagram 10 Marks

Cryptography & Network Security | Module 3 | Page 2


MODULE 3 — KEY MANAGEMENT AND DISTRIBUTION

QUESTION 1 (10 Marks)


Explain Symmetric Key Distribution using Symmetric and Asymmetric Encryption

Introduction
Key distribution is the process of securely delivering cryptographic keys between communicating users.
In symmetric encryption, both sender and receiver use the same secret key.
In asymmetric encryption, public and private key pairs are used.
Secure key distribution is important because weak key exchange leads to complete compromise of encrypted
communication.

1. Symmetric Key Distribution using Symmetric Encryption


For symmetric encryption to work, the two parties to an exchange must share the same key, and that key
must be protected from access by others. Key distribution can be achieved in a number of ways:

1. A can select a key and physically deliver it to B.

2. A third party can select the key and physically deliver it to A and B.

3. If A and B have previously used a key, one party can transmit the new key to the other, encrypted using
the old key.

4. If A and B each has an encrypted connection to a third party C, C can deliver a key on the encrypted links
to A and B.

Key Distribution Centre (KDC) — Architecture & Message Flow

Cryptography & Network Security | Module 3 | Page 3


Figure 14.3 — Key Distribution Scenario (KDC with Initiator A and Responder B) [Source: CNS_Module_3.pdf, Page 9]

Key Distribution Centre — Working Procedure


The use of a key distribution center is based on the use of a hierarchy of keys. At a minimum, two levels of
keys are used:

• Session Key: Temporary key used for the duration of a logical connection and then discarded.

• Master Key: Shared by the KDC and an end system/user; used to encrypt the session key.

Step 1: A issues a request to the KDC for a session key (Ks) to protect a logical connection to B. The
message includes the identity of A (ID_A), identity of B (ID_B), and a unique nonce N1 for this
transaction. The nonce may be a timestamp, a counter, or a random number; it must differ with each
request.
Step 2: The KDC responds with a message encrypted using Ka (A's master key). Thus, A is the only
one who can successfully read the message. The message includes: (a) The one-time session key Ks,
(b) The original request message including the nonce N1, (c) E(Kb, [Ks || IDA]) — encrypted with B's
master key, intended for B.
Step 3: A stores the session key and forwards E(Kb, [Ks || IDA]) to B. Because this information is
encrypted with Kb, it is protected from eavesdropping. B now knows the session key Ks, knows that the
other party is A, and knows the information originated at the KDC.
Step 4: Using the newly minted session key Ks for encryption, B sends a nonce N2 to A.
Step 5: Also using Ks, A responds with f(N2), where f is a function that performs some transformation
on N2 (e.g., adding one). These steps assure B that the original message it received was not a replay.

Cryptography & Network Security | Module 3 | Page 4


Message Flow:

Step Message Description

A→
KDC:
ID_A
Request for session key

ID_B
■ N1

KDC
→ A:
E(Ka,
[Ks ■
ID_A

Session key + ticket for B
ID_B
■ N1])

E(Kb,
[Ks ■
ID_A])

A → B:
E(Kb,
Forward ticket to B
[Ks ■
ID_A])

B → A:
E(Ks, Nonce for authentication
N2)

A → B:
E(Ks, Authentication confirmation
f(N2))

Advantages, Limitations — Symmetric KDC

Advantages Limitations

• Fast communication • Efficient for large data transfer • • KDC dependency • Single point of failure • Key
Centralized key management compromise affects all communication

2. Symmetric Key Distribution using Asymmetric Encryption


Once public keys have been distributed or have become accessible, secure communication that thwarts
eavesdropping, tampering, or both, is possible. Public-key encryption provides for the distribution of secret
keys to be used for conventional encryption.

Simple Secret Key Distribution:

Cryptography & Network Security | Module 3 | Page 5


Simple Secret Key Distribution using Asymmetric Encryption [Source: CNS_Module_3.pdf, Page 18]

Step 1: A generates a public/private key pair {PUa, PRa} and transmits a message to B consisting of
PUa and an identifier of A (IDA).
Step 2: B generates a secret key Ks and transmits it to A, encrypted with A's public key: E(PUa, Ks).
Step 3: A computes D(PRa, E(PUa, Ks)) to recover the secret key. Because only A can decrypt the
message, only A and B will know the identity of Ks.
Step 4: A discards PUa and PRa and B discards PUa.
Step 5: Both users communicate using the shared session key Ks.

■ Man-in-the-Middle Attack: Here a third party can intercept messages and then either relay the
intercepted message or substitute another message. Such an attack is known as a man-in-the-middle
attack.

Secret Key Distribution with Confidentiality and Authentication:

Cryptography & Network Security | Module 3 | Page 6


Secret Key Distribution with Confidentiality and Authentication [Source: CNS_Module_3.pdf, Page 19]

Step 1: A uses B's public key to encrypt a message to B containing an identifier of A (IDA) and a nonce
N1: E(PUb, [N1 ■ IDA]).
Step 2: B sends a message to A encrypted with PUa containing A's nonce N1 and a new nonce N2:
E(PUa, [N1 ■ N2]). Because only B could have decrypted message (1), the presence of N1 assures A
that the correspondent is B.
Step 3: A returns N2 encrypted using B's public key: E(PUb, N2), to assure B that its correspondent is
A.
Step 4: A selects a secret key Ks and sends M = E(PUb, E(PRa, Ks)) to B. Encryption with B's public
key ensures only B can read it; encryption with A's private key ensures only A could have sent it.
Step 5: B computes D(PUa, D(PRb, M)) to recover the secret key.

A Hybrid Scheme: Yet another way to use public-key encryption to distribute secret keys is a hybrid
approach.

• This scheme retains the use of a key distribution center (KDC) that shares a secret master key with each
user and distributes secret session keys encrypted with the master key.

• A public key scheme is used to distribute the master keys.

• The addition of a public-key layer provides a secure, efficient means of distributing master keys.

Advantages, Limitations — Asymmetric Key Distribution

Advantages Limitations

• Solves key distribution problem • Better scalability • • Slower than symmetric systems • Computational
Supports secure communication over Internet • Secure overhead • Vulnerable to man-in-the-middle attack
key exchange without shared secret without authentication

Cryptography & Network Security | Module 3 | Page 7


Applications: SSL/TLS, VPNs, Secure enterprise communication

Conclusion: Symmetric key distribution using symmetric and asymmetric encryption ensures secure session
establishment and protected communication.

Key Terms: Session key • KDC • Public key • Private key • Key distribution • Secure communication

■ Confusing session key and master key


■ Forgetting KDC role in symmetric key distribution

■ Memory Trick: Symmetric → Same key | Asymmetric → Key pair

Reference:

• Material Name: CNS_Module_3.pdf — Page Numbers: 8–9, 18–19

• Material Name: W_Stallings_Cryptography_and_Network_Security_6th_ed.pdf — Chapter 14

Cryptography & Network Security | Module 3 | Page 8


QUESTION 2 (10 Marks)
Explain Cryptographic Hash Functions and Its Applications

Introduction
A cryptographic hash function converts data of arbitrary size into a fixed-size hash value called a
message digest. It is mainly used for integrity verification, authentication, and digital signatures. Hashing is
one-way and irreversible.

Hash Function — Basic Diagram:

Message (Variable Length)

Hash Function

Fixed-Size Hash Value (Message Digest)

Properties of Cryptographic Hash Functions

1. Fixed-Length Output Produces fixed-size digest irrespective of input message size.

2. One-Way Property (Pre-image Original message cannot be reconstructed from the hash value.
Resistance) Given h(M) = H, it is computationally infeasible to find M.

3. Collision Resistance Difficult to find two different messages M1 and M2 such that
h(M1) = h(M2).

4. Avalanche Effect A small change in the input causes a significant (unpredictable)


change in the output hash.

5. Efficient Computation Easy and fast to compute h(M) for any given message M.

Applications of Hash Functions

1. Message Integrity Detects unauthorized modification of data during transmission.

2. Password Storage Passwords stored securely as hash values in databases; original


password not stored.

3. Digital Signatures Message digest is signed instead of the full message, saving
computational effort.

4. Message Authentication Used in keyed-hash message authentication codes for verifying


(HMAC/CMAC) both integrity and authenticity.

5. File Verification Checks downloaded file integrity by comparing hash values.

Cryptography & Network Security | Module 3 | Page 9


Integrity Checking Diagram

Sender → Hash Function → Digest Sent

Receiver Computes Hash

Compare Digests → Integrity Check

Conclusion: Cryptographic hash functions provide integrity, authentication, and efficient verification for
secure communication systems.

Applications: SHA family, Blockchain, SSL/TLS, Digital signatures

Key Terms: Message digest • Collision resistance • Avalanche effect • Integrity • One-way function

■ Confusing encryption and hashing — Hashing is one-way; encryption is reversible


■ Saying hashes are reversible — They are NOT reversible

■ Memory Trick: Hash = Digital Fingerprint of a Message

Reference:

• Material Name: CNS_Module_3.pdf — Page Numbers: (Hash Functions Section)

• Material Name: W_Stallings_Cryptography_and_Network_Security_6th_ed.pdf — Chapter 11

Cryptography & Network Security | Module 3 | Page 10


QUESTION 3 (10 Marks)
Explain Two Sample Hash Functions with Neat Diagram

Introduction
Hash functions generate fixed-size message digests from variable-length input messages. Two commonly
used sample hash functions are: 1. MD5 and 2. SHA-512.

1. MD5 — Message Digest 5


MD5 (Message Digest 5) produces a 128-bit hash value. It was designed by Ronald Rivest and was widely
used before its vulnerabilities were discovered.

MD5 Processing Diagram:

Input Message (Arbitrary Length)

Step 1: Padding (pad message to 448 mod 512 bits)

Step 2: Append Length (64-bit representation of original length)

Step 3: Initialize MD Buffer (4 registers: A, B, C, D — 32 bits each)

Step 4: Process 512-bit Blocks through Compression Function (4 rounds × 16 operations = 64


operations)

Step 5: Output — 128-bit Message Digest

Features: Fast computation | Fixed 128-bit output

Limitation: Vulnerable to collision attacks — MD5 is no longer considered secure for cryptographic
purposes.

2. SHA-512 Algorithm
SHA-512 belongs to the SHA-2 family and produces a 512-bit message digest. It is designed by NIST and
is widely used for strong security applications.

SHA-512 Processing Diagram:

Input Message (Arbitrary Length)

Step 1: Padding (pad message to 896 mod 1024 bits)

Step 2: Append Length (128-bit representation of original length)

Cryptography & Network Security | Module 3 | Page 11


Step 3: Initialize Hash Buffer (8 registers: a,b,c,d,e,f,g,h — 64 bits each)

Step 4: Process 1024-bit Blocks through Compression Function (80 rounds)

Step 5: Output — 512-bit Message Digest

Features: Strong security | Collision resistance | Large 512-bit digest size

Comparison Table — MD5 vs SHA-512

Feature MD5 SHA-512

Digest Size 128-bit 512-bit

Security Level Weak (broken) Strong

Collision Resistance Poor (vulnerable) Better

Speed Faster Slower

Block Size 512-bit 1024-bit

Rounds 64 80

Current Use Deprecated for security Widely used

Advantages of SHA-512: Strong integrity | Better security | Resistant to brute-force attacks

Applications: Digital signatures, Password hashing, SSL/TLS, Blockchain

Conclusion: MD5 and SHA-512 are widely used hash algorithms, but SHA-512 provides significantly
stronger security.

Key Terms: Message digest • Padding • Compression function • Collision resistance • 128-bit •
512-bit

■ Confusing digest sizes — MD5 = 128-bit, SHA-512 = 512-bit


■ Writing MD5 as secure today — MD5 is broken/deprecated for security use

■ Memory Trick: MD5 = Old and Weak | SHA = Strong and Modern

Reference:

• Material Name: CNS_Module_3.pdf — Page Numbers: (Hash Algorithms Section)

• Material Name: W_Stallings_Cryptography_and_Network_Security_6th_ed.pdf — Chapter 11

Cryptography & Network Security | Module 3 | Page 12


QUESTION 4 (12 Marks)
Explain Kerberos Authentication Service

Introduction
Kerberos is a trusted third-party network authentication protocol designed to provide secure authentication
over insecure networks using symmetric key cryptography.

Kerberos prevents: Password theft | Replay attacks | Unauthorized access

Kerberos uses: Authentication Server (AS) | Ticket Granting Server (TGS) | Session keys | Tickets

Components of Kerberos

Component Function

Client / User User requesting service from the network

Authentication Server (AS) Verifies user identity using password-derived key

Ticket Granting Server (TGS) Issues service tickets to authenticated clients

Service Server Provides the requested service after verifying ticket

Ticket Authentication proof encrypted by KDC — cannot be forged

Session Key Temporary communication key for a session

Ticket Granting Ticket (TGT) Special ticket issued by AS for accessing TGS

Kerberos Architecture — Authentication Flow Diagram

Client/User (1) Login — Username + Password


Authentication Server (AS) (2) TGT + Session Key■ [encrypted with user key]


Client sends TGT to TGS (3) TGT + Service Request


Ticket Granting Server
(4) Service Ticket + Session Key■
(TGS)


Client sends Service Ticket (5) Service Ticket


Service/Application Server (6) Authentication Success → Service Granted

Kerberos Working Procedure — Detailed Steps

Cryptography & Network Security | Module 3 | Page 13


Step 1: User Login User enters username and password. The client computes a secret key
from the password using a one-way function. This secret key is never
transmitted over the network.

Step 2: Authentication Request Client sends a request to the Authentication Server (AS): Client → AS:
to AS ID_client ■ ID_TGS ■ TS1. (TS = Timestamp)

Step 3: AS Response AS verifies the user exists in the database and sends: (a) A Ticket
Granting Ticket (TGT) encrypted with TGS's secret key, (b) A session
key K_c,tgs encrypted using the client's secret key. Client decrypts
using its password-derived key to obtain K_c,tgs.

Step 4: Request to TGS Client sends TGT and an authenticator to the Ticket Granting Server:
Client → TGS: ID_service ■ Ticket_tgs ■ Authenticator_c

Step 5: TGS Response TGS decrypts TGT, verifies authenticator, and sends: (a) A Service
Ticket encrypted with the service's secret key, (b) A new session key
K_c,s for client-server communication.

Step 6: Access Service Server Client presents the service ticket and a new authenticator: Client →
Server: Ticket_service ■ Authenticator_c

Step 7: Mutual Authentication The server verifies the ticket and authenticator, then optionally sends
back a timestamp to prove its identity. Service is then granted. Both
sides have confirmed each other's identity.

Security Features & Advantages

Security Feature Explanation

Mutual Authentication Both client and server verify each other's identity.

Password Never Transmitted Secret key derived from password locally; never sent over network.

Replay Attack Protection Timestamps and nonces prevent reuse of old messages.

Single Sign-On (SSO) One login provides access to multiple services without
re-authentication.

Secure Ticket Mechanism Tickets are encrypted and cannot be forged by attackers.

Advantages Limitations

• Strong authentication • Centralized security • Time synchronization required (clocks must be within
management • Secure distributed systems • Prevents 5 minutes) • Single point of failure if KDC goes down •
password exposure • Supports single sign-on Complex implementation • Password compromise
affects all tickets

Applications: Windows Active Directory, Enterprise authentication, Distributed systems, Secure network
login

Cryptography & Network Security | Module 3 | Page 14


Conclusion: Kerberos provides strong and secure authentication using tickets and symmetric key
cryptography for distributed network environments.

Key Terms: Authentication Server (AS) • Ticket Granting Server (TGS) • Session key • Ticket • Mutual
authentication • Replay protection

■ Confusing AS and TGS roles — AS authenticates the user; TGS issues service tickets
■ Forgetting ticket flow — AS → TGT → TGS → Service Ticket → Server
■ Writing public-key cryptography instead of symmetric key cryptography for Kerberos

■ Memory Trick: AS → TGS → Service Server (Authentication ladder: step by step)

Reference:

• Material Name: CNS_Module_3.pdf — Page Numbers: (Kerberos Section)

• Material Name: W_Stallings_Cryptography_and_Network_Security_6th_ed.pdf — Chapter 15

Cryptography & Network Security | Module 3 | Page 15


QUESTION 5 (10 Marks)
Explain X.509 Certificates

Introduction
X.509 is an international standard for public-key digital certificates used in authentication systems and
secure communication. Certificates are issued and verified by a Certificate Authority (CA). X.509
certificates are used in most network security applications, including IP security, SSL, SET, and S/MIME.

X.509 Certificate Architecture — Certificate Authority Diagram

Certificate Authority (CA) issuing certificates to Users A and B [Source: CNS_Module_3.pdf, Page 25]

Structure of X.509 Certificate

Field Description

Version Certificate version number (v1, v2, or v3)

Serial Number Unique certificate identifier assigned by CA

Signature Algorithm Algorithm used by CA to sign the certificate (e.g., SHA256withRSA)

Issuer Name Distinguished name of the Certificate Authority

Validity Period Start date (Not Before) and expiry date (Not After)

Cryptography & Network Security | Module 3 | Page 16


Subject Name Distinguished name of the certificate owner

Public Key Information Owner's public key and the algorithm used

Digital Signature CA's digital signature over all above fields

Working of X.509 Certificates


Step 1: User generates a public/private key pair.
Step 2: User sends public key and identity details (name, organization, etc.) to the CA via a Certificate
Signing Request (CSR).
Step 3: CA verifies the identity of the user through appropriate verification procedures.
Step 4: CA creates a digital certificate containing the user's public key and identity information.
Step 5: CA signs the certificate using the CA's own private key (PRauth): C_A = E(PRauth, [Time■ ■
ID_A ■ PU_A]).
Step 6: Receiver verifies the certificate using the CA's public key (PUauth). Any participant who knows
the CA's public key can verify the certificate.

X.509 Authentication Types

Authentication Type Messages Description


Required

One-Way Authentication 1 message A authenticates to B. Establishes identity of A and


transfers A's public key to B.

Two-Way Authentication 2 messages A and B mutually authenticate. Uses nonces to prevent


replay attacks.

Three-Way Authentication 3 messages Full mutual authentication without clock synchronization


requirement.

Requirements for Public-Key Certificate Scheme

1. Any participant can read a certificate to determine the name and public key of the certificate's owner.

2. Any participant can verify that the certificate originated from the certificate authority and is not counterfeit.

3. Only the certificate authority can create and update certificates.

4. Any participant can verify the currency of the certificate (i.e., it has not expired or been revoked).

Advantages Limitations

• Strong authentication • Prevents impersonation • • Certificate management overhead • CA dependency


Supports SSL/TLS and Internet security • Trusted — compromise of CA is catastrophic • Certificate
certificate system • Certificate exchange without revocation complexity (CRL/OCSP) • Chain of trust
real-time authority contact complexity

Applications: SSL/TLS, Secure email (S/MIME), VPNs, IP security, E-commerce systems, Secure
Electronic Transactions (SET)

Cryptography & Network Security | Module 3 | Page 17


Conclusion: X.509 certificates provide secure public-key authentication using trusted certificate authorities
and digital signatures.

Key Terms: Certificate Authority • Public key certificate • Digital signature • Validity period •
Authentication • X.509

■ Forgetting certificate fields — know all 8 fields (Version, Serial, Signature Algorithm, Issuer, Validity,
Subject, Public Key, Signature)
■ Confusing issuer and subject — Issuer is the CA; Subject is the certificate owner

■ Memory Trick: CA signs → Users trust (The CA's signature is what makes a certificate valid)

Reference:

• Material Name: CNS_Module_3.pdf — Page Numbers: 24–25

• Material Name: W_Stallings_Cryptography_and_Network_Security_6th_ed.pdf — Chapter 14

Cryptography & Network Security | Module 3 | Page 18


QUESTION 6 (10 Marks)
Explain Various Techniques Used in Distribution of Public Keys

Introduction
Public key distribution is the process of securely sharing public keys among users in public-key cryptography
systems. Improper distribution can lead to: Impersonation, Fake public keys, and Man-in-the-middle
attacks.

Several techniques have been proposed for the distribution of public keys, which can mostly be grouped into
four categories:

1. Public Announcement 2. Publicly Available Directory 3. Public-Key Authority 4. Public-Key Certificates

Technique 1: Public Announcement of Public Keys


The point of public-key encryption is that the public key is public, hence any participant can send his or her
public key to any other participant, or broadcast the key to the community at large. For example: appending
PGP keys to email messages or posting to newsgroups or email lists.

Figure 10.1 — Uncontrolled Public Key Distribution (Public Announcement) [Source: CNS_Module_3.pdf, Page 20]

Advantages: Simple implementation | Easy public access

Major Weakness (Limitation): Vulnerable to forgery — anyone could pretend to be user A and send a fake
public key. Until the forgery is discovered, attackers can masquerade as the claimed user.

Technique 2: Publicly Available Directory


Greater security can be obtained by registering keys with a public directory. The directory must be trusted,
with the following properties:

Cryptography & Network Security | Module 3 | Page 19


• The authority maintains a directory with a {name, public key} entry for each participant.

• Each participant registers a public key with the directory authority.

• A participant may replace the existing key with a new one at any time (e.g., if the private key is
compromised).

• Participants can access the directory electronically. Secure, authenticated communication from the
authority to the participant is mandatory.

Figure 10.2 — Public Key Directory (Public Key Publication) [Source: CNS_Module_3.pdf, Page 21]

Advantages: Centralized management | Better reliability | More secure than public announcement

Limitations: If an adversary obtains the private key of the directory authority, they can pass out counterfeit
public keys and impersonate any participant. Tampering with directory records is also a risk.

Technique 3: Public-Key Authority


Stronger security for public-key distribution can be achieved by providing tighter control over the distribution
of public keys from the directory. It requires users to know the public key for the directory, and that they
interact with the directory in real-time to obtain any desired public key securely. Totally seven messages
are required.

Cryptography & Network Security | Module 3 | Page 20


Public-Key Authority — 7-Message Protocol (Initiator A, Public-Key Authority, Responder B) [Source:
CNS_Module_3.pdf, Page 22]

Msg 1 A → Authority: Request ■ Time■ A sends timestamped request for B's public key

Msg 2 Authority → A: E(PRauth, [PU_b ■ Request Authority returns B's public key, signed with
■ Time■]) PRauth

Msg 3 A → B: E(PU_b, [ID_A ■ N1]) A stores B's key and sends encrypted message
with nonce N1

Msg 4 B → Authority: Request ■ Time■ B requests A's public key

Msg 5 Authority → B: E(PRauth, [PU_a ■ Request Authority returns A's public key signed
■ Time■])

Msg 6 B → A: E(PU_a, [N1 ■ N2]) B sends N1+N2 encrypted with A's public key —
proves identity

Msg 7 A → B: E(PU_b, N2) A returns N2 — proves identity to B

Advantages: High security | Prevents fake keys | Real-time verification

Limitations: Communication overhead (7 messages required) | Authority dependency | Bottleneck for large
networks

Cryptography & Network Security | Module 3 | Page 21


Technique 4: Public-Key Certificates
Public key certificates can be used to exchange keys without contacting a public-key authority in real-time. A
certificate binds an identity to a public key, with all contents signed by a trusted Certificate Authority (CA).
This can be verified by anyone who knows the CA's public key.

Certificate Authority (CA) — Certificate Exchange between Users A and B [Source: CNS_Module_3.pdf, Page 25]

Certificate format: C_A = E(PRauth, [Time■ ■ ID_A ■ PU_A])

A sends its certificate C_A to B. B sends its certificate C_B to A.

Each party extracts the other's public key by decrypting with PUauth.

One scheme has become universally accepted: the X.509 standard.

Advantages: Strong authentication | Trusted communication | Supports Internet security | No real-time


authority contact needed

Limitations: Certificate management complexity | CA dependency | Revocation handling required


(CRL/OCSP)

Comparison Table — Public Key Distribution Techniques

Technique Security Complexity Real-time Contact

Public Announcement Low Simple No

Publicly Available Directory Medium Moderate Yes

Cryptography & Network Security | Module 3 | Page 22


Public-Key Authority High Higher Yes (7 messages)

Public-Key Certificates Very High Moderate No

Applications: SSL/TLS, Secure email, PKI systems, VPNs

Conclusion: Public key distribution techniques ensure secure and authenticated sharing of public keys in
asymmetric cryptographic systems.

Key Terms: Public key authority • Certificate Authority • Public directory • Authentication •
Man-in-the-middle

■ Confusing public key authority and certificate authority — PKA distributes keys in real-time; CA issues
certificates offline
■ Forgetting that certificates are the most secure and widely deployed method

■ Memory Trick: Certificates = Most Secure (No real-time authority contact needed)

Reference:

• Material Name: CNS_Module_3.pdf — Page Numbers: 20–25

• Material Name: W_Stallings_Cryptography_and_Network_Security_6th_ed.pdf — Chapter 14

Cryptography & Network Security | Module 3 | Page 23


QUESTION 7 (8/10 Marks)
Explain Four General Categories for Distribution of Public Keys

Introduction
Public-key cryptography requires secure distribution of public keys to avoid: Impersonation, Fake public
keys, and Man-in-the-middle attacks. Four general categories are used for distributing public keys
securely.

The four general categories (in increasing order of security):

1. Public Announcement → 2. Publicly Available Directory → 3. Public Key Authority → 4. Public Key
Certificates

Category 1: Public Announcement


Users publicly announce their public keys using Email, Websites, Public forums, or newsgroups. The public
key is broadcast to the community at large.

Advantages Limitations

• Simple implementation • Easy public access • Vulnerable to forgery — fake public keys possible •
Anyone can masquerade as another user

Category 2: Publicly Available Directory


A trusted directory maintains: User identities and their corresponding Public keys. Users securely access
the directory. The authority maintains a directory with {name, public key} entries. Each participant registers
and may replace their public key at any time.

Advantages Limitations

• Centralized management • Better reliability • More • Directory protection required • Tampering risk if
secure than announcement directory is compromised • Requires secure,
authenticated access

Category 3: Public Key Authority


A trusted authority securely distributes public keys after identity verification. The authority responds to user
requests in real time. Stronger security for public-key distribution is achieved by providing tighter control over
the distribution of public keys from the directory. Totally seven messages are required for mutual
authentication.

Advantages Limitations

• High security • Prevents fake keys • Real-time • Communication overhead (7 messages) • Authority
verification dependency — bottleneck • Real-time contact required
always

Category 4: Public Key Certificates


A Certificate Authority (CA) issues digitally signed certificates. The most secure and widely used approach.
Public key certificates can be used to exchange keys without contacting a public-key authority in real-time.

Cryptography & Network Security | Module 3 | Page 24


Advantages Limitations

• Strong authentication • Trusted communication • • Certificate management complexity • Revocation


Supports Internet security • No real-time authority handling required (CRL/OCSP) • CA dependency
contact needed

Comparison Table — All Four Categories

Method Security Complexity Real-time

Public Announcement Low Simple No

Public Directory Medium Moderate Yes

Public Key Authority High High (7 msgs) Yes

Public Key Certificates Very High Moderate No

Applications: SSL/TLS, PKI, Secure email, VPNs

Conclusion: The four general categories of public key distribution provide different levels of security and
management for secure public-key communication.

Key Terms: Public Key Authority • Certificate Authority • Public directory • Digital certificate •
Authentication

■ Confusing public directory and public key authority — Directory is a database; PKA is an online trusted
server
■ Forgetting certificates are most secure — they eliminate real-time authority dependency

■ Memory Trick: Announcement → Directory → Authority → Certificates (Security increases at


each level)

Reference:

• Material Name: CNS_Module_3.pdf — Page Numbers: 20–25

• Material Name: W_Stallings_Cryptography_and_Network_Security_6th_ed.pdf — Chapter 14

Cryptography & Network Security | Module 3 | Page 25


QUESTION 8 (10 Marks)
Explain Decentralized Key Distribution with Neat Diagram

Introduction
The use of a key distribution center imposes the requirement that the KDC be trusted and be protected from
subversion. This requirement can be avoided if key distribution is fully decentralized. Decentralized key
distribution distributes cryptographic key management responsibilities across multiple users/end systems
instead of relying on one central authority.

Although full decentralization is not practical for larger networks using symmetric encryption only, it
may be useful within a local context.

A decentralized approach requires that each end system be able to communicate in a secure manner with
all potential partner end systems for purposes of session key distribution.

Thus, there may need to be as many as n(n−1)/2 master keys for a configuration with n end systems.

Decentralized Key Distribution — Diagram (Figure 14.5)

Figure 14.5 — Decentralized Key Distribution (Initiator A and Responder B) [Source: CNS_Module_3.pdf, Page 14]

Working Principle — Session Key Establishment


A session key may be established with the following sequence of steps:

Step 1: A issues a request to B for a session key and includes a nonce N1: A → B: ID_A ■ N1

Step 2: B responds with a message encrypted using the shared master key K_m. The response
includes: (a) the session key Ks selected by B, (b) an identifier of B (ID_B), (c) the value f(N1) — proves

Cryptography & Network Security | Module 3 | Page 26


B received and processed A's nonce, (d) another nonce N2 generated by B. Message: B → A: E(K_m,
[Ks ■ ID_A ■ ID_B ■ f(N1) ■ N2])

Step 3: Using the new session key Ks, A returns f(N2) to B: A → B: E(Ks, f(N2)). This confirms to B that
A has successfully received and decrypted the session key.

Components Table

Component Function

End System (A or B) Acts as both key requester and key generator; no central KDC needed

Pre-shared between pairs of end systems for encrypting session key


Shared Master Key (K_m)
exchange

Session Key (Ks) Temporary key generated by B for this specific communication session

Nonce (N1, N2) Random values used to prevent replay attacks and confirm freshness

f(N1), f(N2) Transformed nonce values (e.g., +1) used for mutual authentication

Comparison — Centralized vs Decentralized Key Distribution

Feature Centralized (KDC) Decentralized

Control Single authority (KDC) Multiple end systems

Scalability Limited — KDC bottleneck Better for local domains

Failure Risk Single point of failure Reduced single point failure

Key Count n master keys (user to KDC) n(n-1)/2 master keys (pairwise)

Trust Required KDC must be trusted Each pair manages own trust

Practicality Better for large networks Suitable for small local networks

Complexity Lower Higher (pairwise keys)

Controlling Key Usage


The concept of a key hierarchy and automated key distribution techniques greatly reduce the number of keys
that must be manually managed. It may also be desirable to impose some control on the way automatically
distributed keys are used. For example, different types of session keys may be defined based on use:

• Data-encrypting key: For general communication across a network.

• PIN-encrypting key: For personal identification numbers (PINs) used in electronic funds transfer and
point-of-sale applications.

• File-encrypting key: For encrypting files stored in publicly accessible locations.

Control Vector: A more flexible scheme for key usage control. Each session key has an associated control
vector consisting of fields that specify the uses and restrictions for that session key.

Hash value = H = h(CV)

Cryptography & Network Security | Module 3 | Page 27


Key input = K_m ⊕ H

Ciphertext = E([K_m ⊕ H], Ks)

The session key is recovered by the reverse operation: D([K_m ⊕ H], E([K_m ⊕ H], Ks))

Figure 14.6 — Control Vector Encryption and Decryption [Source: CNS_Module_3.pdf, Page 17]

Advantages Limitations

• Better scalability • Reduced workload on single server • Complex management • n(n-1)/2 master keys
• Improved reliability • Faster local authentication • required • Synchronization issues between systems •
Eliminates KDC as single point of failure Not practical for very large networks

Applications: Enterprise networks, Distributed systems, Cloud security, Small local networks

Conclusion: Decentralized key distribution eliminates the single point of failure of centralized KDC while
maintaining security, though it requires significantly more master keys for larger networks.

Key Terms: Decentralized • Master key • Session key • Nonce • End system • n(n-1)/2

■ Forgetting that n(n-1)/2 master keys are needed for n end systems in fully decentralized distribution
■ Saying decentralized is better for all networks — it is only practical for small local networks

■ Memory Trick: Decentralized = Each pair shares a master key | n users → n(n-1)/2 keys

Reference:

Cryptography & Network Security | Module 3 | Page 28


• Material Name: CNS_Module_3.pdf — Page Numbers: 13–17

• Material Name: W_Stallings_Cryptography_and_Network_Security_6th_ed.pdf — Chapter 14

Cryptography & Network Security | Module 3 | Page 29

You might also like