CNS Unit 2 (Solution)
CNS Unit 2 (Solution)
Asymmetric key encryption, also known as public-key cryptography, is a type of encryption where two different keys are
used:
This encryption method ensures confidentiality, integrity, authentication, and non-repudiation of data.
1. The sender encrypts the plaintext using the receiver's public key.
2. The encrypted message (ciphertext) is sent to the receiver.
3. The receiver decrypts the ciphertext using their private key.
4. Only the intended receiver, possessing the private key, can decrypt the message.
• RSA (Rivest-Shamir-Adleman)
• Elliptic Curve Cryptography (ECC)
• Diffie-Hellman Key Exchange
• DSA (Digital Signature Algorithm)
This method is widely used in secure communications, digital signatures, and SSL/TLS protocols.
Asymmetric Key Encryption is used in various real-life applications such as : -
1) Digital signatures use asymmetric encryption and hashing to ensure the authenticity and integrity of documents and
emails
2) SSL/TLS certificates use asymmetric encryption to authenticate the server and establish a secure communication channel
between the server and the client.
3) Personal authentication certificates use asymmetric encryption to authenticate users within an organisation and restrict
access to sensitive data or systems.
A Man-in-the-Middle (MITM) Attack happens when a hacker secretly intercepts and alters communication between two
parties (such as a user and a website) without them knowing.
Example: Imagine you are talking to your bank online, but a hacker pretends to be the bank and listens to your
conversation. You think you’re securely logging in, but the hacker steals your username and password.
• Passwords
• Credit card details
• Personal data
4 The attacker may send fake responses to trick you into entering more sensitive information.
What Happens?
Key Distribution refers to the process of securely sharing cryptographic keys between users to ensure secure
communication. Since encryption relies on keys, it is crucial to distribute them safely to prevent unauthorized access.
1. Master Key
2. Session Key
Public key distribution is essential for secure communication. Here are four simple ways to distribute public keys:
How it works:
• A user broadcasts their public key to everyone (e.g., on a website, email, or social media).
Problem:
• Forgery risk – A hacker can create a fake key, pretending to be someone else.
Example:
Imagine Alice posts her public key on Twitter, but a hacker replaces it with a fake key. Bob, thinking it’s Alice’s real key,
sends an encrypted message that the hacker can read.
How it works:
Problem:
Example:
A company website has a public directory listing employee public keys for secure email communication. But if a hacker
modifies the directory, emails could be intercepted.
How it works:
Problem:
How it works:
• A Certificate Authority (CA) issues a digital certificate that verifies the public key’s owner.
• The certificate includes the key, owner details, expiration date, and is signed by the CA’s private key.
• Anyone can verify the certificate using the CA’s public key.
Problem:
Example:
SSL Certificates on websites ensure that you are talking to the real website, not a fake one. When you visit
https://www.bank.com, your browser verifies the certificate before allowing secure transactions.
Summary
Public Directory Public keys are stored in an A company website lists public
Tampering
(PKD) online directory keys, but hackers modify them
Public Key Authority A trusted authority provides Real-time access Like verifying ID at a government
(PKA) public keys on request required office
Among these, Public Key Certificates (PKC) are the most secure and widely used!
11. Write a note on simple secret key distribution.
• A forwards the session key to B but encrypts it using B’s key to ensure security.
• B receives the session key and sends a random number (Nonce N2) to A, encrypted with the session key.
• A replies with a function of N2, proving that it correctly received the session key.
• Now, A and B can communicate securely using the session key (Ks) without needing further KDC interaction.
13. Specify the applications of public key cryptography.
Public key cryptography is considered the most secure method for digital signatures and encryption processes. It ensures
secure online communication and plays a vital role in cryptographic systems.
1. Digital Signatures
• A message is signed using the private key of the sender to ensure authenticity.
• The recipient can verify the signature using the sender's public key.
2. Encryption/Decryption
• The sender encrypts the message using the receiver’s public key.
• The receiver decrypts the message using their private key to ensure confidentiality.
3. Key Exchange
5. Key Management
6. Cryptographic Protocols
Public key cryptography ensures secure authentication, confidentiality, and data integrity in modern communication
systems.