Cryptography Lecture 9 Arpita Patra © Arpita Patra.

Slides:



Advertisements
Similar presentations
CMSC 414 Computer (and Network) Security Lecture 4 Jonathan Katz.
Advertisements

CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 9 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 7 Jonathan Katz.
CS555Spring 2012/Topic 41 Cryptography CS 555 Topic 4: Computational Approach to Cryptography.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
CS555Topic 211 Cryptography CS 555 Topic 21: Digital Schemes (1)
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Cryptography Lecture 3 Arpita Patra.
Cryptography Lecture 10 Arpita Patra. Quick Recall and Today’s Roadmap >> CPA & CPA-mult security >> Equivalence of CPA and CPA-mult security >> El Gamal.
Lecture 11 Chosen-Ciphertext Security Stefan Dziembowski MIM UW ver 1.0.
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.
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
Cryptography Lecture 2 Arpita Patra. Summary of Last Class  Introduction  Secure Communication in Symmetric Key setting >> SKE is the required primitive.
Cryptography Lecture 7 Arpita Patra. Quick Recall and Today’s Roadmap >> Hash Function: Various Security Notions >> Markle-Damgaard Domain Extension >>
Integrity via Encryption with Redundancy  Question: Encryption is not ideal for authentication. But, can we gain security advantages if we add recognizable.
CS426Fall 2010/Lecture 61 Computer Security CS 426 Lecture 6 Cryptography: Message Authentication Code.
1 CIS 5371 Cryptography 4. Message Authentication Codes B ased on: Jonathan Katz and Yehuda Lindell Introduction to Modern Cryptography.
Game-based composition for key exchange Cristina Brzuska, Marc Fischlin (University of Darmstadt) Nigel Smart, Bogdan Warinschi, Steve Williams (University.
Secure Computation Lecture Arpita Patra. Recap >> Improving the complexity of GMW > Step I: Offline: O(n 2 c AND ) OTs; Online: i.t., no crypto.
Lecture 5.1: Message Authentication Codes, and Key Distribution
CS555Spring 2012/Topic 31 Cryptography CS 555 Topic 3: One-time Pad and Perfect Secrecy.
Cryptography Lecture 4 Arpita Patra.
CS555Spring 2012/Topic 71 Cryptography CS 555 Topic 7: Stream Ciphers and CPA Security.
Presentation Road Map 1 Authenticated Encryption 2 Message Authentication Code (MAC) 3 Authencryption and its Application Objective Modes of Operation.
Secure Computation (Lecture 9-10) Arpita Patra. Recap >> MPC with honest majority in i.t. settings > Protocol using (n,t)-sharing, proof of security---
Cryptography Lecture 11 Arpita Patra. Generic Results in PK World  CPA-secure KEM  SKE COA-secure SKE  Hyb CPA-secure CPA SecurityCCA Security Bit.
1/28 Chosen-Ciphertext Security from Identity- Based Encryption Jonathan Katz U. Maryland Ran Canetti, Shai Halevi IBM.
Cryptography Lecture 4 Arpita Patra. Recall o Various Definitions and their equivalence (Shannon’s Theorem) o Inherent Drawbacks o Cannot afford perfect.
Cryptography Lecture 6 Arpita Patra © Arpita Patra.
CS555Spring 2012/Topic 81 Cryptography CS 555 Topic 8: Pseudorandom Functions and CPA Security.
Ryan Henry I 538 /B 609 : Introduction to Cryptography.
Cryptography Lecture 8 Arpita Patra © Arpita Patra.
CS555Spring 2012/Topic 151 Cryptography CS 555 Topic 15: HMAC, Combining Encryption & Authentication.
Cryptography Lecture 10 Arpita Patra © Arpita Patra.
Cryptography Lecture 3 Arpita Patra © Arpita Patra.
Cryptography Lecture 6 Arpita Patra. Quick Recall and Today’s Roadmap >> MAC for fixed-length messages >> Domain Extension for MAC >> Authenticated Encryption:
CS555Spring 2012/Topic 141 Cryptography CS 555 Topic 14: CBC-MAC & Hash Functions.
Cryptography Lecture 5 Arpita Patra © Arpita Patra.
Authenticated encryption
Cryptography Lecture 9.
Topic 11: Authenticated Encryption + CCA-Security
Cryptography Lecture 12.
Cryptography Lecture 3 Arpita Patra © Arpita Patra.
Cryptography Lecture 6.
Cryptography Lecture 10.
Topic 7: Pseudorandom Functions and CPA-Security
Cryptography Lecture 11 Arpita Patra © Arpita Patra.
Cryptography Lecture 11.
Cryptography Lecture 5 Arpita Patra © Arpita Patra.
Cryptography Lecture 12 Arpita Patra © Arpita Patra.
Cryptography Lecture 8.
Cryptography Lecture 5 Arpita Patra © Arpita Patra.
Cryptography Lecture 11.
Cryptography Lecture 9.
Cryptography Lecture 12.
Topic 13: Message Authentication Code
Cryptography Lecture 6 Arpita Patra © Arpita Patra.
Cryptography Lecture 9 Arpita Patra © Arpita Patra.
Cryptography Lecture 10.
Cryptography Lecture 9.
Cryptography Lecture 11.
Cryptography Lecture 10.
Cryptography Lecture 23.
Presentation transcript:

Cryptography Lecture 9 Arpita Patra © Arpita Patra

Recall o Attack on cpa-secure scheme from PRF >> cpa-security to cca-security o Definitions- cma, scma, cmva, scmva >> MAC o Padding Oracle Attack on CBC mode

Today’s Goal -Recall of security definitions of MAC -Construction from PRF -Domain Extension: How to find a tag for long message o CBC-MAC -Authenticated Encryption (AE)- message privacy + integrity o Definition o Any AE is cca-secure. Stronger than cca-security. Nontrivial proof o Construction of AE from- cpa-secure SKE + cma-secure MAC

Security for MAC -Randomized -PPT -Chosen Message Attack (CMA) It is not possible to come up with (m,t) if no tag on m is seen before -Randomized -PPT -Chosen Message and Verification Attack (CMVA) It is not possible to come up with (m,t) if (m,t) has not been seen before.

CMA Security for MAC Experiment Mac-forge (n) A,   = (Gen, Mac, Vrfy), n I can break  Run time: Poly(n) Attacker A Let me verify Q = {(m 1, …,m l } Gen(1 n ) k Training Phase Forged tag generated by A (m, t) game output  1 (A succeeds) if Vrfy k (m, t) = 1 and m  Q  0 (A fails) otherwise  is CMA- secure if for every A, there is a negl(n) such that Pr [Mac-forge (n) = 1]  negl(n) A,  cma

Strong CMA Security for MAC Experiment Mac-sforge (n) A,   = (Gen, Mac, Vrfy), n I can break  Run time: Poly(n) Attacker A Let me verify Q = {(m 1, t 1 ), …,(m l, t l )} Gen(1 n ) k Training Phase Forged tag generated by A (m, t) game output  1 (A succeeds) if Vrfy k (m, t) = 1 and (m, t)  Q  0 (A fails) otherwise  is strong CMA-secure if for every A, there is a negl(n) such that Pr [Mac-sforge (n) = 1]  negl(n) A,  cma

What is not Captured in MAC Security Definition >> Let a bank user X sends the following instruction to the bank: “transfer $1000 from account #X to account #Y“ >> What if an attacker simply sends 10 copies of the original (message, tag) pair --Bank will consider each request genuine --- disaster for X >> The above attack is called replay attack  Why Replay Attack is not taken care in MAC Definition >> Additional techniques like (synchronized) counters, timestamp, etc are used  If A returns (m,t) for a already queried message, we don’t consider that as the break. >> What it captures in real scenario? if (m,t) is a valid pair generated by the sender, then there is no harm if the receiver accepts it even though adv forwards it (may be at a later point of time) >> Is it problematic? >> Whether this attack is of concern depends on actual application scenario >> So it is better to deal with this in the outer protocol (that used MAC for authentication)

Fixed-length MAC from PRF  If instead a TRF f was used to compute tag then an attacker can guess f(m) for a “new” m with probability at most 2 -n  The same should hold even if a PRF is used (as key is unknown)  Let F:{0, 1} n x {0, 1} n  {0, 1} n be a PRF Then  = (Gen, Mac, Vrfy) is a fixed-length MAC for n-bit strings where : Gen 1n1n k  R {0, 1} n Mac m  {0, 1} n k (Deterministic Mac) t:= F k (m) Vrfy m,t k 0, if t  F k (m) 1, if t = F k (m) Theorem: If F is a PRF then  is a cma-secure MAC.  Show that if  is not cma-secure then F is not a PRF by designing a distinguisher for F

Domain Extension SKEMAC Given a scheme that handles fixed-length message. How to handle arbitrary-length messages Break the message into blocks and encrypt each block using fixed-length scheme (minimum security notion CPA- security) The same does not work here– Additional tricks necessary Want efficiency?– Go for Mode of operations Want efficiency?– CBC-MAC, C-MAC, Hash-and-MAC, HMAC CT12 (for 3): Domain Extension of MAC, 4 attempts (three failed), proof of security

CBC-MAC for Arbitrary-length Messages  Let F: {0, 1} n x {0, 1} n  {0, 1} n be a PRF, whose key k is agreed between S and R  Let S has a message m with |m| = dn, where d is some polynomial in n m1m1 m2m2 m3m3 m F    FF t = Mac k (m) F k |m|  Length of m (i.e. |m|) need to be prepended, not appended --- otherwise insecure  CBC-Mac:  The tag consists of only n bits  Only d invocations of PRF Highly efficient 4dn bits 4d invocations of PRF

Information-theoretic MAC CT13 (for 3): Definition (restriction on key usage/one-time) Construction from Universal Function Proof of security CT14 (for 1): Limitations of i.t MAC

The Picture Till Now SKEMAC  Privacy  Integrity & Authentication  Not necessarily provide integrity and authentication; >> easy to come of with a valid ciphertext >> easy to manipulate known ciphertext  Not necessarily provide privacy; >> Easy to distinguish tags of two different messages Jonathan Katz, Moti Yung:Moti Yung: Unforgeable Encryption and Chosen Ciphertext Secure Modes of Operation. FSE 2000: FSE 2000: Mihir Bellare, Chanathip Namprempre:Chanathip Namprempre: Authenticated Encryption: Relations among Notions and Analysis of the Generic Composition Paradigm. ASIACRYPT 2000: ASIACRYPT 2000: Authenticated Encryption

Authenticated Encryption  But how do we define such security of such a primitive ?  Way out: try to capture secrecy and authenticity/integrity separately in the definition For secrecy, we demand CPA security: no PPT attacker should be able to non-negligibly distinguish between encryption of two messages of its choice, even if it has access to encryption oracle service For integrity/authentication, we demand something similar to strong cma-security for MAC. No PPT attacker can come up with a valid ciphertext for ANY message). Implies if receiver has received a valid ciphertext that it is THE ciphertext sent by the sender.  Let  = (Gen, Enc, Dec) be a symmetric-key cipher. Intuitively we demand the following secrecy and integrity property to be satisfied by  to qualify it as an AE scheme :  Modeled via a new experiment which exactly captures the above --- CiIn  is an authenticated encryption scheme if no PPT attacker is able to non-negligibly win the CPA-experiment and CiIn experiment with respect to  Open channel AE Secure & Authenticated channel >> Ci-In is similar in spirit of Mac-sforge >> We need to introduce new game and definition since MAC and SKE has different sintax

Ciphertext Integrity Experiment  = (Gen, Enc, Dec) Experiment CiIn (n) A,  I can forge  PPT Attacker A Let me verify Gen(1 n ) k Encryption Oracle message Encryption Q = {c 1, …, c t } Ciphertext c Dec k (c) = m   c  Q and 1 Dec k (c) = m =  c  Q or 0  Has ciphertext intigrity if for every PPT A: negl(n) Pr CiIn (n) A,   game output

Ingredients for Authenticated Encryption >> cpa-secure SKE >> scma-secure MAC >> How to combine them– crux of AE

Attempt I (Encrypt-and-Authenticate)  Let  E = (Enc, Dec) be a cpa-secure SKE and  M = (Mac, Vrfy) be a scma-secure MAC  Algorithm Gen in both  E and  M selects a random key from the respectively domain Enc Mac m kEkE kMkM c t (c, t) Encryption  k E and k M are independent keys for  E and  M m Dec (c, t) kEkE c Decryption m Vrfy kMkM t 1

Enc Mac m kEkE kMkM c t (c, t) Encryption  k E and k M are independent keys for  E and  M  Dec (c, t) kEkE c Decryption m Vrfy kMkM t 0  Not necessarily --- a secure MAC not necessarily preserves the privacy of m  Ex: a MAC may always output the first two bits of m as the first two bits of MAC tag  This approach used in SSH --- does this guarantee authenticated encryption ? In general this approach is not recommended Attempt I (Encrypt-and-Authenticate)  Let  E = (Enc, Dec) be a cpa-secure SKE and  M = (Mac, Vrfy) be a scma-secure MAC  Algorithm Gen in both  E and  M selects a random key from the respectively domain

Enc kEkE t m Mac kMkM c Encryption Decryption c Dec kEkE m || t Vrfy kMkM 1 m Attempt II (Authenticate-then-Encrypt)  Let  E = (Enc, Dec) be a cpa-secure SKE and  M = (Mac, Vrfy) be a scma-secure MAC  Algorithm Gen in both  E and  M selects a random key from the respectively domain

Enc kEkE t m Mac kMkM c Encryption Decryption c Dec kEkE m || t Vrfy kMkM 0   Unfortunately the above approach does not always lead to an authenticated cipher  There exists an instantiation of  E which is cpa-secure and which when combined with any MAC using the above approach does not lead to an authenticated cipher  This approach used in SSL --- does this guarantee authenticated encryption ?  CBC-mode of encryption + MAC using above approach  authenticated encryption  Security of this approach depends upon the underlying instantiation of  E In general this approach is not recommended Attempt II (Authenticate-then-Encrypt)  Let  E = (Enc, Dec) be a cpa-secure SKE and  M = (Mac, Vrfy) be a scma-secure MAC  Algorithm Gen in both  E and  M selects a random key from the respectively domain

c t Encryption m Enc kEkE kEkE Mac c Dec kEkE c Decryption 1 (c, t) Vrfy kMkM t c m Attempt III (Encrypt-then-Authenticate)  Let  E = (Enc, Dec) be a cpa-secure SKE and  M = (Mac, Vrfy) be a scma-secure MAC  Algorithm Gen in both  E and  M selects a random key from the respectively domain

c t Encryption m Enc kEkE kEkE Mac c  (c, t) Decryption Vrfy kMkM t 0 c  This approach used in IPSec --- does this guarantee authenticated encryption ?  Fortunately this approach always lead to an AE, irrespective of how  E and  M are instantiated Attempt III (Encrypt-then-Authenticate)  Let Let  E = (Enc, Dec) be a cpa-secure SKE and  M = (Mac, Vrfy) be a scma-secure MAC  Algorithm Gen in both  E and  M selects a random key from the respectively domain