Professional Documents
Culture Documents
Presented By
Presented By
Md.
Md.Yousuf
YousufAli
Ali
ID:173311006
ID:173311006
Department
DepartmentofofComputer
ComputerScience
Science&&Engineering
Engineering
Varendra
VarendraUniversity
University
RSA Algorithm Math
9.2 Perform encryption and decryption using RSA algorithm where
5 * 5 = 1 mod 24
Here: d = 5
Comparison between public key authority and public key certificate
Not possible as no record saved. Possible as each and every key is store
with the certificate.
Comparison between cipher feedback and output feedback
Cipher Feedback
Cipher Feedback (CFB) mode is very similar to CBC; the primary difference is CFB is
a stream mode. It uses feedback (the name for chaining when used in stream modes) to
destroy patterns. Like CBC, CFB uses an initialization vector and destroys patterns,
and errors propagate.
Output Feedback
Output Feedback (OFB) mode differs from CFB in the way feedback is accomplished.
CFB uses the previous ciphertext for feedback. The previous ciphertext is the subkey
XORed to the plaintext. OFB uses the subkey before it is XORed to the plaintext.
Since the subkey is not affected by encryption errors, errors will not propagate.
Man-in-the-Middle Attack
XA USER A
YA USER B XB
KAD1=* YB
KBD2=#
KAD1= YD1^XA
K(BD2)= YD2^XB
XD2
XD1
D YD2
YD1
KBD2=
KAD1=* KBD2= YB^XD2
KAD1= YA^XD1 #
Diffie-Hellman key exchange technique
Users A and B use the Diffie-Hellman key exchange technique with a
common prime q = 71 and a primitive root .
a. If user A has private key ,what is A’s public key ?
b. b. If user B has private key ,what is B’s public key ?
c. c. What is the shared secret key?
SOLUTION:
GIVEN THAT, AGREE ON PRIME NUMBER Q=71,
Α=7,XA=5,XB=12.
COMPUTE PUBLIC KEYS:
5
A’S PUBLIC KEY : YA = 7 MOD 71 = 51
12
B’S PUBLIC KEY :YB = 7 MOD 71 = 4
X
WE KNOW THAT : YA = Α A MOD Q
IF 2^6 MOD 11 = 9 THEN
PRIVATE KEY: XA= 6
SOLUTION:
GENERATES A KEY PAIR AS FOLLOWS
1.PRIVATE KEY, XA = 16 4.S2 = K^(-1)(m-XAS1) mod (q-1)
2.YA = Α ^ XA MOD Q = Α ^16 MOD 19 = 5 = 11 ( 14 -(16)(13) ) mod 18
= - 2134 mod 18
3. PUBLIC KEY, YA = 4 =8
Verify the Signature as follows:
WANT TO SIGN A MESSAGE WITH HASH VALUE, M = 14 V1 = α^m mod q = 2^14 mod 19 = 6
1.SECRET KEY, K = 5 ,WHICH IS RELATIVELY PRIME TO Q- V2 = (YA)^S1(S1)^S2 mod q
= (5^13)*(13^8) mod 19
1 = 18
= (17*16) mod 19 = 272 mod 19 = 6
2.S1 = Α^K MOD Q = 2^5 MOD 19 = 13 Thus, the signature is valid.