CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.

Slides:



Advertisements
Similar presentations
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Advertisements

Cryptography and Network Security
Digital Signatures and Hash Functions. Digital Signatures.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Authentication and Digital Signatures CSCI 5857: Encoding and Encryption.
1 Digital Signatures & Authentication Protocols. 2 Digital Signatures have looked at message authentication –but does not address issues of lack of trust.
CMSC 414 Computer and Network Security Lecture 10 Jonathan Katz.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 6 Wenbing Zhao Department of Electrical and Computer Engineering.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer (and Network) Security Lecture 9 Jonathan Katz.
CNS2010handout 10 :: digital signatures1 computer and network security matt barrie.
CMSC 414 Computer (and Network) Security Lecture 2 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 21 Jonathan Katz.
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.
CMSC 414 Computer and Network Security Lecture 16 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 8 Jonathan Katz.
1 CPSC156: The Internet Co-Evolution of Technology and Society Lectures 19,20, and 21: April 5, 10, and 12, 2007 Cryptographic Primitives.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
1 CIS 5371 Cryptography 9. Data Integrity Techniques.
1 Introduction to Information Security , Spring 2015 Lecture 7: Applied cryptography: asymmetric Eran Tromer Slides credit: John Mitchell, Stanford.
Foundations of Cryptography Lecture 8 Lecturer: Moni Naor.
CSE 597E Fall 2001 PennState University1 Digital Signature Schemes Presented By: Munaiza Matin.
Cryptography and Network Security Chapter 13
Introduction to Public Key Cryptography
13.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 13 Digital Signature.
8. Data Integrity Techniques
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.
Bob can sign a message using a digital signature generation algorithm
The RSA Algorithm Rocky K. C. Chang, March
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.
Cryptography Lecture 8 Stefan Dziembowski
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
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.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Lecture 3.4: Public Key Cryptography IV CS 436/636/736 Spring 2013 Nitesh Saxena.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Cryptography Lecture 9 Stefan Dziembowski
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Chapter 21 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security Chapter 13 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
1 Number Theory and Advanced Cryptography 6. Digital Signature Chih-Hung Wang Sept Part I: Introduction to Number Theory Part II: Advanced Cryptography.
A Quick Tour of Cryptographic Primitives Anupam Datta CMU Fall A: Foundations of Security and Privacy.
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
Lecture 2: Introduction to Cryptography
Prepared by Dr. Lamiaa Elshenawy
Computer Science and Engineering Computer System Security CSE 5339/7339 Lecture 11 September 23, 2004.
Digital Signature Standard (DSS) US Govt approved signature scheme designed by NIST & NSA in early 90's published as FIPS-186 in 1991 revised in 1993,
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 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.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
Digital Signature Schemes and the Random Oracle Model
Cryptography Lecture 26.
Cryptography Lecture 22.
Cryptography Lecture 25.
Cryptography Lecture 26.
Presentation transcript:

CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz

Malleability/chosen-ciphertext security  All the public-key encryption schemes we have seen so far are malleable –Given a ciphertext c that encrypts an (unknown) message m, it is possible to generate a ciphertext c’ that encrypts a related message m’  In many scenarios, this is problematic –E.g., auction example; password example  Note: the problem is not integrity (there is no integrity in public-key encryption, anyway), but malleability

Malleability/chosen-ciphertext security  In the public-key setting, security against chosen- ciphertext attacks is equivalent to non-malleability  In general, always use a public-key encryption scheme secure against chosen-ciphertext attacks! –E.g., RSA PKCS #1 v2.1  When using hybrid encryption, if both components are secure against chosen-ciphertext attacks then the combination it also secure against chosen-ciphertext attacks

Signature schemes

Basic idea  A signer publishes a public key pk –As usual (for now), we assume everyone has a correct copy of pk  To sign a message m, the signer uses its private key to generate a signature   Anyone can verify that  is a valid signature on m with respect to the signer’s public key pk –Since only the signer knows the corresponding private key, we take this to mean the signer has “certified” m  Security (informally): no one should be able to generate a valid signature other than the legitimate signer

Prototypical application  Software company wants to periodically release patches of its software –Doesn’t want a malicious adversary to be able to change even a single bit of the legitimate path  Solution: –Bundle a copy of the company’s public key along with initial copy of the software –Software patches signed (perhaps with a version number) –Do not accept patch unless it comes with a valid signature (and increasing version number)

Signatures vs. MACs  Could MACs work in the previous example? –Computing one signature vs. multiple MACs –Public verifiability –Transferability –Non-repudiation Not obtained by MACs!

Functional definition  Key generation algorithm: randomized algorithm that outputs (pk, sk)  Signing algorithm: –Takes a private key and a message, and outputs a signature;   Sign sk (m)  Verification algorithm: –Takes a public key, a message, and a signature and outputs a decision bit; b = Vrfy pk (m,  )  Correctness: for all (pk, sk), Vrfy pk (m, Sign sk (m)) = 1

Security?  Analogous to MACs –Except that adversary is given the signer’s public key  (pk, sk) generated at random; adversary given pk  Adversary given  1 = Sign sk (m 1 ), …,  n = Sign sk (m n ) for m 1, …, m n of its choice  Attacker “breaks” the scheme if it outputs a forgery; i.e., (m,  ) with: m ≠ m i for all i Vrfy pk (m,  ) = 1

“Textbook RSA” signatures  Public key (N, e); private key (N, d)  To sign message m  Z N *, compute  = m d mod N  To verify signature  on message m, check whether  e = m mod N  Correctness holds…  …what about security?

Security of textbook RSA sigs?  Textbook RSA signatures are not secure –Easy to forge a signature on a random message –Easy to forge a signature on a chosen message, given two signatures of the adversary’s choice

Hashed RSA  Public key (N, e); private key (N, d)  To sign message m, compute  = H(m) d mod N  To verify signature  on a message m, check whether  e = H(m) mod N  Why does this prevent previous attacks?

Security of hashed RSA  Can we prove that hashed RSA is secure? –Take CMSC456!  Hashed RSA signatures can be proven secure based on the hardness of the RSA problem, if the hash is modeled as a random function  Variants of hashed RSA are used in practice

DSA/DSS signatures  Another popular signature scheme, based on the hardness of the discrete logarithm problem –Introduced by NIST in 1992 –US government standard  I will not cover the details, but you need to know that it exists

Hash-and-sign  Say we have a secure signature scheme for “short” messages (e.g., hashed RSA, DSS, …) –How to extend it for longer messages?  Hash and sign –Hash message to short “digest”; sign the digest  Used extensively in practice HSign M H(M) sk 

Crypto pitfalls

Cryptography is not a “magic bullet”  Crypto can be difficult to get right –Must be implemented correctly –Need expertise; “a little knowledge can be a dangerous thing…” –Must be integrated from the beginning –Use only standardized algorithms and protocols –No security through obscurity!

Cryptography is not a “magic bullet”  Crypto alone cannot solve all security problems –Key management; social engineering; insider attacks –Develop (appropriate) threat/trust models –Need to analyze weak links in the chain… –Adversary may not be able to eavesdrop, but can it: Access your hard drive? See CRT emissions? Go through your trash? –“Side channel attacks” on cryptosystems

Cryptography is not a “magic bullet”  Human factors –Crypto needs to be easy to use both for end-users and administrators –Important to educate users about appropriate security practices  Need for review, detection, and recovery  Security as a process, not a product

Random number generation  Do not use “standard” RNGs; use cryptographic RNGs instead  E.g., srand/rand in C: –srand(seed) sets state=seed (|state| = 32 bits) –rand(): state = f(state), where f is some linear function return state  Generating a 128-bit key using 4 calls to rand() results in a key with only 32 bits of entropy!

More on random number generation  Netscape v1.1: –rv = SHA1(pid, ppid, time) –return rv  Problem: the input to SHA1 has low entropy