21IS71 SIMP With Answers-Watermarkpdf
21IS71 SIMP With Answers-Watermarkpdf
1. Definitions/Explanations:
A substitution cipher that shifts each letter in the plaintext by a fixed number of
positions in the alphabet.
(ii) Cryptography:
(iii) Cryptology:
(iv) Cryptanalysis:
2. Di erences:
Block Ciphers: Encrypt data in fixed-size blocks (e.g., AES with 128-bit blocks).
Confusion: Obscures the relationship between plaintext, ciphertext, and the key
(e.g., substitution techniques).
Symmetric: Single key for encryption and decryption (e.g., AES, DES).
Asymmetric: Uses a key pair (public and private) for encryption and decryption
(e.g., RSA, ECC).
3. Playfair Cipher:
Rules:
Example:
Keyword: "MONARCHY"
Plaintext: "BALLOON" → "BA LX LO ON" → Ciphertext: "IB MN MT UN"
3. Multiply key matrix with plaintext blocks and take modulo 26.
Decryption: Multiply ciphertext by the inverse of the key matrix modulo 26.
Feistel Structure:
Components:
Process:
2. Transmit ciphertext.
Diagram:
[ Plaintext ] --> [ Encryption Algorithm + Key ] --> [ Ciphertext ] --> [ Decryption Algorithm
+ Key ] --> [ Plaintext ]
Substitution:
Focus: Confusion.
Transposition:
Focus: Di usion.
Methods:
A public key encrypts the symmetric key, which is sent to the receiver.
Allows two parties to compute a shared secret over an insecure channel without
transmitting the secret itself.
3. Notes:
ECC: Uses points on elliptic curves for cryptography. O ers strong security with
smaller keys compared to RSA.
Keys can be distributed using centralized Key Distribution Centers (KDCs), Public
Key Infrastructure (PKI), or peer-to-peer methods.
Process:
Diagram:
Elliptic Curve: y² = x³ - 7x + 10
Find: R = P + Q
Solution:
1. Find the slope (λ) of the line PQ: λ = (y₂ - y₁) / (x₂ - x₁) = (4 - 2) / (3 - 1) = 1
3. Therefore, R = P + Q = (-3, 2)
Elliptic Curve: y² = x³ - 7x + 10
Point: P = (1, 2)
Find: R = 2P
Solution:
1. Find the slope (λ) of the tangent line at P: λ = (3x₁² + a) / (2y₁) = (3(1)² - 7) / (2 * 2)
= -1
2. Calculate the coordinates of R (x₃, y₃): x₃ = λ² - 2x₁ = (-1)² - 2(1) = -1 y₃ = λ(x₁ - x₃) -
y₁ = -1(1 - (-1)) - 2 = -4
Elliptic Curve: y² = x³ - 7x + 10
Point: P = (1, 2)
Scalar: k = 3
Find: Q = kP = 3P
Solution:
2. Calculate 3P = P + 2P:
o Find the slope (λ) of the line through P (1, 2) and 2P (-1, -4): λ = (-4 - 2) / (-1 -
1) = 3
o Calculate the coordinates of 3P (x₃, y₃): x₃ = λ² - x₁ - x₂ = 3² - 1 - (-1) = 9 y₃ =
λ(x₁ - x₃) - y₁ = 3(1 - 9) - 2 = -26
Important Notes:
In real-world cryptography, elliptic curves are defined over finite fields for
security and e iciency reasons.
The formulas for point addition and doubling can be more complex depending on
the specific curve and field.
Equation:
y² = x³ + ax + b
where:
4a³ + 27b² ≠ 0 This condition ensures the curve is smooth and doesn't have any
sharp points or self-intersections.
Symmetry: The curve is symmetric about the x-axis. If the point (x, y) lies on the
curve, so does (x, -y).
Group Structure: The points on an elliptic curve, together with a special "point
at infinity" (think of it as a point infinitely far away), form a mathematical
structure called an Abelian group. This means you can "add" points together in a
specific way that follows certain rules.
Example:
The curve y² = x³ - 4x is an elliptic curve over real numbers. You can plot it to see
its shape.
Encryption: Anyone can encrypt a message using the recipient's public key, but
only the recipient with the corresponding private key can decrypt2 it.
Digital Signatures: A sender can create a digital signature using their private key,
and anyone can verify the signature using the sender's public key. This ensures
authenticity and non-repudiation.
Key Advantages:
2. Examples
i) RSA
Key Generation:
o Choose an integer e such that 1 < e < φ(n) and gcd(e, φ(n)) = 1.
o Private key: d
Example:
Let p = 11, q = 13. Then n = 143, φ(n) = 120. Choose e = 7, then d = 103.
Steps: (As explained in the previous response with the paint analogy)
Example:
3. Man-in-the-Middle Attack
4. ElGamal Cryptosystem
Key Generation:
Encryption:
Decryption:
RSA:
o Choose two prime numbers and demonstrate the RSA encryption and
decryption process.
Di ie-Hellman:
o Given p = 17, g = 3, Alice's public key A = 10, and Bob's public key B = 13,
calculate the shared secret key.
1. Encryption (Alice):
o Use the shared secret key to encrypt the message using the agreed-upon
symmetric cipher (e.g., AES).
o Send the encrypted message to Bob.
2. Decryption (Bob):
o Use the same shared secret key to decrypt the message using the same
symmetric cipher.
Important: The security relies on the secrecy of the shared key. If Eve obtains the
key, she can decrypt the message.
o Validity Period: Confirming the certificate is within its valid date range.
Key Extraction: If valid, the sender's public key is extracted from the certificate
for encryption or signature verification.
(iii) DKIM (DomainKeys Identified Mail)
DKIM is an email authentication method that allows the sender to digitally sign
their emails.
Purpose: To verify that the email originated from the claimed sender and hasn't
been tampered with in transit.
Mechanism: A public key is published in the sender's DNS records. The recipient
verifies the signature using this key.
1. Sender-Side:
o The hash is encrypted with the sender's private key (associated with their
domain).
2. Recipient-Side:
o The recipient's email server retrieves the sender's public key from the
DNS record.
o The server generates its own hash of the received email content.
o The two hashes are compared. If they match, the email is authenticated.
Justification:
Authenticity: Ensures the email truly came from the claimed sender.
4. Kerberos
Overview:
Key Distribution Center (KDC): A trusted server that issues tickets for
authentication.
Supports other
Password-
Authentication authentication
based only
mechanisms
Mail User Agent (MUA): Email client used to compose, send, and receive emails.
Mail Submission Agent (MSA): Sends emails from the MUA to the MTA.
Mail Transfer Agent (MTA): Relays emails between servers using SMTP.
Confidentiality:
o Uses public key encryption to encrypt the symmetric key, which is then
sent with the message.
Authentication:
o Creates a digital signature of the message using the sender's private key.
o The recipient verifies the signature using the sender's public key.
1. IPsec Overview
Benefits:
Widely Applicable: Can be used to secure various types of IP tra ic, including
VPNs.
Internet Key Exchange (IKE): Establishes security associations (SAs) (e.g., RFC
7296).
Outbound:
Inbound:
Padding (optional): Used for alignment or to hide the actual data length.
Next Header: Specifies the type of the next header after ESP.
Tunnel Mode ESP: ESP protects the entire original IP packet, which is
encapsulated in a new IP header.
Tunnel Mode: ESP encrypts and authenticates the entire original IP packet,
which is then encapsulated in a new IP header. Used for securing
communication between networks (e.g., VPNs).
IKE Header:
IKE Payloads: