CMSC 414 Computer and Network Security Lecture 6 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

Digital Signatures and Hash Functions. Digital Signatures.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
CMSC 414 Computer (and Network) Security Lecture 5 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
CNS2010handout 10 :: digital signatures1 computer and network security matt barrie.
CMSC 456 Introduction to Cryptography
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
Mar 5, 2002Mårten Trolin1 Previous lecture More on hash functions Digital signatures Message Authentication Codes Padding.
Introduction to Modern Cryptography Lecture 5 Number Theory: 1. Quadratic residues. 2. The discrete log problem. Intro to Public Key Cryptography Diffie.
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
Secure Hashing and DSS Sultan Almuhammadi ICS 454 Principles of Cryptography.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
Cryptography1 CPSC 3730 Cryptography Chapter 11, 12 Message Authentication and Hash Functions.
1 Message Authentication and Hash Functions Authentication Requirements Authentication Functions Message Authentication Codes Hash Functions Security of.
1 CIS 5371 Cryptography 8. Asymmetric encryption-.
Cryptography and Network Security Chapter 11 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
MAC and HASH Functions Unit 5. AUTHENTICATION REQUIREMENTS In the context of communications across a network, the following attacks can be identified:
Lecture 15 Lecture’s outline Public algorithms (usually) that are each other’s inverse.
Lecture slides prepared for “Computer Security: Principles and Practice”, 2/e, by William Stallings and Lawrie Brown, Chapter 21 “Public-Key Cryptography.
Digital Signatures Good properties of hand-written signatures: 1. Signature is authentic. 2. Signature is unforgeable. 3. Signature is not reusable (it.
Message Authentication  message authentication is concerned with: protecting the integrity of a message protecting the integrity of a message validating.
Information Security Principles Assistant Professor Dr. Sana’a Wafa Al-Sayegh 1 st Semester ITGD 2202 University of Palestine.
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.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Message Authentication Code July Message Authentication Problem  Message Authentication is concerned with:  protecting the integrity of a message.
Lecture 4.1: Hash Functions, and Message Authentication Codes CS 436/636/736 Spring 2015 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 Wei Wu. Internet Threat Model Client Network Not trusted!!
Chapter 21 Public-Key Cryptography and Message Authentication.
Cryptography and Network Security (CS435) Part Eight (Key Management)
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
CS461/ECE422 Spring 2012 Nikita Borisov — UIUC1.  Text Chapters 2 and 21  Handbook of Applied Cryptography, Chapter 8 
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
11.1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Message Integrity and Message Authentication.
PUBLIC-KEY CRYPTOGRAPH IT 352 : Lecture 2- part3 Najwa AlGhamdi, MSc – 2012 /1433.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
A Quick Tour of Cryptographic Primitives Anupam Datta CMU Fall A: Foundations of Security and Privacy.
Cryptographic Hash Functions and Protocol Analysis
CIT 380: Securing Computer SystemsSlide #1 CIT 380: Securing Computer Systems Modern Cryptography.
1 Message authentication codes, modes of operation, and indifferentiability Kan Yasuda (NTT, Japan) ASK 2011 Aug. 31, Singapore.
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
CS 4803 Fall 04 Public Key Algorithms. Modular Arithmetic n Public key algorithms are based on modular arithmetic. n Modular addition. n Modular multiplication.
Lecture 4.1: Hash Functions, and Message Authentication Codes CS 436/636/736 Spring 2014 Nitesh Saxena.
CS426Fall 2010/Lecture 51 Computer Security CS 426 Lecture 5 Cryptography: Cryptographic Hash Function.
IT 221: Introduction to Information Security Principles Lecture 5: Message Authentications, Hash Functions and Hash/Mac Algorithms For Educational Purposes.
CS555Spring 2012/Topic 151 Cryptography CS 555 Topic 15: HMAC, Combining Encryption & Authentication.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
Data Integrity / Data Authentication. Definition Authentication (Signature) algorithm - A Verification algorithm - V Authentication key – k Verification.
CS555Spring 2012/Topic 141 Cryptography CS 555 Topic 14: CBC-MAC & Hash Functions.
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.
Cryptographic Hash Function
Cryptography Lecture 13.
Cryptography Lecture 24.
Lecture 4.1: Hash Functions, and Message Authentication Codes
Cryptography Lecture 14.
Cryptography Lecture 13.
Cryptography Lecture 13.
Cryptography Lecture 18.
Cryptography Lecture 26.
Presentation transcript:

CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz

Authenticating longer messages?  Two widely used schemes (among several): –CBC-MAC –HMAC

CBC-MAC  Fix a message length L  n, where the block cipher has n-bit block length  To compute MAC k (m 1, …, m L ), with |m i |=n do: –Set t 0 = 0 n –For i=1 to L, set t i := F k (t i-1  m i ) –Output t L  To verify, re-compute and check…  Note the similarities to (and differences from) CBC mode encryption

Security of CBC-MAC?  Secure for fixed-length messages  Insecure (as described) for variable-length messages –There are secure variants of CBC-MAC if variable- length messages will be authenticated –Make sure to use these!

HMAC  Can be viewed as a version of “hash-and-MAC”, using collision-resistant hashing…

Hash functions  A (cryptographic) hash function H maps arbitrary length inputs to a fixed-length output  Main goal is collision resistance: –Hard to find distinct x, x’ such that H(x) = H(x’)

Hash functions in practice  MD5 –128-bit output –Introduced in 1991…collision attacks found in 2004…several extensions and improvements to the attacks since then –Still widely deployed(!)  SHA-1 –160-bit output –No collisions (yet?) known, but theoretical attacks exist  SHA-x –256-/512-bit outputs  Competition to design new hash standard in progress

Hash-and-MAC  Hash message to short “digest”  MAC the digest  HMAC uses essentially this idea HMAC m H(m) k t

(Informal) sketch of security  Say the adversary sees tags on m 1, …, m q,, and outputs a valid forgery on m  {m 1, …, m q }  Two possibilities: –H(m) = H(m i ) for some i  collision in H –H(m)  {H(m 1 ), …, H(m q )}  forgery in the underlying MAC for short messages

Encryption + integrity  In most settings, confidentiality and integrity are both needed --- i.e., authenticated encryption –How to obtain both?  Use ‘encrypt-then-authenticate’  Other natural possibilities are problematic!

What you now know

Sharing keys?  Secure sharing of a key is necessary for private- key crypto –How do parties share a key in the first place?  One possibility is a secure physical channel –E.g., in-person meeting –Dedicated (un-tappable) phone line –USB stick via courier service  Another possibility: key-exchange protocols –Parties can agree on a key over a public channel –This is amazing! (And began a revolution in crypto…)

Diffie-Hellman key exchange  First, some number theory… –Modular arithmetic, Z p, Z p * –Generators: e.g., 3 is a generator of Z 17 *, but 2 is not –The discrete logarithm assumption

The Diffie-Hellman protocol prime p, element g  Z p * h A = g x mod p h B = g y mod p K AB = (h B ) x K BA = (h A ) y

Security?  Consider security against a passive eavesdropper –We will cover stronger notions of security for key exchange in more detail later in the semester  Under the computational Diffie-Hellman (CDH) assumption, hard for eavesdropper to compute K AB = K BA –Not sufficient for security! –Can hash the key before using  Under the decisional Diffie-Hellman (DDH) assumption, the key K AB looks pseudorandom to an eavesdropper

Technical notes  p and g must be chosen so that the CDH/DDH assumptions hold –Need to be chosen with care – in particular, g should be chosen as a generator of a subgroup of Z p * –Details in CMSC456  Can use other groups –Elliptic curves are also popular  Modular exponentiation can be done quickly (in particular, in polynomial time) –But the naïve algorithm does not work!

Security against active attacks?  The basic Diffie-Hellman protocol we have shown is not secure against a ‘man-in-the-middle’ attack  In fact, impossible to achieve security against such attacks unless some information shared in advance –E.g., private-key setting –Or public-key setting (next)  Will cover authenticated key exchange later