CNS2010handout 10 :: digital signatures1 computer and network security matt barrie.

Slides:



Advertisements
Similar presentations
Hash Functions A hash function takes data of arbitrary size and returns a value in a fixed range. If you compute the hash of the same data at different.
Advertisements

Public Key Cryptosystem
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Cryptography and Network Security
Digital Signatures and Hash Functions. Digital Signatures.
Authentication and Digital Signatures CSCI 5857: Encoding and Encryption.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
ELECTRONIC PAYMENT SYSTEMSFALL 2002COPYRIGHT © 2002 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Introduction to Modern Cryptography Homework assignments.
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
Announcements: 1. HW6 due now 2. HW7 posted Questions? This week: Discrete Logs, Diffie-Hellman, ElGamal Discrete Logs, Diffie-Hellman, ElGamal Hash Functions.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
The School of Electrical Engineering and Computer Science (EECS) CS/ECE Network Security Dr. Attila Altay Yavuz Topic 5 Essential Public Key Crypto Methods.
Chapter 3 Encryption Algorithms & Systems (Part C)
ELECTRONIC PAYMENT SYSTEMSFALL 2001COPYRIGHT © 2001 MICHAEL I. SHAMOS Electronic Payment Systems Lecture 6 Epayment Security II.
Network Security – Part 2 V.T. Raja, Ph.D., Oregon State University.
Foundations of Cryptography Lecture 8 Lecturer: Moni Naor.
Computer Science CSC 474Dr. Peng Ning1 CSC 474 Information Systems Security Topic 2.5 Public Key Algorithms.
CSE 597E Fall 2001 PennState University1 Digital Signature Schemes Presented By: Munaiza Matin.
J. Wang. Computer Network Security Theory and Practice. Springer 2008 Chapter 4 Data Authentication Part II.
Cryptography and Network Security Chapter 13
Introduction to Public Key Cryptography
Public Key Model 8. Cryptography part 2.
13.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 13 Digital Signature.
Digital Signatures (DSs) The digital signatures cannot be separated from the message and attached to another The signature is not only tied to signer but.
8. Data Integrity Techniques
Chapter 31 Network Security
Csci5233 Computer Security1 Bishop: Chapter 10 Key Management: Digital Signature.
Applied Cryptography Spring 2015 Digital signatures.
Information Security and Management 13. Digital Signatures and Authentication Protocols Chih-Hung Wang Fall
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Chapter 5 Digital Signatures MSc. NGUYEN CAO DAT Dr. TRAN VAN HOAI 1.
Bob can sign a message using a digital signature generation algorithm
1 Lect. 15 : Digital Signatures RSA, ElGamal, DSA, KCDSA, Schnorr.
The RSA Algorithm Rocky K. C. Chang, March
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
CS555Topic 211 Cryptography CS 555 Topic 21: Digital Schemes (1)
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Lecture 3.2: Public Key Cryptography II CS 436/636/736 Spring 2014 Nitesh Saxena.
Understanding Cryptography – A Textbook for Students and Practitioners by Christof Paar and Jan Pelzl Chapter 10 – Digital Signatures.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Public-Key Cryptography CS110 Fall Conventional Encryption.
Topic 22: Digital Schemes (2)
Digital Signatures A primer 1. Why public key cryptography? With secret key algorithms Number of key pairs to be generated is extremely large If there.
Lecture 3.4: Public Key Cryptography IV CS 436/636/736 Spring 2013 Nitesh Saxena.
Cryptography Lecture 9 Stefan Dziembowski
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Chapter 21 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security Chapter 13 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
31.1 Chapter 31 Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Prepared by Dr. Lamiaa Elshenawy
Hash Functions Ramki Thurimella. 2 What is a hash function? Also known as message digest or fingerprint Compression: A function that maps arbitrarily.
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 11 September 23, 2004.
Lecture 11 Overview. Digital Signature Properties CS 450/650 Lecture 11: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
COM 5336 Lecture 8 Digital Signatures
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Cryptography and Network Security Chapter 13
Fourth Edition by William Stallings Lecture slides by Lawrie Brown
Digital signatures.
Introduction to Modern Cryptography
Presentation transcript:

CNS2010handout 10 :: digital signatures1 computer and network security matt barrie

CNS2009handout 10 :: digital signatures2 signatures Used to bind an author to a document. Desirable properties of a signature: –Authentic: sufficient belief that the signer deliberately signed the document. –Unforgeable: proof that the signer and no-one else signed the document. –Non-reusable: the signature is intrinsically bound to the document and cannot be moved to another (i.e. be reused). –Unalterable: the signature cannot be altered after signing. –Non-repudiation: the signer cannot later deny that they did not sign it (most important of all). As with all things, these properties can be attacked and subverted. In designing systems involving signatures we must consider the effort of such attacks.

CNS2009handout 10 :: digital signatures3 digital signatures If m is the message to be signed and k is the secret key known only to the signer, then S = F(m, k) binds the signature S to the message m for some signature scheme F. Given (m, S) anyone can verify the signature without knowledge of the secret, k. Non-repudiation is achieved through the secrecy of k.

CNS2009handout 10 :: digital signatures4 digital signatures using public key crypto Say Alice wishes to sign a message and sent it to Bob. Generation of a Key: –Alice generates public (verifying) and private (signing) keys. –A s is kept secret and A v is published in a public directory. Signature Generation: –Alice chooses a random r є {0,1} n –Alice hashes the message d = h(m) using a collision resistant hash function (CRHF) –Alice generates S = signature(d, r, A s ) –Alice sends (m, S) to Bob. Signature Verification: –Bob obtains A v from the public directory. –Bob computes d = h(m) –Bob runs verify(d, A v, S)

CNS2009handout 10 :: digital signatures5 example of digital signatures using public key crypto Attack Models Total break –Attacker can recover A s from A v and (m, S) Selective forgery –Attacker can forge signatures for a particular message or class of message. Existential forgery –Possible only in theory (based on currently available resources)

CNS2009handout 10 :: digital signatures6 replay Why might we include random r є {0,1} n in the signature? Consider the following scenario: –Alice sends Bob a digital cheque for $100. –Bob takes the cheque to the bank. –The bank verifies the signature is valid and credits Bob’s account. What is stopping Bob from cashing the same cheque twice (i.e.. perform a replay attack)? The random value r is known as a nonce and is used to avoid replay, or in other words assure “freshness”. The bank keeps track of all nonces it has seen so far from Alice.

CNS2009handout 10 :: digital signatures7 signature based on RSA A naïve protocol based on RSA might be the following: Key Generation: –n = p. q# p, q are large primes –d. e ≡ 1 mod Φ (n) –verify key = (n, e)# public key –signature key = (n, d)# private key Signature Generation: –Assume m є Z n * –S = (m d mod n)# RSA decryption Signature Verification: –S e = m mod n# RSA encryption

CNS2009handout 10 :: digital signatures8 problems with the naïve RSA scheme Eve can trick Alice into signing any message m Based on RSA’s homomorphic property: –If s 1 = m 1 d (mod n) and s 2 = m 2 d (mod n) –then s 1 s 2 = (m 1 m 2 ) d mod n Attack on naïve RSA scheme: –Eve wants Alice to sign hidden message m –Eve picks random r є Z n * –Eve computes m’ = m.r e (mod n) –Eve asks Alice to sign m’ –Alice returns s’ = (m’) d (mod n) –Eve computes s = (s’ / r) (mod n) The pair (m, s) is a valid message signature pair! –Eve tricked Alice into signing hidden message m –Note that this trick also works with RSA decryption (Eve can get Alice to decrypt messages if Alice is not careful)

CNS2009handout 10 :: digital signatures9 PKCS#1 signature scheme Public Key Cryptography Standards #1 Note the RSA naïve signature scheme has message recovery –the verification function returns the message PKCS#1 processes a hash instead (faster) Signature Generation: –n = p. q # 1024-bit modulus –Alice calculates d = h(m) # 160-bit hash –Define EB (encryption block) = [ 00 | BT | PS | 00 | D ] The header is essentially padding (PS) EB is 864 bits bits = 1024 bits –Alice calculates S = EB d (mod n) –Alice sends (S, m)

CNS2009handout 10 :: digital signatures10 PKCS#1 signature scheme Signature Verification: –S = EB d (mod n) –Alice calculates S e mod N = EB (mod n) –Alice tests the 864 most significant bits are valid, then –Alice tests the 160 least significant bits are valid [=h(m) ]

CNS2009handout 10 :: digital signatures11 el gamal signature scheme (discrete log) Key Generation: –Alice picks 1024 bit prime and generator g є Z p * –Alice picks secret key a є Z p-1 * –Alice publishes public key y = g a mod p Signature Generation: –Alice picks random r є Z p-1 * –Alice hashes the message d = h(m) –Alice calculates k = g r (mod p)0 ≤ k ≤ p-1 –Alice calculates s = r -1(d - ak) (mod p-1) –Alice sends signature (k, s) and message m to Bob

CNS2009handout 10 :: digital signatures12 el gamal signature scheme (discrete log) Signature Verification –Bob verifies that 0 ≤ k ≤ p-1 –Bob verifies that g d = y k k s (mod p) Note: –y k k s = (g a ) k (g r ) r -1 (d - ak) = (g a ) k g (d - ak) = g d

CNS2009handout 10 :: digital signatures13 notes on the el gamal signature scheme It is unknown why this scheme is secure, but the obvious attacks don’t work. Analysis shows: –Attacker can’t recover a from the public key data since this requires computing discrete log (which we know is hard). –Picking k at random and trying to find s can’t be done since it also requires discrete log. –Picking s at random needs to solve c = a k k s (is this hard??) Recent attacks have shown that: –if weak generators are chosen, selective forgery can be done –r must be random for each signature. If r is used twice, then an adversary can retrieve the private key a.

CNS2009handout 10 :: digital signatures14 digital signature standard (DSS) NIST 1991 Hash function is SHA-1 Key Generation: –Pick prime q (160 bits) –Pick prime p (1024 bits) such that q | p - 1 –Pick g є Z p * of order q (g q ≡ 1 mod p) Pick random h є Z p * Set g = h (p-1)/q (mod p) Iterate until g ≠ 1 –Pick random a < q The public key is y = g a (mod p), p, q, and g Secret key is a

CNS2009handout 10 :: digital signatures15 digital signature standard (DSS) Signature Generation: –Pick random r є Z q * (1 < r < q) –Set k = [g r mod p] mod q –s = r -1 [h(m) + ka] mod q Signature Verification: –Obtain the public key –Test 1 ≤ k < q, 1 ≤ s < q –Set w = s -1 mod q –Test [g wh(m) y kw mod p] mod q = k –Note that g wh(m) y kw = g s -1 h(m) (g a ) ks -1 = g (h(m)r/h(m)+ka) g (akr/h(m)+ka) = g r = k (mod q) The main point is that the signature is only 320 bits.

CNS2009handout 10 :: digital signatures16 notes about DSS The security analysis of El Gamal applies to DSS as well. DSS is the standard for signatures for a number of reasons: –DSS cannot be used for encryption –Signatures are short –Patent issues DSS is based on the security of subgroups It is not known whether a sub-exponential algorithm exists in the size of the subgroup exists for discrete log. DSS signature verification can be sped up by using simultaneous exponentiation (speed up of 2).

CNS2009handout 10 :: digital signatures17 signatures based on one-way functions Lamport-Diffie Signature Let h: {0,1} n → {0,1} k be a one way hash function. Key Generation: –If the message is n bits long, we generate 2n x m bit numbers : {x 1 (0), …, x n (0) }, {x 1 (1), …, x n (1) } є {0,1} m –The public key is v i (j) = h(x i (j) ) for all i,j –The private key are all the x i (j) Signature Generation: –For message M = m 1 … m n –The signature is s = (x 1 (m1) … x n (mn) ) –i.e. we select block x 1 (0) if bit 1 of m is 0, otherwise x 1 (1) Signature Verification: –Bob tests that for all i, h(x i (mi) ) = v i (mi)

CNS2009handout 10 :: digital signatures18 signatures based on one-way functions Notes: Only the sender knows the values of the x’s that produce the signature. The main problem with this technique is that it involves a very long public key, which must be changed for every message sent. Additionally, the message itself expands by a factor of m (each bit expands to a m-bit block). Since m must be sufficiently large to obviate an attack by exhaustively testing one-way function input numbers, the message expansion is considerable.

CNS2009handout 10 :: digital signatures19 references Handbook of Applied Cryptography –§ 1, § , , 11.5 Stallings –§ 10