PKCS #1 v2.1: RSA Cryptography Standard

Slides:



Advertisements
Similar presentations
Hash Function Firewalls in Signature Schemes Burt Kaliski, RSA Laboratories IEEE P1363 Working Group Meeting June 2, 2000 (Rev. June 8, 2000)
Advertisements

Revised 08/16/1999 IEEE P1363: Standard Specifications for Public-Key Cryptography Burt Kaliski Chair, IEEE P1363 August 17, 1999.
Some New RSA Mechanisms for PKCS #11 Burt Kaliski, RSA Laboratories PKCS Workshop April 14, 2003.
Cryptography and Network Security
Digital Signatures and Hash Functions. Digital Signatures.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
CNS2010handout 10 :: digital signatures1 computer and network security matt barrie.
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
Hash functions a hash function produces a fingerprint of some file/message/data h = H(M)  condenses a variable-length message M  to a fixed-sized fingerprint.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
Chapter 5 Cryptography Protecting principals communication in systems.
Cryptography and Network Security Hash Algorithms.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
CS470, A.SelcukRSA1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
1 CIS 5371 Cryptography 9. Data Integrity Techniques.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
1 Introduction to Information Security , Spring 2015 Lecture 7: Applied cryptography: asymmetric Eran Tromer Slides credit: John Mitchell, Stanford.
CSE 597E Fall 2001 PennState University1 Digital Signature Schemes Presented By: Munaiza Matin.
1 Cryptography and Network Security (Various Hash Algorithms) Fourth Edition by William Stallings Lecture slides by Lawrie Brown (Changed by Somesh Jha)
8. Data Integrity Techniques
Lecture 8 Digital Signatures. This lecture considers techniques designed to provide the digital counterpart to a handwritten signature. A digital signature.
Bob can sign a message using a digital signature generation algorithm
1 Lect. 15 : Digital Signatures RSA, ElGamal, DSA, KCDSA, Schnorr.
Digital Signatures Slides by Kent Seamons and Tim van der Horst Last Updated: Oct 7, 2013.
The RSA Algorithm Rocky K. C. Chang, March
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
Lecture 19 Page 1 CS 111 Online Symmetric Cryptosystems C = E(K,P) P = D(K,C) E() and D() are not necessarily the same operations.
Digital Signatures: Mathematics Zdeněk Říha. Data authentication Data integrity + data origin Digital signature Asymmetric cryptography public and private.
Hash Functions A hash function H accepts a variable-length block of data M as input and produces a fixed-size hash value h = H(M) Principal object is.
1 Lect. 13 : Public Key Encryption RSA ElGamal. 2 Shamir Rivest Adleman RSA Public Key Systems  RSA is the first public key cryptosystem  Proposed in.
Message Authentication Code July Message Authentication Problem  Message Authentication is concerned with:  protecting the integrity of a message.
RSA Data Security, Inc. PKCS #1 : RSA Cryptography Standard Jessica Staddon RSA Laboratories PKCS Workshop October 7, 1998.
Chapter 21 Public-Key Cryptography and Message Authentication.
On OAEP, PSS, and S/MIME John Linn RSA Laboratories S/MIME WG, San Diego IETF, 13 December 2000.
1 Number Theory and Advanced Cryptography 5. Cryptanalysis of RSA Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
Cryptography and Network Security Chapter 13 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Signcryption Parshuram Budhathoki Department of Mathematical Sciences Florida Atlantic University April 18, 2013
Hash and MAC Functions CS427 – Computer Security
Some Perspectives on Smart Card Cryptography
Lecture 8 Overview. Secure Hash Algorithm (SHA) SHA SHA SHA – SHA-224, SHA-256, SHA-384, SHA-512 SHA-1 A message composed of b bits.
Cryptographic Hash Functions and Protocol Analysis
PKCS #1 v2.1: RSA Cryptography Standard Burt Kaliski, RSA Laboratories PKCS Workshop, 5 October 2000.
Public Key Algorithms Lesson Introduction ●Modular arithmetic ●RSA ●Diffie-Hellman.
PKCS #5: Password-Based Cryptography Standard
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 11 September 23, 2004.
ANSI X9.44 and IETF TLS Russ Housley and Burt Kaliski RSA Laboratories November 2002.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
COM 5336 Lecture 8 Digital Signatures
RSA Data Security, Inc. PKCS #13: Elliptic Curve Cryptography Standard Burt Kaliski RSA Laboratories PKCS Workshop October 7, 1998.
PKCS #5 v2.0: Password-Based Cryptography Standard
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
1 Introduction to Information Security , Spring 2016 Lecture 4: Applied cryptography: asymmetric Zvi Ostfeld Slides credit: Eran Tromer.
1 The RSA Algorithm Rocky K. C. Chang February 23, 2007.
Data Integrity / Data Authentication. Definition Authentication (Signature) algorithm - A Verification algorithm - V Authentication key – k Verification.
RSA Data Security, Inc. Emerging Standards for Public-Key Cryptography Burt Kaliski Chief Scientist, RSA Laboratories BRICS Summer School in Cryptology.
RSA Laboratories’ PKCS Series - a Tutorial
Dan Brown, Certicom Research November 10, 2004
RSA Digital Signature Standards
Digital Signature Schemes and the Random Oracle Model
ICS 454 Principles of Cryptography
Introduction to Symmetric-key and Public-key Cryptography
ICS 454 Principles of Cryptography
Introduction to Cryptography
Diffie-Hellman Key Exchange
Presentation transcript:

PKCS #1 v2.1: RSA Cryptography Standard Burt Kaliski, RSA Laboratories PKCS Workshop, 30 September 1999

Summary PKCS #1 v1.5 published in November 1993 Wide deployment, in parallel with increased understanding of security of RSA-based techniques PKCS #1 v2.0 released in July 1998 with OAEP (Optimal Asymmetric Encryption Padding) for enhanced security of encryption schemes OAEP developed by M. Bellare and P. Rogaway, 1994 PKCS #1 v2.1 draft incorporates the companion technique for digital signatures, PSS (Probabilistic Signature Scheme) PSS developed by same authors, 1996

Goals of Presentation Part I: Review the current draft Part II: Propose a strategy for RSA signature standards Part III: Discuss several other topics related to the draft

Part I: The Current Draft

Status PKCS #1 v2.1 adds PSS signature scheme, includes some editorial improvements Draft 1 released 21 September for 30-day review

Outline What is PSS? General Model for Signature Schemes Draft Specification of PSS ASN.1 Syntax Example Applications PSS Advantages and Alternatives Patent Issues Recommended Deployment A Brief Security Update

What is PSS? PSS stands for Probabilistic Signature Scheme Published in 1996 by M. Bellare and P. Rogaway “Encoding method” for signatures with appendix in the integer factorization (IF) family, including RSA signatures Provable security in the random oracle model PSS-R variant provides message recovery

General Model for Signature Schemes Following IEEE P1363 classification Primitives are mathematical operations on integers, field elements Schemes are sets of operations on messages Schemes are built up from primitives, “encoding methods” mapping between messages, integers Note: in PKCS #1 v2.1 encoding methods map to strings, which are then converted to integers; this detail omitted here for simplicity

IF Family Cryptography based on the difficulty of the integer factorization (IF) problem Modulus n = pq Public exponent e, private exponent d RSA: e odd Rabin-Williams: e even; conditions on p, q

Notation M message (string) m message representative (integer) s signature (integer) SP Signature Primitive (m  s) VP Verification Primitive (s  m)

Encoding Methods Mappings between message M, integer message representative m Encode: M  m Check: M, m consistent? Decode: m  M Security goals: one-way, collision-resistant, no mathematical structure

IF Signature and Verification Primitives RSA case: SP: s = md mod n VP: m = se mod n Rabin-Williams case: SP: s = |td mod n| where t = m or m/2 such that (t/n) = +1 VP: m = t, 2t, n-t or 2(n-t) where t = se mod n, m has redundancy

IF Signature Scheme with Appendix Signature operation: m = Encode(M) s = SP(m) Verification operation: m = VP(s) Check(M, m)

IF Signature Scheme with Message Recovery Signature operation: m = Encode(M) s = SP(m) Recovery operation: m = VP(s) M = Decode(m) (Size of M is limited)

Draft Specification of PSS RSASSA-PSS in PKCS #1 v2.1 d1 “RSA signature scheme with appendix based on PSS” Following general model, with salt value input to encoding operation optional output from signature operation and input to verification operation for “single-pass processing” two cases for verification operation, with and without salt value Based on RSA primitives, also supports RW as noted in Bellare-Rogaway submission to IEEE P1363a

PSS Signature Operation Input: message M Output: signature s, salt (opt.) 1. Generate salt 2. Apply encoding operation to message, salt to produce message representative: m = Encode(M, salt) 3. Apply signature primitive to produce signature: s = SP(m)

PSS Verification Operation w/Salt Input: message M, signature s, salt Output: “valid” / “invalid” 1. Apply encoding operation to produce message representative: m = Encode(M, salt) 2. Apply verification primitive to recover original message representative: m’ = VP(s) 3. Compare: m =? m’

PSS Verification Operation w/o Salt Input: message M, signature s Output: “valid” / “invalid” 1. Apply verification primitive to recover original message representative: m = VP(s) 2. Apply checking operation to determine whether message representative is valid: Check(M, m)

PSS Encoding Method Following general model, with encoding and checking operations Salt is additional input to encoding operation same length as hash function output Message representative is one byte shorter than modulus Based on underlying hash function, mask generation function

PSS Encoding Operation Input: message M, salt Output: message representative m 1. Hash message and salt: H = Hash (salt || M) 2. Add padding to salt to form data block: DB = salt || 00 … 00 3. Expand hash and mask data block: maskedDB = DB xor MGF(H) 4. Format message representative: m = H || maskedDB

Block Diagram of PSS Encoding Operation

Observations Message is hashed with random salt improves security proof reduces reliance on hash function security Hash value is expanded to full length randomizes input to primitive removes multiplicative structure enables proof Salt value is xored into expanded hash shortens signature overhead part of message may also be xored

PSS Checking Operation Input: message M, message representative m Output: “consistent” / “inconsistent” 1. Parse message representative: H || maskedDB = m 2. Expand hash value and unmask data block: DB = maskedDB xor MGF(H) 3. Check and remove padding to recover salt: salt || 00 … 00 =? DB 4. Rehash message and salt and compare: H =? Hash (salt || M)

PSS Advantages Provable security under random oracle model other methods have “ad hoc” security, not a proof Reduced reliance on hash function security “birthday attack” collisions not useful due to random salt Natural extension to message recovery

What’s Provable? Suppose an algorithm A can forge PSS signatures without access to the details of Hash, MGF Hash, MGF are effectively “random oracles” that can only be queried Then an algorithm B can invert RSA in about the same time using algorithm A as a subroutine  If RSA is hard to invert, then PSS is secure

Proof Method Inverting algorithm B “builds” Hash, MGF that appear random to forgery algorithm A, but embed an instance to be inverted When A succeeds at forgery, B succeeds at inverting RSA Random salt is key to “tight” proof, but even if not random, proof still holds

What about the Random Oracle Model? Some concerns have been raised about the relevance of proofs in the random oracle model: some on theoretical grounds others on practicality of “instantiating” a random oracle with a real hash or mask generation function But although the proof may “overestimate” the properties of Hash and MGF, it underestimates properties of RSA e.g., bit security properties are not considered Thus, in practice, PSS may well provide high security even without the random oracle model

Alternatives to PSS Current methods but not provably secure (“what if?”) Full Domain Hashing (Bellare-Rogaway 1993) but security proof not as tight not as flexible Future research

ASN.1 Syntax for RSASSA-PSS Generic OID: id-RSASSA-PSS ::= pkcs-1.10 Parameters: RSASSA-PSS-params ::= SEQUENCE { hashFunc [0] AlgorithmIdentifier {{oaepDigestAlgorithms}} DEFAULT sha1Identifier, maskGenFunc [1] AlgorithmIdentifier {{pkcs1MGFAlgorithms}} DEFAULT mgf1SHA1Identifier, salt OCTET STRING OPTIONAL } Note: syntax needs some updating

Some Special Syntax In some applications, e.g., PKCS #7 and S/MIME CMS, the hash function underlying a signature scheme is identified separately Generic OID for use in combination with PSS: id-salted-hash ::= pkcs-1.11 Parameters: Salted-Hash-Params ::= SEQUENCE { hashFunc [0] AlgorithmIdentifier, salt OCTET STRING OPTIONAL }

Example Application: X.509 Certificates Signature algorithm identified in two places: body of certificate adjacent to signature To save space, both identifiers should specify id-RSASSA-PSS without salt Salt can be recovered from signature during verification

Example Application: S/MIME Signed Messages Relevant algorithms are identified in three places: underlying hash function before message and in SignerInfo after message signature algorithm in SignerInfo To facilitate single-pass processing, identifier before message should specify id-salted-hash with underlying hash function, salt Hash function identifier in SignerInfo should specify id-salted-hash without salt Signature algorithm identifier should specify id-RSASSA-PSS without salt

Patent Issues University of California has applied for a patent (U.S. only) on PSS and PSS-R In a letter to IEEE P1363, UC has offered to waive licensing on PSS for signatures with appendix if adopted as an IEEE standard Reasonable and non-discriminatory licensing for signatures with message recovery

Recommended Deployment A gradual transition to PSS is recommended in the interest of prudent security rollover, along with AES, new hash functions, … PKCS #1 v1.5 signature scheme is still appropriate for new applications Different than situation with PKCS #1 v1.5 encryption scheme, where only OAEP is recommended for new applications

A Brief Security Update At Crypto ’99, J.-S. Coron, D. Naccache and J. Stern give a thorough analysis of security of RSA-based signature schemes against attacks based on factoring message representatives stronger versions of Desmedt-Odylzko attack (1985) PKCS #1 v1.5 fared very well attacks are impractical, more expensive than finding hash function collisions (280 operations) design considerations by R. Rivest (1991) provide resistance D. Coppersmith, S. Halevi and C. Jutla extended the attack to break ISO/IEC 9796-1 (Crypto ’99 rump session)

Part II: RSA Standards Strategy

Introduction Various methods today for digital signatures in the integer factorization / RSA family Standards, practice, theory differ How to harmonize?

Major Signature Schemes in the IF Family Signature schemes with appendix: ANSI X9.31 PKCS #1 v1.5 (also in v2.0, v2.1 draft) Bellare-Rogaway FDH and PSS Signature schemes with message recovery: ISO/IEC 9796-1 Bellare-Rogaway PSS-R This discussion focuses on the first set

6b bb … bb ba || Hash(M) || 3x cc ANSI X9.31 Encode(M) = 6b bb … bb ba || Hash(M) || 3x cc where x = 3 for SHA-1, 1 for RIPEMD-160 Ad hoc design Widely standardized IEEE P1363, ISO/IEC 14888-3 US NIST FIPS 186-1 ANSI X9.31 requires “strong primes”

00 01 ff … ff || HashAlgID || Hash(M) PKCS #1 v1.5 Encode(M) = 00 01 ff … ff || HashAlgID || Hash(M) Ad hoc design Widely deployed SSL certificates S/MIME To be included in IEEE P1363a

Bellare-Rogaway FDH (Full Domain Hashing, ACM CCCS ’93) Encode(M) = 00 || Full-Length-Hash(m) Provably secure design To be included in IEEE P1363a

PSS vs. FDH: Technical Comparison PSS is probabilistic, FDH is deterministic Both provably secure same paradigm as Optimal Asymmetric Encryption Padding (OAEP) PSS has tighter security proof, is less dependent on security of hash function PSS-R variant supports message recovery, partial message recovery PSS is patent pending (but generously licensed)

ANSI X9.31 vs. PKCS #1 v1.5: Technical Comparison Both are deterministic Both include a hash function identifier Both are ad hoc designs both resist Coron-Naccache-Stern / Coppersmith-Halevi-Jutla attacks on ISO/IEC 9796-1,-2 Both support RSA and RW primitives see IEEE P1363a contribution on PKCS #1 signatures for discussion No patents have been reported to IEEE P1363 or ANSI X9.31 for these encoding methods

Standards vs. Theory vs. Practice ANSI X9.31 is widely standardized PSS is widely considered secure PKCS #1 v1.5 is widely deployed How to harmonize?

Challenges Infrastructure changes take time particularly on the user side ANSI X9.31 is more than just another encoding method, also specifies “strong primes” a controversial topic Many communities involved formal standards bodies, IETF, browser vendors, certificate authorities

Prudent Security What if a weakness were found in ANSI X9.31 or PKCS #1 v1.5 signatures? no proof of security, though designs are well motivated, supported by analysis would be surprising — but so were vulnerabilities in ISO/IEC 9796-1,-2 PSS embodies “best practices,” prudent to improve over time

Proposed Strategy Short term (1-2 years): Support both PKCS #1 v1.5 and ANSI X9.31 signatures for interoperability e.g., in IETF profiles, FIPS validation NIST is in the process of adding PKCS #1 v1.5 to FIPS 186-2 for an 18-month transition period Long term (2-5 years): Move toward PSS signatures not necessarily, but perhaps optionally with “strong primes” upgrade in due course — e.g., with AES algorithm, new hash functions

Standards Work IEEE P1363a will include PSS also FDH, PKCS #1 v1.5 signatures PKCS #1 v2.1 d1 includes it To be proposed to ANSI X9F1 Other relevant standards bodies include ISO/IEC, US NIST, IETF

Part III: Some Discussion Topics

Outline PSS-R ANSI X9.31 encoding method Composite hash functions New mask generation functions Rabin-Williams support

PSS-R Should PKCS #1 v2.1 include the PSS-R encoding method? ISO/IEC 9796-1, -2 may be updated with new and potentially different signature scheme with message recovery PSS-R to be included in IEEE P1363a

ANSI X9.31 Encoding Method Should PKCS #1 v2.1 include the ANSI X9.31 encoding method? ANSI X9.31 is a banking standard FIPS 186-1 includes it

Composite Hash Functions Should PKCS #1 v2.1 specify “composite” hash functions? raised by Tom Gindin, IBM Example: SHA-1-MD5(M) = SHA-1(M) || MD5(M) A simple method to increase security in a modular fashion Could be combined with PKCS #1 v1.5 encoding method, or PSS

New Mask Generation Functions Should PKCS #1 v2.1 define new mask generation functions? Example: MGF2(Z) = HMAC(Z,0) || HMAC(Z,1) || … Current method lacks HMAC’s security proof: MGF1(Z) = Hash(0 || Z) || Hash(1 || Z) || …

Rabin-Williams Support Should PKCS #1 v2.1 include the RW primitives for even exponents? Would be consistent with ANSI X9.31, X9.44 draft, IEEE P1363 PKCS #1 v1.5, PSS versions require slightly different primitives than currently specified cf. relevant submissions to IEEE P1363a

Conclusions A new draft of PKCS #1 nearing completion Standards strategy for RSA signatures emerging PSS a prudent choice for long-term security, harmonization of standards For future work? PKCS #1 usage guidelines key generation and validation specifications