PPR
PPR
Ans:
To encrypt the plaintext "EXAM" using the Hill Cipher with the key
k=(11837), we first need to convert the plaintext into numeric values
based on the position of the letters in the alphabet:
E=5
X = 24
A=1
M = 13
Next, we need to break the numeric values into pairs based on the key
matrix size (in this case, a 2x2 matrix):
[11 8]
[3 7]
Then, we need to multiply the key matrix with the numeric value matrix
and take the modulus 26 of each result:
[11 * 5 + 8 * 24] mod 26 = (55 + 192) mod 26 = 247 mod 26 = 17 -> Q
Therefore, the encrypted text for "EXAM" using Hill Cipher with key
k=(11837) is "QILP".
Question 2 Show that DES decryption is, in fact, the inverse Of DES
encryption.
Ans:
Let
Li = Ri-1
3. Final Permutation
Li = Ri+1
3. Final Permutation
Ans:
Ans:
Step 2: Repeat the keyword until it matches the length of the plaintext
Our plaintext is "You Should Defend the East Wall of the Castle", which
has 46 characters. So, we repeat the keyword "ANTICIPATION" until it
matches the length of the plaintext:
ANTICIPATIONANTICIPATIONANTICIPIC
Y + A = 24 + 0 % 26 = 24 = Y
O + N = 14 + 13 % 26 = 1 = B
U + T = 20 + 19 % 26 = 13 = N
S + I = 19 + 8 % 26 = 21 = V
H + C = 7 + 2 % 26 = 9 = I
O + I = 14 + 8 % 26 = 16 = P
U + P = 20 + 15 % 26 = 9 = I
L + A = 11 + 0 % 26 = 11 = L
L + N = 11 + 13 % 26 = 24 = Y
R + T = 17 + 19 % 26 = 10 = K
G + I = 6 + 8 % 26 = 14 = O
H + C = 7 + 2 % 26 = 9 = I
E + I = 4 + 8 % 26 = 12 = M
A + P = 0 + 15 % 26 = 15 = O
S + A = 19 + 0 % 26 = 19 = T
T + N = 19 + 13 % 26 = 6 = G
H + T = 7 + 19 % 26 = 0 = A
E + I = 4 + 8 % 26 = 12 = M
E + C = 4 + 2 % 26 = 6 = G
A + I = 0 + 8 % 26 = 8 = I
S + P = 19 + 15 % 26 = 8 = I
T + I = 19 + 8 % 26 = 21 = V
W + C = 22 + 2 % 26 = 24 = Y
A + P = 0 + 15 % 26 = 15 = O
L + A = 11 + 0 % 26 = 11 = L
L + N = 11 + 13 % 26 = 24 = Y
O + T = 14 + 19 % 26 = 7 = H
F + I = 5 + 8 % 26 = 13 = N
T + C = 19 + 2 % 26 = 21 = V
H + K = 7 + 10 % 26 = 17 = R
E + N = 4 + 13 % 26 = 17 = R
E + T = 4 + 19 % 26 = 23 = X
A + C = 0 + 2 % 26 = 2 = C
S + N = 19 + 13 % 26 = 6 = G
T + D = 19 + 3 % 26 = 22 = W
W + E = 22 + 4 % 26 = 0 = A
A + N = 0 + 13 % 26 = 13 = N
L + D = 11 + 3 % 26 = 14 = O
L + I = 11 + 8 % 26 = 19 = T
O + C = 14 + 2 % 26 = 16 = P
F + N = 5 + 13 % 26 = 18 = S
T + A = 19 + 0 % 26 = 19 = T
H + T = 7 + 19 % 26 = 0 = A
E + I = 4 + 8 % 26 = 12 = M
E + O = 4 + 14 % 26 = 18 = S
A + F = 0 + 5 % 26 = 5 = F
S + L = 19 + 11 % 26 = 4 = E
T + O = 19 + 14 % 26 = 7 = H
W + N = 22 + 13 % 26 = 9 = I
A + C = 0 + 2 % 26 = 2 = C
L + C = 11 + 2 % 26 = 13 = N
L + A = 11 + 0 % 26 = 11 = L
O + M = 14 + 12 % 26 = 0 = A
F + C = 5 + 2 % 26 = 7 = H
T + N = 19 + 13 % 26 = 6 = G
H + D = 7 + 3 % 26 = 10 = K
E + I = 4 + 8 % 26 = 12 = M
E + A = 4 + 0 % 26 = 4 = E
A + L = 0 + 11 % 26 = 11 = L
S + N = 19 + 13 % 26 = 6 = G
T + D = 19 + 3 % 26 = 22 = W
H + I = 7 + 8 % 26 = 15 = O
E + D = 4 + 3 % 26 = 7 = H
E + L = 4 + 11 % 26 = 15 = O
A + I = 0 + 8 % 26 = 8 = I
S + P = 19 + 15 % 26 = 8 = I
T + C = 19 + 2 % 26 = 21 = V
L + N = 11 + 13 % 26 = 24 = Y
O + D = 14 + 3 % 26 = 17 = R
F + I = 5 + 8 % 26 = 13 = N
T + E = 19 + 4 % 26 = 23 = X
H + M = 7 + 12 % 26 = 19 = T
E + A = 4 + 0 % 26 = 4 = E
A + C = 0 + 2 % 26 = 2 = C
S + N = 19 + 13 % 26 = 6 = G
T + D = 19 + 3 % 26 = 22 = W
O + E = 14 + 4 % 26 = 18 = S
F + N = 5 + 13 % 26 = 18 = S
T + H = 19 + 7 % 26 = 0 = A
H + T = 7 + 19 % 26 = 0 = A
H + E = 7 + 4 % 26 = 11 = L
E + X = 4 + 23 % 26 = 1 = B
A + C = 0 + 2 % 26 = 2 = C
S + G = 19 + 6 % 26 = 1 = B
T + I = 19 + 8 % 26 = 1 = B
W + G = 22 + 6 % 26 = 2 = C
A + I = 0 + 8 % 26 = 8 = I
L + I = 11 + 8 % 26 = 19 = T
L + V = 11 + 21 % 26 = 6 = G
O + N = 14 + 13 % 26 = 1 = B
F + D = 5 + 3 % 26 = 2 = C
T + W = 19 + 22 % 26 = 15 = O
H + A = 7 + 0 % 26 = 7 = H
E + L = 4 + 11 % 26 = 15 = O
E + L = 4 + 11 % 26 = 15 = O
A + Y = 0 + 24 % 26 = 22 = W
S + O = 19 + 14 % 26 = 7 = H
T + H = 19 + 7 % 26 = 0 = A
W + I = 22 + 8 % 26 = 4 = E
A + T = 0 + 19 % 26 = 19 = T
L + C = 11 + 2 % 26 = 13 = N
L + C = 11 + 2 % 26 = 13 = N
O + A = 14 + 0 % 26 = 14 = O
Ans:
1. Mono alphabetic Cipher: jitni dfa bhi wo lafaz aye ussi ky sath
replace krna ha
2. Polyalphabetic Cipher: agr dobara wohi lafz aye too kisi aur se bhi
replace kr sakty hnn
In summary, mono alphabetic ciphers are simpler but less secure, while
polyalphabetic ciphers provide better security by using multiple
substitution alphabets
In summary, the S-boxes in DES play a vital role in ensuring the security
of the encryption by introducing non-linearity, enhancing confusion and
diffusion, and making it difficult for attackers to find patterns or
develop shortcuts
Long 1:
cipher text C = 10
public key Is e = 5,
n= 35.
What is the plaintext M? Determine p, q such that n= p*q and
M=C* mod A.
ans:
Given:
Ciphertext (C) = 10
Modulus (n) = 35
In an RSA system, we can calculate the private key exponent (d) using
the public key components (e,p,q) and Euler's totient function (φ(n)).
φ(n) = (p-1)(q-1)
2. Since n = p*q, we can factorize n = 35 into its prime factors (p and q):
35 = 5 * 7
3. Calculate φ(n):
4. Calculate the private key exponent (d) using the modular inverse of e
mod φ(n):
e=5
φ(n) = 24
5d ≡ 1 mod 24
d≡5
M = C^d mod n
M = 10^5 mod 35
M = 100000 mod 35
M = 10
Long 2:
Ans:
Diagram:
[User A] <---> [Public Key Directory] <--- {Encrypted Message} ---> [User
B]
Public Key Authority:
Diagram:
When User A wants to communicate securely with User B, they can first
verify the public key of User B from the PKA, ensuring that they are
communicating with the intended recipient.
1.Feistel Structure:
3) Can the One Time Pad (OTP) be vulnerable to certain types of attacks
or vulnerabilities?
4. Frequency Analysis:
o Concerns:
o Symmetric:
o Asymmetric:
9) Show that DES decryption is, in fact, the inverse of DES encryption.
5. Types of Firewalls: