Unit 2
Unit 2
1. Key Generation:
2. Encryption:
3. Decryption:
Key Concepts:
Real-Life Example:
When you visit a secure website (HTTPS), your browser uses the
website’s public key to encrypt data. Only the website’s private key
can decrypt it.
Diagram:
Copy
-------------------------
| Sender: |
| |
| Receiver: |
-------------------------
The RSA algorithm is one of the most widely used public key
cryptosystems. It is based on the mathematical difficulty of factoring large
integers.
Steps in RSA:
1. Key Generation:
2. Encryption:
3. Decryption:
Example:
Real-Life Example:
Diagram:
Copy
RSA Process
-------------------------
| Key Generation: |
| 2. Choose e → Compute d |
| |
| Encryption: |
| 1. C = M^e mod n |
| |
| Decryption: |
| 1. M = C^d mod n |
-------------------------
Key Distribution:
Real-Life Example:
Both parties now have the same shared secret SS, which can be used for
symmetric encryption.
Example:
Real-Life Example:
Diagram:
Copy
-------------------------
| Party A: |
| 2. Send A to Party B |
| |
| Party B: |
| 2. Send B to Party A |
| |
| Shared Secret: |
2. Hash Functions.
The sender computes the MAC and appends it to the message. The
receiver recomputes the MAC and compares it with the received
MAC to verify authenticity.
Hash Functions:
Real-Life Example:
MAC Security:
1. Digital Signatures:
2. Password Storage:
3. Data Integrity:
Diagram:
Copy
HMAC Process
-------------------------
| Sender: |
| 2. Send M + HMAC |
| |
| Receiver: |
-------------------------
Summary
o This step ensures that only the sender (who holds the private
key) can generate the signature.
Real-Life Example:
Diagram:
Copy
-------------------------
| Sender: |
| |
| Receiver: |
-------------------------
Kerberos:
Overview:
Steps in Kerberos:
1. Authentication Request:
2. TGT Issuance:
Real-Life Example:
Overview:
o Validity Period: The start and end dates for which the
certificate is valid.
Real-Life Example:
Diagram:
Copy
X.509 Certificate
-------------------------
| Version |
| Serial Number |
| Signature Algorithm |
| Issuer |
| Validity Period |
| Subject |
| Public Key |
| Digital Signature |
-------------------------
Key Sizes: Supports key sizes of 1024, 2048, and 3072 bits for
enhanced security.
Steps in DSS:
1. Key Generation:
o The public key is shared, while the private key is kept secret.
2. Signature Generation:
3. Signature Verification:
o Use the sender’s public key and DSA to verify the digital
signature.
Real-Life Example:
Diagram:
Copy
DSS Process
-------------------------
| Sender: |
| |
| Receiver: |
| 1. Hash Received Message → Verify Signature with DSA and Public Key |
-------------------------
Summary