0% found this document useful (0 votes)
544 views5 pages

Plain Text (P) "Attack Postponed" C E (K, P) (P + K) Mod 26 Key 5 C (P + 5) Mod 26

1. The Caesar cipher encrypts the plain text "attack postponed" with a key of 5 to produce the cipher text "FYYFHP UTXYUTSJI". 2. The Vigenere cipher encrypts the sentence "TO BE OR NOT TO BE" with the key "CODE" to produce the cipher text "VCEIQFQSVHRFG". 3. Using Diffie-Hellman key exchange with a prime of 11 and primitive root of 7: - User A's public key is 2 with private key 3 - User B's public key is 4 with private key 6 - The shared secret key is 9

Uploaded by

Gnana Sekhar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
544 views5 pages

Plain Text (P) "Attack Postponed" C E (K, P) (P + K) Mod 26 Key 5 C (P + 5) Mod 26

1. The Caesar cipher encrypts the plain text "attack postponed" with a key of 5 to produce the cipher text "FYYFHP UTXYUTSJI". 2. The Vigenere cipher encrypts the sentence "TO BE OR NOT TO BE" with the key "CODE" to produce the cipher text "VCEIQFQSVHRFG". 3. Using Diffie-Hellman key exchange with a prime of 11 and primitive root of 7: - User A's public key is 2 with private key 3 - User B's public key is 4 with private key 6 - The shared secret key is 9

Uploaded by

Gnana Sekhar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1. Encrypt the plain text “attack postponed” using Caesar Cipher(C=E(5,p)).

Solution
Plain text(p)=“attack postponed”
C = E(k, p) = (p + k) mod 26
key = 5
C = (p + 5) mod 26

Cipher Text : FYYFHP UTXYUTSJI

2. Use the key CODE" to encrypt the sentence “TO BE OR NOT TO BE" using
Vignere cipher and write the algorithm for the same.
Key : C O D E
Plaintext: T O B E O R N O T T O B E
Solution
Key CODECODECODEC
Plaintext TOBEORNOTTOBE
Ciphertext V C E I Q F Q S V H R F G
3. Evaluate using Diffie-Hellman key exchange technique. Users A and B use a
common prime q=11 and a primitive root alpha=7.
a. If user A has private key XA=3.What is A’s public key YA?
b. If user B has private key XB=6. What is B’s public key YB?
c. What is the shared secret key? Also write the algorithm.
Solution
a)YA=73mod11
YA=2
b)YB=76mod11
YB=4
c)K=43mod11
K=9
K=26mod11
K=9
4. Apply the mathematical foundations of RSA algorithm. Perform encryption
and decryption for the following data. Assume P=17, q=7, e=5 message=”ME”.
Solution
P=17 q=7 e=5 message=ME
n=pq
n=17*7=119
Ø(n)=(p-1)(q-1)
Ø(n)=16*6=96
d=24
C=ME5mod119
M=cdmod119
5. Alice signs a message M =14 to Bob by computing h(M). Alice chooses XA=16
as private key. Using ElGamal scheme, verify the signature by computing S1, S2,
V1, V2. Assume the parameter values as k=5, p=19, d=10.
Solution
• use field GF(19) q=19 and a=10
• Alice computes her key:
– A chooses xA=16 & computes yA=1016 mod 19 = 4
• Alice signs message with hash m=14 as (3,4):
– choosing random K=5 which has gcd(18,5)=1 choosing random K5
which has gcd(18,5) 1
– computing S1 = 105 mod 19 = 3
– finding K-1 mod (q-1) = 5-1 mod 18 = 11
– computing S2 = 11(14-16.3) mod 18 = 4
• any user B can verify the signature by computing
– V1 = 1014 mod 19 = 16 – V2 = 43.34 = 5184 = 16 mod 19
– since 16 = 16 signature is valid 
6. Encrypt the message “MEET ME” using Hill Cipher with the following key
matrix and shoe the decryption to formulate original plain text

Solution
C = EK (P) = KP mod 26
P = DK (C ) = K-1 C mod 26 = K-1 KP = P
K is the key matrix and K-1 is the matrix inverse. The inverse matrix can be calculated as K.K -1 = I
where I is the identity matrix. 

Encryption example Plaintext:MEET ME


CIPHERTEXT:GSEBXE

You might also like