1.
Describe Attack Against Hash Function and man-in middle man attack
for hash function.
Answer:
• Attack Against Hash Function:
• “The hash value must be transmitted in a secure fashion.
• The hash value must be protected so that if an adversary alters or
replaces the message, it is not feasible for adversary to also alter the
hash value to fool the receiver.
• Alice transmits a data block and attaches a hash value.
• Darth intercepts the message, alters or replaces the data block and
calculates and attaches a new hash value.
• Bob receives the altered data with the new hash value and does not
detect the change.
• To prevent this attack, the hash value generated by Alice must be
protected.”
Man-in-the-Middle Attack:
The Problem
• Normal process:
• Alice sends (Message, Hash) → Bob recomputes the hash and checks.
• Attack
❑Darth intercepts the message.
❑He modifies or replaces the message (M → M′).
❑He recomputes the new hash (H(M′)).
❑He forwards (M′, H(M′)) to Bob.
❑Bob sees a match and cannot detect the tampering.
• The issue: A hash function alone does not provide security because
anyone
Can compute a hash.
• The result is that both A and B know Ks and are unaware that Ks has
also been revealed to D.
• A and B can now exchange messages using Ks. D no longer actively
interferes with the communications channel but simply eavesdrops.
• Knowing Ks, D can decrypt all messages, and both A and B are unaware
of the problem.
• This simple protocol is only useful in an environment where the only
threat is eavesdropping.”
2. How Asymmetric Encryption Is Used to Distribute Symmetric Keys
Securely
Answer:
Simple Secret Key Distribution
• An extremely simple scheme was put forward by Merkle [MERK79].
• If A wishes to communicate with B, the following procedure is employed:
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.
2. B generates a secret key, Ks, and transmits it to A, which is encrypted with
A’s public key.
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.
4. A discards PUa and PRa and B discards PUa.
A and B can now securely communicate using conventional encryption and
the session key Ks.”
At the completion of the exchange, both A and B discard Ks.
• Its simple and an attractive protocol.
• No keys exist before the start of the communication, and none exist after the
Completion of communication.
• Thus, the risk of compromise of the keys is minimal. At the same time, the
Communication is secure from eavesdropping.
3. Explain the working of Transparent Key Control Scheme
A Transparent Key Control Scheme is a method that enables end-to-end
encryption at the network or transport layer without requiring any direct
involvement from the end users. It operates automatically and transparently
to provide secure communication between systems.
Key Components:
• Session Security Module (SSM):
The SSM is the core element of this scheme. It resides within each host and is
responsible for performing end-to-end encryption and managing session keys
on behalf of the host or terminal.
• Key Distribution Center (KDC):
A trusted authority responsible for approving connection requests and
securely distributing session keys to SSMs.”
Working Process (Steps in Connection Establishment):
“Connection Request:
When one host wants to communicate with another, it sends a connection-
request packet to initiate communication.
Authorization Request to KDC:
The SSM intercepts the connection request, temporarily holds it, and contacts
the KDC to obtain permission for the connection. The message exchange
between the SSM and KDC is encrypted using a master key shared between
them.
Session Key Generation and Distribution:
If the KDC approves, it generates a session key and securely sends it to both
SSMs (the requester and the receiver) using their respective unique permanent
keys.
Connection Establishment:
Once both SSMs have the session key, the original connection request is
released, and a secure connection is established between the two hosts.
Data Exchange:
All subsequent data transmitted between the two systems is encrypted and
decrypted by their SSMs using the session key, ensuring confidentiality and
integrity.”
Advantages of the Transparent Key Control Scheme:
• Transparency: Users do not need to manage keys or perform encryption
Manually; the process is automatic.
• Security: The session key is generated for each connection and shared
securely, Protecting data from unauthorized access.
• Flexibility: Multiple terminals and hosts can dynamically establish secure
Connections through the same KDC infrastructure.
• End-to-End Protection: Encryption occurs between the communicating end
Systems, not just intermediate nodes.
[Link] the working of Decentralized Key Control
In a decentralized key control system, there is no central Key Distribution
Center (KDC) responsible for managing and distributing keys. Instead, each
end system or node handles key establishment directly with other nodes in the
network. This approach eliminates the need to fully trust and protect a single
central KDC, making the system less dependent on a single point of failure.”
“No Central Authority: Each node independently manages key exchange with
other nodes.
Local Applicability: Works best in small or local networks, as scalability
becomes an issue with a large number of users.
Master Keys: Every pair of nodes must share a unique master key to enable
secure communication.”
Steps in Establishing a Session Key:
“Request Initiation:
Node A sends a request to node B for a session key. The message includes a
nonce (N1), which is a random number used to ensure freshness and prevent
replay attacks.
Response from B:
Node B generates a session key (Ks) and sends it back to A, encrypted with
their shared master key. The response also includes B’s identifier (IDB), a
function of A’s nonce (f(N1)) to confirm freshness, and a new nonce (N2)
generated by B.
Confirmation from A:
Using the new session key (Ks), A sends f(N2) back to B to confirm that both
now share the same session key.”
5. Describe how a digital certificate helps in public key distribution.
A Public-Key Certificate is a digitally signed document issued by a Certificate
Authority (CA) that binds a user’s identity to their public key. It allows users
to securely verify each other’s public keys without needing to contact a central
authority every time communication occurs.
A typical certificate contains:
Owner’s identifier (ID), Public key (PU), Timestamp (T), Signature of the
Certificate Authority (CA).
A user can present his or her public key to the authority in a secure manner
and obtain a certificate. The user can then publish the certificate.
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.
[Link] participant can verify the time validity of the certificate
Each participant applies to the certificate authority, supplying a public key and
requesting a certificate.
• Application must be in person or by some form of secure authenticated
Communication.
• For participant A, the authority provides a certificate of the form
• CA = E(PRauth, [T}IDA }PUa])
• A may then pass this certificate on to any other participant, who reads and
verifies
The certificate as follows:
• D(PUauth, CA) = D(PUauth, E(PRauth, [T}IDA }PUa])) = (T}IDA }PUa)
• The recipient uses the authority’s public key, PUauth, to decrypt the
certificate, the Certificate is readable only using the authority’s public key.
• The elements IDA and PUa provide the recipient with the name and public
key of the certificate’s holder.
• The timestamp T validates the currency of the certificate.
6. Explain how a simple hash function processes input data
7. Demonstrate the Control Vector Encryption and Decryption
8. Describe the PKIX Management Functions
9. Illustrate the key elements of the PKIX model
10. Apply a given hash function to a string and compute the hash value
6th answer
11. Explain the working of symmetric key distribution using a KDC