cryptography and network security chapter 13
DESCRIPTION
Cryptography and Network Security Chapter 13. Fifth Edition by William Stallings Lecture slides by Lawrie Brown. Digital Signatures. have looked at message authentication but does not address issues of lack of trust digital signatures provide the ability to: - PowerPoint PPT PresentationTRANSCRIPT
Cryptography and Cryptography and Network SecurityNetwork Security
Chapter 13Chapter 13
Fifth EditionFifth Edition
by William Stallingsby William Stallings
Lecture slides by Lawrie BrownLecture slides by Lawrie Brown
Digital SignaturesDigital Signatures
have looked at have looked at message authentication message authentication but does not address issues of lack of trustbut does not address issues of lack of trust
digital signatures provide the ability to: digital signatures provide the ability to: verify author, date & time of signatureverify author, date & time of signature authenticate message contents authenticate message contents be verified by third parties to resolve disputesbe verified by third parties to resolve disputes
hence include authentication function with hence include authentication function with additional capabilitiesadditional capabilities
Digital Signature ModelDigital Signature Model
Digital Digital Signature Signature
ModelModel
Attacks and ForgeriesAttacks and Forgeries attacksattacks
key-only attackkey-only attack known message attackknown message attack generic chosen message attackgeneric chosen message attack directed chosen message attackdirected chosen message attack adaptive chosen message attackadaptive chosen message attack
break success levelsbreak success levels total breaktotal break selective forgeryselective forgery existential forgeryexistential forgery
Digital Signature RequirementsDigital Signature Requirements
must depend on the message signedmust depend on the message signed must use information unique to sendermust use information unique to sender
to prevent both forgery and denialto prevent both forgery and denial
must be relatively easy to producemust be relatively easy to produce must be relatively easy to recognize & verifymust be relatively easy to recognize & verify be computationally infeasible to forge be computationally infeasible to forge
with new message for existing digital signaturewith new message for existing digital signature with fraudulent digital signature for given messagewith fraudulent digital signature for given message
be practical save digital signature in storagebe practical save digital signature in storage
Direct Digital SignaturesDirect Digital Signatures
involve only sender & receiverinvolve only sender & receiver assumed receiver has sender’s public-keyassumed receiver has sender’s public-key digital signature made by sender signing digital signature made by sender signing
entire message or hash with private-keyentire message or hash with private-key can encrypt using receivers public-keycan encrypt using receivers public-key important that sign first then encrypt important that sign first then encrypt
message & signaturemessage & signature security depends on sender’s private-keysecurity depends on sender’s private-key
ElGamal ElGamal Digital SignaturesDigital Signatures
signature variant of ElGamal, related to D-Hsignature variant of ElGamal, related to D-H so uses exponentiation in a finite (Galois)so uses exponentiation in a finite (Galois) with security based difficulty of computing with security based difficulty of computing
discrete logarithms, as in D-Hdiscrete logarithms, as in D-H use private key for encryption (signing)use private key for encryption (signing) uses public key for decryption (verification)uses public key for decryption (verification) each user (eg. A) generates their keyeach user (eg. A) generates their key
chooses a secret key (number): chooses a secret key (number): 1 < 1 < xxAA < q-1 < q-1
compute their compute their public keypublic key: : yyAA = = aaxxAA mod q mod q
ElGamal ElGamal Digital SignatureDigital Signature Alice signs a message M to Bob by computingAlice signs a message M to Bob by computing
the hash the hash m = H(M)m = H(M), , 0 <= m <= (q-1)0 <= m <= (q-1) chose random integer chose random integer K K with with 1 <= K <= (q-1) 1 <= K <= (q-1) and and gcd(K,q-1)=1gcd(K,q-1)=1
compute temporary key: compute temporary key: SS1 1 = a= akk mod q mod q
compute compute KK-1-1 the inverse of the inverse of K mod (q-1)K mod (q-1) compute the value: compute the value: SS22 = = KK-1-1(m-(m-xxAASS11) ) mod (q-1)mod (q-1) signature is:signature is:(S(S11,S,S22))
any user B can verify the signature by computingany user B can verify the signature by computing VV1 1 = a= a
mm mod q mod q
VV2 2 = y= yAASS11 SS11
SS22 mod q mod q signature is valid if signature is valid if VV1 1 = = VV22
ElGamal ElGamal Signature Signature Example Example use field GF(19) use field GF(19) q=19 q=19 and and aa=10=10 Alice computes her key:Alice computes her key:
A chooses A chooses xxAA=16 =16 & computes & computes yyAA==101016 16 mod 19 = 4mod 19 = 4
Alice signs message with hash Alice signs message with hash m=14m=14 as as ((3,43,4)):: choosing random choosing random K=5 K=5 which has which has gcd(18,5)=1gcd(18,5)=1 computing computing SS1 1 = 10= 10
55 mod 19 = 3 mod 19 = 3
finding finding KK-1-1 mod (q-1) = 5 mod (q-1) = 5-1-1 mod 18 = 11 mod 18 = 11 computing computing SS22 = = 11(14-11(14-16.3) 16.3) mod 18 = 4mod 18 = 4
any user B can verify the signature by computingany user B can verify the signature by computing VV1 1 = 10= 10
1414 mod 19 = 16 mod 19 = 16
VV2 2 = 4= 433.3.344 = 5184 = 16 mod 19 = 5184 = 16 mod 19 since since 1616 = = 1616 signature is valid signature is valid
Digital Signature Digital Signature Standard Standard (DSS)(DSS)
US Govt approved signature schemeUS Govt approved signature scheme designed by NIST & NSA in early 90's designed by NIST & NSA in early 90's published as FIPS-186 in 1991published as FIPS-186 in 1991 revised in 1993, 1996 & then 2000revised in 1993, 1996 & then 2000 uses the SHA hash algorithm uses the SHA hash algorithm DSS is the standard, DSA is the algorithmDSS is the standard, DSA is the algorithm FIPS 186-2 (2000) includes alternative RSA & FIPS 186-2 (2000) includes alternative RSA &
elliptic curve signature variantselliptic curve signature variants DSA is digital signature only unlike RSADSA is digital signature only unlike RSA is is a public-key techniquea public-key technique
DSS vs RSA SignaturesDSS vs RSA Signatures
Digital Signature Digital Signature Algorithm Algorithm (DSA)(DSA)
creates a 320 bit signaturecreates a 320 bit signature with 512-1024 bit securitywith 512-1024 bit security smaller and faster than RSAsmaller and faster than RSA a digital signature scheme onlya digital signature scheme only security depends on difficulty of computing security depends on difficulty of computing
discrete logarithmsdiscrete logarithms variant of ElGamal & Schnorr schemesvariant of ElGamal & Schnorr schemes
DSA Key GenerationDSA Key Generation
have shared global public key values (p,q,g): have shared global public key values (p,q,g): choose 160-bit prime number qchoose 160-bit prime number q choose a large prime p with choose a large prime p with 22L-1L-1 << p < 2p < 2LL
• where L= 512 to 1024 bits and is a multiple of 64where L= 512 to 1024 bits and is a multiple of 64• such that q is a 160 bit prime divisor of such that q is a 160 bit prime divisor of (p-1)(p-1)
choose choose g = hg = h(p-1)/q(p-1)/q • where where 1<h<p-1 1<h<p-1 andand h h(p-1)/q (p-1)/q mod p > 1mod p > 1
users choose private & compute public key: users choose private & compute public key: choose random private key: choose random private key: x<qx<q compute public key: compute public key: y = gy = gx x mod pmod p
DSA Signature CreationDSA Signature Creation
to to signsign a message a message MM the sender: the sender: generates a random signature key generates a random signature key k, k<qk, k<q nb. nb. kk must be random, be destroyed after must be random, be destroyed after
use, and never be reuseduse, and never be reused then computes signature pair: then computes signature pair:
r = (gr = (gkk mod p)mod q mod p)mod q
s = [ks = [k-1-1(H(M)+ xr)] mod q(H(M)+ xr)] mod q sends signature sends signature (r,s)(r,s) with message with message MM
DSA Signature Verification DSA Signature Verification
having received M & having received M & signature signature (r,s)(r,s) to to verifyverify a signature, recipient computes: a signature, recipient computes:
w = sw = s-1 -1 mod q mod q
u1= [H(M)w ]mod q u1= [H(M)w ]mod q
u2= (rw)mod qu2= (rw)mod q
v = [(gv = [(gu1u1 y yu2u2)mod p ]mod q)mod p ]mod q if if v=rv=r then signature is verified then signature is verified see Appendix A for details of proof whysee Appendix A for details of proof why
DSS OverviewDSS Overview
SummarySummary
have discussed:have discussed: digital signaturesdigital signatures ElGamal signature schemesElGamal signature schemes digital signature algorithm and standarddigital signature algorithm and standard