Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

23
Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1

Transcript of Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

Page 1: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

Chapter 5

Digital Signatures

MSc. NGUYEN CAO DATDr. TRAN VAN HOAI

1

Page 2: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Content Digital Signatures Distribution of public keys

2

Page 3: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Digital Signatureshave looked at message authentication ▫but does not address issues of lack of trust

digital signatures provide the ability to: ▫verify author, date & time of signature▫authenticate message contents ▫be verified by third parties to resolve disputes

hence include authentication function with additional capabilities

3

Page 4: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Practical Signature Schemes

Sender:▫Signer computes h = H(M) (for example SHA-1

hash)▫h is encrypted with the private key to get the

signature S.Signer sends M || SReceiver:▫Extract M. Calculate h = H(M).▫S is decrypted with public key to get h’.▫Verify h’ = h

4

Page 5: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Practical Signature Schemes

5

Page 6: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

RSA Signature Scheme

Alice's public keys are na and ea.Alice wishes to sign a message M▫Compute h = h(M)

▫The signature S is computes as S = hda mod na.

Any verfier with access to Alice's public keys ea and na can verify that:

h’ = Sea ≡ h

eada ≡ hk(na)+1

≡ h mod na.

6

Page 7: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Digital Signature Standard (DSS)US Govt approved signature schemedesigned by NIST & NSA in early 90's published as FIPS-186 in 1991revised in 1993, 1996 & then 2000uses the SHA hash algorithm DSS is the standard, DSA is the algorithmFIPS 186-2 (2000) includes alternative RSA &

elliptic curve signature variants

7

Page 8: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Digital Signature Algorithm (DSA)

creates a 320 bit signaturewith 512-1024 bit securitysmaller and faster than RSAa digital signature scheme onlysecurity depends on difficulty of computing

discrete logarithms

8

Page 9: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

DSA Key Generationhave shared global public key values (p,q,g): ▫choose q, a 160 bit ▫choose a large prime 2L-1 ≤ p ≤ 2L

where L= 512 to 1024 bits and is a multiple of 64 and q is a prime factor of (p-1), 2159 < q < 2160

▫choose g = h(p-1)/q where 1 < h <p-1, h(p-1)/q (mod p) > 1

users choose private & compute public key: ▫choose private key: x < q ▫compute public key: y = gx (mod p)

9

Page 10: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

DSA Signature Creation

to sign a message M the sender:▫generates a random signature key k, k < q ▫k must be random, be destroyed after use, and never

be reusedthen computes signature pair: r = (gk(mod p))(mod q) s = (k-1.H(M)+ x.r)(mod q)

signature is r || s (r, s are 160-bit quantities)sends signature (r,s) with message M

10

Page 11: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

DSA Signature Verification

having received M & signature (r,s) to verify a signature, recipient computes: w = s-1(mod q) u1= (H(M).w)(mod q) u2= (r.w)(mod q) v = (gu1.yu2(mod p)) (mod q)

if v=r then signature is verifiedA proof is provided at this book's Web site.

11

Page 12: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Advantages of DSA

The signature size is small (equivalent to 2 hashes)

All computations (for signing and verication) use smaller modulus q

12

Page 13: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Distribution of Public Keys

can be considered as using one of:▫public announcement▫publicly available directory▫public-key authority▫public-key certificates

Page 14: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Public Announcementusers distribute public keys to recipients or

broadcast to community at large▫eg. append PGP keys to email messages or post

to news groups or email listmajor weakness is forgery▫anyone can create a key claiming to be someone

else and broadcast it▫until forgery is discovered can masquerade as

claimed user

Page 15: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Publicly Available Directorycan obtain greater security by registering keys

with a public directorydirectory must be trusted with properties:▫contains {name,public-key} entries▫participants register securely with directory▫participants can replace key at any time▫directory is periodically published▫directory can be accessed electronically

still vulnerable to tampering or forgery

Page 16: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Public-Key Authorityimprove security by tightening control over

distribution of keys from directoryhas properties of directoryand requires users to know public key for the

directorythen users interact with directory to obtain any

desired public key securely▫does require real-time access to directory when

keys are needed

Page 17: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Public-Key Authority

Page 18: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Public-Key Certificatescertificates allow key exchange without real-

time access to public-key authoritya certificate binds identity to public key ▫usually with other info such as period of validity,

rights of use etcwith all contents signed by a trusted Public-Key

or Certificate Authority (CA)can be verified by anyone who knows the

public-key authorities public-key

Page 19: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Public-Key Certificates

Page 20: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Public Key Infrastructure

CA signs the public key of all entitieswhich can be verified by any entity who has

acess to the public key of the CAThe public key of the CA is widely distributed▫advertized in newspapers▫preloaded in all computers

X.509 - format for public key certificates

Page 21: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Public Key Infrastructure

(Step 1) Key generation: Every entity generates a public-private key pair▫choose a random private key▫compute the public key

(Step 2) Registration: Every entity should▫provide proof of their identity (to the CA)

(Step 3) Obtain certificate from the CA▫CA signs a certificate which binds the identity of A

to A’s public key

Page 22: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

X.509 Formats

Page 23: Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.

BKTP.HCM

Summary

have discussed:▫digital signatures▫distribution of public keys

23