Crittografia e sicurezza delle reti. Digital signatures- DSA



Similar documents
Digital Signatures. Murat Kantarcioglu. Based on Prof. Li s Slides. Digital Signatures: The Problem

Introduction to Cryptography CS 355

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures

Digital Signature. Raj Jain. Washington University in St. Louis

Digital signatures. Informal properties

Signature Schemes. CSG 252 Fall Riccardo Pucella

Digital Signatures. (Note that authentication of sender is also achieved by MACs.) Scan your handwritten signature and append it to the document?

Digital Signatures. Prof. Zeph Grunschlag

Computer Security: Principles and Practice

Computer Science A Cryptography and Data Security. Claude Crépeau

Authentication requirement Authentication function MAC Hash function Security of

Overview of Public-Key Cryptography

Digital Signatures. What are Signature Schemes?

Cryptosystems. Bob wants to send a message M to Alice. Symmetric ciphers: Bob and Alice both share a secret key, K.

CSCE 465 Computer & Network Security

Communications security

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Final Exam. IT 4823 Information Security Administration. Rescheduling Final Exams. Kerberos. Idea. Ticket

Cryptography and Network Security Digital Signature

DIGITAL SIGNATURES 1/1

Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs

Network Security. Gaurav Naik Gus Anderson. College of Engineering. Drexel University, Philadelphia, PA. Drexel University. College of Engineering

2. Cryptography 2.4 Digital Signatures

Introduction to Computer Security

1 Digital Signatures. 1.1 The RSA Function: The eth Power Map on Z n. Crypto: Primitives and Protocols Lecture 6.

Digital Signatures. Meka N.L.Sneha. Indiana State University. October 2015

Cryptography Lecture 8. Digital signatures, hash functions

Public Key (asymmetric) Cryptography

Practice Questions. CS161 Computer Security, Fall 2008

1 Signatures vs. MACs

CIS 6930 Emerging Topics in Network Security. Topic 2. Network Security Primitives

Network Security. Abusayeed Saifullah. CS 5600 Computer Networks. These slides are adapted from Kurose and Ross 8-1

Principles of Public Key Cryptography. Applications of Public Key Cryptography. Security in Public Key Algorithms

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Capture Resilient ElGamal Signature Protocols

Cryptography and Network Security

Public Key Cryptography of Digital Signatures

Evaluation of Digital Signature Process

Digital Signature CHAPTER 13. Review Questions. (Solution to Odd-Numbered Problems)

Introduction. Digital Signature

Public Key Cryptography. c Eli Biham - March 30, Public Key Cryptography

CS549: Cryptography and Network Security

Lecture 6 - Cryptography

CS 393 Network Security. Nasir Memon Polytechnic University Module 11 Secure

Implementation of Elliptic Curve Digital Signature Algorithm

SECURITY IN NETWORKS

Part VII. Digital signatures

CIS 5371 Cryptography. 8. Encryption --

The application of prime numbers to RSA encryption

Cryptographic Hash Functions Message Authentication Digital Signatures

Forward Secrecy: How to Secure SSL from Attacks by Government Agencies

One-Way Encryption and Message Authentication

Paillier Threshold Encryption Toolbox

Message authentication and. digital signatures

Digital signatures are one of the most important inventions/applications of modern cryptography.

Software Implementation of Gong-Harn Public-key Cryptosystem and Analysis

MTAT Cryptology II. Digital Signatures. Sven Laur University of Tartu

RSA Attacks. By Abdulaziz Alrasheed and Fatima

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

How encryption works to provide confidentiality. How hashing works to provide integrity. How digital signatures work to provide authenticity and

Randomized Hashing for Digital Signatures

Chapter 6 Electronic Mail Security

Improved Online/Offline Signature Schemes

Public Key Cryptography Overview

Cryptographic Algorithms and Key Size Issues. Çetin Kaya Koç Oregon State University, Professor

Authentication Protocols Using Hoover-Kausik s Software Token *

An Approach to Shorten Digital Signature Length

A New Generic Digital Signature Algorithm

Hash Functions. Integrity checks

Textbook: Introduction to Cryptography 2nd ed. By J.A. Buchmann Chap 12 Digital Signatures

CS 758: Cryptography / Network Security

Implementation and Comparison of Various Digital Signature Algorithms. -Nazia Sarang Boise State University

Transitions: Recommendation for Transitioning the Use of Cryptographic Algorithms and Key Lengths

EXAM questions for the course TTM Information Security May Part 1

Network Security. Chapter 2 Basics 2.2 Public Key Cryptography. Public Key Cryptography. Public Key Cryptography

Cryptography and Network Security Chapter 10

An Introduction to Cryptography as Applied to the Smart Grid

8th ACM Conference on Computer and Communications Security November 2001 Philadelphia - Pennsylvania - USA

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

A novel deniable authentication protocol using generalized ElGamal signature scheme

CRYPTOGRAPHY IN NETWORK SECURITY

Network Security (2) CPSC 441 Department of Computer Science University of Calgary

PGP - Pretty Good Privacy

Lecture 9: Application of Cryptography

Efficient construction of vote-tags to allow open objection to the tally in electronic elections

Public Key Cryptography. Performance Comparison and Benchmarking

Improvement of digital signature with message recovery using self-certified public keys and its variants

CS 348: Computer Networks. - Security; 30 th - 31 st Oct Instructor: Sridhar Iyer IIT Bombay

Table of Contents. Bibliografische Informationen digitalisiert durch

Using etoken for SSL Web Authentication. SSL V3.0 Overview

NEW DIGITAL SIGNATURE PROTOCOL BASED ON ELLIPTIC CURVES

Message Authentication Codes. Lecture Outline

1 Domain Extension for MACs

A Factoring and Discrete Logarithm based Cryptosystem

VoteID 2011 Internet Voting System with Cast as Intended Verification

Fast Batch Verification for Modular Exponentiation and Digital Signatures

Overview of CSS SSL. SSL Cryptography Overview CHAPTER

Lecture 15 - Digital Signatures

Cryptography: Authentication, Blind Signatures, and Digital Cash

Transcription:

Crittografia e sicurezza delle reti Digital signatures- DSA

Signatures vs. MACs Suppose parties A and B share the secret key K. Then M, MAC K (M) convinces A that indeed M originated with B. But in case of dispute A cannot convince a judge that M, MAC K (M) was sent by B, since A could generate it herself.

Problems with Pure DH Paradigm Easy to forge signatures of random messages even without holding D A : Bob picks R arbitrarily, computes S=E A (R). Then the pair (S,R) is a valid signature of Alice on the message S. Therefore the scheme is subject to existential forgery. So what?

Problems with Pure DH Paradigm Consider specifically RSA. Being multiplicative, we have (products mod N) D A (M 1 M 2 ) = D A (M 1 ) D A (M 2 ). If M 2 = I OWE BOB $20 and M 1 = 100 then under certain encoding of letters we could get M 1 M 2 = I OWE BOB $2000

Standard Solution: Hash First Let E A be Alice s public encryption key, and let D A be Alice s private decryption key. To sign the message M, Alice first computes the strings y=h(m) and z=d A (y). Sends M,z to Bob. To verify this is indeed Alice s signature, Bob computes the string y=e A (z) and checks y=h(m). The function H should be collision resistent, so that cannot find another M with H(M)=H(M ).

General Structure: Signature Schemes Generation of private and public keys (randomized). Signing (either deterministic or randomized) Verification (accept/reject) - usually deterministic.

Schemes Used in Practice RSA El-Gamal Signature Scheme (85) The DSS (digital signature standard, adopted by NIST in 94 is based on a modification of El-Gamal signature.

RSA Signature: code hash of message using private key Only the person who knows the secret key can sign Everybody can verify the signature using he public key Instead of RSA we can use any Public Key cryptographic protocol

RSA: Public-Key Crypto. Standard (PKCS) Signature: code hash of message using private key PKCS-1: standard encrypt using secret key 0 1 at least 8 byte FF base 16 0 specification of used hash function hash(m) (M message to be signed) first byte 0 implies encoded message is less than n second byte (=1) denotes signature (=2 encoding) bytes 11111111 impliy encoded message is large; Specification of used hash function increases security

El-Gamal Signature Scheme Generation Pick a prime p of length 1024 bits such that DL in Z p * is hard. Let g be a generator of Z p *. Pick x in [2,p-2] at random. Compute y=g x mod p. Public key: p,g,y. Private key: x.

El-Gamal Signature Scheme Signing M Hash: Let m=h(m). Pick k in [1,p-2] relatively prime to p-1 at random. Compute r=g k mod p. Compute s=(m-rx)k -1 mod (p-1) (***) Output r and s.

El-Gamal Signature Scheme Verify M,r,s,PK Compute m=h(m). Accept if 0<r<p and y r r s =g m mod p. else reject. What s going on? By (***) s=(m-rx)k -1 mod p-1, so sk+rx=m. Now r=g k so r s =g ks, and y=g x so y r =g rx, implying y r r s =g m.

Digital Signature Standard (DSS) NIST, FIPS PUB 186 DSS uses SHA as hash function and DSA as signature DSA inspired by El Gamal

The Digital Signature Algorithm (DSA) Let p be an L bit prime such that the discrete log problem mod p is intractable Let q be a 160 bit prime that divides p-1 Let α be a q th root of 1 modulo p (α = 1 (1/q) mod p) Note: computation of α can be done by choosing h, computing α =h (p-1/q) mod p if we obtain a number 1 ok otherwise try another h

The Digital Signature Algorithm (DSA) p prime, q prime, p-1 = 0 mod q, α = 1 (1/q) mod p Private key: secret s, random 1 s q-1. Public key: (p, q, α, y = α s mod p) Signature on message M: Choose a random 1 k p-1, secret!! Part II: (SHA (M) + s (PART I)) / k mod q Part I: ((α k mod p) mod q Signature <Part I, Part II> Note that Part I Does not depend on M (preprocessing) Part II is fastto compute

The Digital Signature Algorithm (DSA) p prime, q prime, p-1 = 0 mod q, α = 1 (1/q) mod p, Private key: random 1 s q-1. Public key: (p, q, α, y = α s mod p). Signature on message M: Verification: Choose a random 1 k p-1, secret!! Part I: ((α k mod p) mod q Part II: (SHA (M) + s (PART I)) /k mod q e 1 = SHA (M) / (PART II) mod q e 2 = (PART I) / (PART II) mod q ACCEPT Signature if (mod) ee pq =!" mod (PART I) (α e1 12 y e2 mod p) mod q = PART I

Digital Signature-correcteness Accept if (α e1 y e2 mod p) mod q = PART I e1 = SHA (M) / (PART II) mod q e2 = (PART I) / (PART II) mod q Proof : 1. definition of PART I and PART II implies SHA(M)= (- s (PART I) + k(part II)) mod q hence SHA(M)/(PART II)+ s (PART I)/(PART II)=k mod q 2. Definit. of y = α s mod p implies α e1 y e2 mod p = α e1 α (s e2) mod p =α SHA(M)/ (PART II) + s (PART I) /(PART II) mod p =α (k+ cq) mod p =α k mod p ( since α q = 1). 3. Execution of mod q implies (α e1 y e2 mod p) mod q = (α k mod p ) mod q = PART I

DSA: security Secret key is not revealed and it cannot be forged without knowing it Use of a random number for signing- not revealed (k)! There are no duplicates of the same signature (even of same messages) If k is known than you can compute a Two messages signed with same k can reveal the value k,and therefore secret s There exists other sophisticated attacks depending on implementation

DSA: efficiency Finding two primes p and q such that p-1 = 0 mod q is not easy and takes time p e q are public: they can be used by many persons DSA slower than RSA in signature verification DSA and RSA same speed for signing (DSS faster if you use preprocessing) DSA requires random numbers - not always easy to generate

DSA versus RSA DSA: (+) faster than RSA for signing (preprocessing- suitable for smart card) (+?) uses random numbers to sign (+) Implementation problems: To generate random numbers you need special hardware (no smartcard); pseudo rando generator requires memory (no smart card) Random number depending by messages deos not allow preprocessing and slow the process (+) standard RSA: (+) known since many years and studied - no attacks (+) faster in signature verification

Timestamping a document TimeStamping Authority (TSA): guarantees timestamp of a document Alice wants t timestamp a document 1. A compute hash of document and sends to TSA 2. TSA adds timestamp, computes new hash (of timestamp and received hash) and SIGNS the obtained hash; sends back to A 3. A keeps TSA s signature as a proof Everybody can check the signature TSA doesnot know Alice s document

More problems How to be sure you receive a document? (registered mail or registered mail with receipt) Contract signature: signature should be done at the vaery same time by both partners

DSA Exercises 1. If you solve the discrete log problem then you break DSA If you solve discrete log then you can compute k knowing PartI Then the definition of PartII gives PartII = (SHA (M) + s (PART I)) /k mod q an equation with 1 unknown (s) that can be easily solved 2. Show that if the same k is used twice then you can falsify signatures (even without solving the discrete log problem) Let Ma and Mb the two messages and <PartI-a, PartII-a> <PartI-b,PartII-b> be the two signatures If the same k is used then both signatures have the same PartI Hence PartII-a= (SHA (Ma) + s (PART I-a)) /k mod q PartII-b= (SHA (Mb) + s (PART I-a)) /k mod q Note that Ma and Mb are known; therefore we have a system with two equations and two unknowns (k and s)