Professional Documents
Culture Documents
Reference Books:
1. Kaufman, Perlman and Speciner, “Network Security: Private
Communication in a Public World”, 2nd edition, Pearson Publishers ,
2002.
2. Menezes, van Oorschot, and Vanstone, “The Handbook of Applied
Cryptography”, 20th Edition, WILEY, 2015.
3. H. Silverman, “A Friendly Introduction to Number Theory,” 4th
Edition, Boston: Pearson, 2012.
Module 4: Hash Functions and
Authentication(4 Hours)
Message Authentication Code(MAC)
MD5
Secure Hash algorithms(SHA)
HMAC
Digital Signature
Digital Signature Standards(DSS)
Digital Signature (DS)
What is Digital Signature??
◦ Digital signature is a process to verify the
integrity of transmitted message and
guarantees the source.
◦ Hash value, together with Sender’s private key
serves as input to a digital signature generation
algorithm, which produces a short block that
functions as a digital signature.
Digital Signatures - Examples
I agree
Efcc61c1c03db8d8ea8569545c073c814a0ed755
My place of birth is at Gwalior.
fe1188eecd44ee23e13c4b6655edc8cd5cdb6f25
I am 62 years old.
0e6d7d56c4520756f59235b6ae981cdb5f9820a0
I am an Engineer.
ea0ae29b3b2c20fc018aaca45c3746a057b893e7
I am a Engineer.
01f1d8abd9c2e6130870842055d97d315dff1ea3
(p,q,g)
&Y
USER A USER B
DSA/DSS Approach
Message
Digest(m)
P,q,g
Signature
(r,s) verified
SHA 512
Verification Module
Random
integer
Digital Signature Algorithm
Example:
Consider p=7
Q can be calculated
like: p-1 mod q=0
6 mod q=0
So q taken as 3
h- any integer
Then g= h(p-1)/q mod p
= 2(7-1)/3 mod 7
= 4 mod 7
g =4
Step 2: USER A- Generation of Public Key and
Private Key
X = 2 (Private Key)
Y= g x mod p
= 4 2 mod 7
Y=2
Step 3: Generating Signature{r,s} & Verifications
K=2
r= (g k mod p) mod q
= (4 2 mod 7) mod 3
= 2 mod 3 = 2
s= [k-1(H(M)+x.r)] mod q
= [2-1(3+2*2)] mod 3
= [2-1(7)] mod 3
= 14 mod 3 =2
U1= [H(M’)w] mod q
=[3*(s’-1)mod q] mod q
=[3*2-1 mod 3] mod 3
=0
U2=[(r’)w] mod q
=[2 *2-1 mod 3] mod 3
=1
V= [(gu1*yu2) mod p]mod q
=[(40*21) mod 7] mod 3
=[2] mod 3 = 2
DSA – Functions of Signing
DSA – Functions of Verification