Slide 1 OCB: A Bock-Cipher Mode of Operation for Efficient Authenticated Encryption Phillip Rogaway ~

Slides:



Advertisements
Similar presentations
Foundations of Cryptography Lecture 10 Lecturer: Moni Naor.
Advertisements

Foundations of Cryptography Lecture 11 Lecturer: Moni Naor.
1 Cryptanalysis-tolerant CPA crypt. ● Suppose E, E’ are two encryption schemes which on of them is CPA - secure  E.g., a standard and a proprietary, a.
11 Provable Security. 22 Given a ciphertext, find the corresponding plaintext.
Length-Doubling Ciphers and Tweakable Ciphers Haibin Zhang Computer Science Department University of California, Davis
S EMANTICALLY - SECURE FUNCTIONAL ENCRYPTION : P OSSIBILITY RESULTS, IMPOSSIBILITY RESULTS AND THE QUEST FOR A GENERAL DEFINITION Adam O’Neill, Georgetown.
A Block-Cipher Mode of Operation for Parallelizable Message Authentication John Black University of Nevada, Reno, USA Phillip Rogaway University of California,
CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
Slide 1 OCB: A Bock-Cipher Mode of Operation for Efficient Authenticated Encryption Phillip Rogaway UC Davis
#1 EAX A two-pass authenticated encryption mode Mihir BellarePhillip RogawayDavid Wagner U.C. San Diego U.C. Davis and U.C. Berkeley Chiang Mai University.
A Designer’s Guide to KEMs Alex Dent
Asymmetric Cryptography part 1 & 2 Haya Shulman Many thanks to Amir Herzberg who donated some of the slides from
Foundations of Network and Computer Security J J ohn Black Lecture #5 Sep 6 th 2005 CSCI 6268/TLEN 5831, Fall 2005.
Doc.: IEEE /156ar0 Submission March 2002 RogawaySlide 1 Some Comments on OCB and CCM Phil Rogaway UC Davis and Chiang Mai Univ.
CS555Spring 2012/Topic 41 Cryptography CS 555 Topic 4: Computational Approach to Cryptography.
Doc.: IEEE /378 Submission July 2001 Phillip RogawaySlide 1 OCB Mode Phillip Rogaway Department of Computer Science UC Davis + CMU
Slide 1 OCB Mode Phillip Rogaway Department of Computer Science UC Davis + Chiang Mai Univ +66.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Cramer-Shoup is Plaintext Aware in the Standard Model Alexander W. Dent Information Security Group Royal Holloway, University of London.
Computer Security CS 426 Lecture 3
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Modes of Operation. Topics  Overview of Modes of Operation  EBC, CBC, CFB, OFB, CTR  Notes and Remarks on each modes.
Cryptography Lecture 3 Arpita Patra.
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
Doc.: IEEE /378 Submission July 2001 Phillip RogawaySlide 1 OCB Mode Phillip Rogaway Department of Computer Science UC Davis + CMU
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
Slide 1 PMAC: A Parallelizable Message Authentication Code Phillip Rogaway Department of Computer Science UC Davis + CMU
Multiple Encryption & DES  clearly a replacement for DES was needed Vulnerable to brute-force key search attacks Vulnerable to brute-force key search.
Shambhu Upadhyaya Security – AES-CCMP Shambhu Upadhyaya Wireless Network Security CSE 566 (Lecture 13)
IND-CPA and IND-CCA Concepts Summary  Basic Encryption Security Definition: IND-CPA  Strong Encryption Security Definition: IND-CCA  IND-CPA, IND-CCA.
Integrity via Encryption with Redundancy  Question: Encryption is not ideal for authentication. But, can we gain security advantages if we add recognizable.
Game-based composition for key exchange Cristina Brzuska, Marc Fischlin (University of Darmstadt) Nigel Smart, Bogdan Warinschi, Steve Williams (University.
Class 3 Cryptography Refresher II CIS 755: Advanced Computer Security Spring 2014 Eugene Vasserman
CS555Spring 2012/Topic 31 Cryptography CS 555 Topic 3: One-time Pad and Perfect Secrecy.
Presentation Road Map 1 Authenticated Encryption 2 Message Authentication Code (MAC) 3 Authencryption and its Application Objective Modes of Operation.
Cryptography Lecture 6 Arpita Patra © Arpita Patra.
1 / 23 Efficient Garbling from A Fixed-key Blockcipher Applied MPC workshop February 20, 2014 Mihir Bellare UC San Diego Viet Tung Hoang UC San Diego Phillip.
Cryptography Lecture 9 Arpita Patra © Arpita Patra.
1 HBS: A Single-Key Mode of Operation for Deterministic Authenticated Encryption Tetsu Iwata (Nagoya University, Japan) Kan Yasuda (NTT Corporation, Japan)
Cryptography Lecture 10 Arpita Patra © Arpita Patra.
XCBC: A Version of the CBC MAC for Handling Arbitrary-Length Messages
Cryptography Lecture 6 Arpita Patra. Quick Recall and Today’s Roadmap >> MAC for fixed-length messages >> Domain Extension for MAC >> Authenticated Encryption:
Symmetric-Key Cryptography CS 161: Computer Security Prof. Raluca Ada Popa Sept 13, 2016.
Message Authentication Code
Authenticated encryption
Topic 11: Authenticated Encryption + CCA-Security
Cryptography Lecture 3.
Cryptography Lecture 12.
Cryptography Lecture 10.
Cryptography Lecture 11 Arpita Patra © Arpita Patra.
Cryptography Lecture 7 Arpita Patra © Arpita Patra.
Block cipher and modes of encryptions
Cryptography Lecture 7 Arpita Patra © Arpita Patra.
Cryptography Lecture 11.
Foundations of Network and Computer Security
Foundations of Network and Computer Security
SOFTWARE IMPLEMENTATION OF OCB MODE
Cryptography Lecture 12 Arpita Patra © Arpita Patra.
Cryptography Lecture 11.
Cryptography Lecture 12.
Topic 13: Message Authentication Code
Cryptography Lecture 9 Arpita Patra © Arpita Patra.
Cryptography Lecture 10.
Cryptography Lecture 11.
Cryptography Lecture 10.
July 15, 2019 doc.: IEEE r0 May, 2002 Project: IEEE P Working Group for Wireless Personal Area Networks (WPANs) Submission Title: [AES.
Counter With Cipher Block Chaining-MAC
Secret-Key Encryption
Presentation transcript:

Slide 1 OCB: A Bock-Cipher Mode of Operation for Efficient Authenticated Encryption Phillip Rogaway ~ rogaway MIT - November 9, 2001 Mihir BellareJohn BlackTed Krovetz UC San DiegoUniversity of NevadaUC Davis This work done at Chiang Mai University

Slide 2 Principal Goals of Symmetric Cryptography Privacy What the Adversary sees tells her nothing of significance about the underlying message M that the Sender sent Authenticity The Receiver is sure that the string he receives was sent (in exactly this form) by the Sender Authenticated Encryption Achieves both privacy and authenticity

Slide 3 Why Authenticated Encryption? Efficiency By merging privacy and authenticity one can achieve efficiency difficult to achieve if handling them separately. Easier-to-correctly-use abstraction By delivering strong security properties one may minimize encryption-scheme misuse.

Slide 4 Easier to correctly use because stronger security properties ECB IND-CPA CTR, CBC$ IND-CCA = NM-CCA Authenticated encryption IND-CPA + auth of ciphertexts OCB Idealized encryption [Bellare, Namprempre] [Goldwasser, Micali] [Bellare, Desai, Jokipii, Rogaway] [Bellare, Rogaway] [Katz,Yung]

Slide 5 Right or Wrong? A B K K A. R A E K (A. B. R A. R B. sk) E K (R B ) It depends on what definition E satisfies

Slide 6 Generic Composition Glue together an encryption scheme ( E ) and a message authentication code (MAC) Traditional approach to authenticated encryption Folklore approach. See [Bellare, Namprempre] and [Krawczyk] for analysis. Preferred way to do generic composition:

Slide 7 Generic Composition + Versatile, clean approach + Reduces design work + Quick rejection of forged messages if use optimized MAC (eg., UMAC) + Inherits the characteristics of the modes one builds from - Cost  (cost to encrypt) + (cost to MAC) For CBC Enc + CBC MAC, cost  2  (cost to CBC Enc) - Often done wrong - Two keys - Inherits characteristics of the modes one builds from

Slide 8 Trying to do Better Numerous attempts to make privacy + authenticity cheaper. One approach: stick with generic composition, but find cheaper encryption schemes or MACs. Make authenticity an “incidental” adjunct to privacy within a conventional-looking mode: CBC-with-various-checksums (wrong) PCBC in Kerberos (wrong) PCBC of [Gligor, Donescu 99] (wrong) [Jutla 00] First correct solution Jutla described two modes, IACBC and IAPM. A lovely start, but many improvements possible. OCB: inspired by IAPM, but many new characteristics.

Slide 9 Additional Related Work [Halevi]—improved on Jutla’s IAPM proof and helped to clarify what was going on in the scheme. [Gligor, Donescu]—Proposed IACBC-like scheme, using mod 2 n addition.

Slide 10 What is OCB? Authenticated-encryption scheme Uses any block cipher (eg. AES) Computational cost  cost of CBC OCB-AES good in SW or HW Lots of nice characteristics designed in: Uses  |M| / n  + 2 block-cipher calls Uses any nonce (needn’t be unpredictable) Works on messages of any length Creates minimum-length ciphertext Uses a single block-cipher key, each block-cipher keyed with it Quick key setup – suitable for single-message sessions Essentially endian-neutral Fully parallelizable No n-bit additions Provably secure: if you break OCB-AES you’ve broken AES In IEEE draft standard (wireless LANs)

Slide 11 Checksum = M[1]  M[2]  …  M[m-1]  C[m]0*  Pad L = E K (0)

Slide 12 Gray-Code Trick Instead of forming L, 2L, 3L, 4L, … (in GF(2 n )) we form L, 3L, 2L, 6L, … i  (i) ntz(i) 2 ntz(i)  (i-1)  2 ntz(i) dec In this way, the i th point in the sequence is formed by xoring the prior one with 2 ntz(i) L. The values L(i)=2 ntz(i) L can be precomputed. (But Schroeppel points out that one can also do this with L, 2L, 3L,… by using different L(i) values.)

Slide 13 Pseudocode of OCB[E,  ] algorithm OCB-Encrypt K (Nonce, M) L(0) = E K (0) L(-1) = lsb(L(0))? (L(0) >> 1)  Const43 : (L(0) >>1) for i = 1, 2, … do L(i) = msb(L(i-1))? (L(i-1) << 1)  Const87 : (L(i-1) <<1) Partition M into M[1]... M[m] // each n bits, except M[m] may be shorter Offset = E K (Nonce  L(0)) for i=1 to m-1 do Offset = Offset  L(ntz(i)) C[i] = E K (M[i]  Offset)  Offset Offset = Offset  L(ntz(m)) Pad = E K (len(M[m])  Offset  L(-1)) C[m] = M[m]  (first | M[m] | bits of Pad) Checksum = M[1] ...  M[m-1]  C[m]0*  Pad Tag = first  bits of E K (Checksum  Offset) return C[1]... C[m] || Tag

Slide 14 Wrong variant #1 Eliminate “post-whitening”

Slide 15 Wrong variant #2 Checksum = M[1]  M[2]  …  M[m-1]  M[m]0*  Pad

Slide 16 Wrong variant #3

Slide 17 Assurance via Provable Security Provable security begins with [Goldwasser, Micali 82] Despite the name, one doesn’t really prove security Instead, one gives reductions: theorems of the form If a certain primitive is secure then the scheme based on it is secure. Eg: If AES is a secure block cipher then OCB-AES is a secure authenticated-encryption scheme. Equivalently: If some adversary A does a good job at breaking OCB-AES then some comparably efficient B does a good job to break AES. Actual theorems quantitative: they measure how much security is “lost” across the reduction.

Slide 18 ( Provable security symmetric/asymmetric ) w

Slide 19 Privacy IND$-CPA: Indistinguishability from Random Bits A E K ( Nonce i, M i ) Nonce i M i Real E K oracle Rand bits oracle $ |M i | +  Adv priv (A) = Pr[A Real = 1] – Pr[A Rand = 1] [Goldwasser, Micali] [Bellare, Desai, Jokipii, Rogaway] Nonce i M i

Slide 20 Authenticity Authenticty of Ciphertexts A Nonce i M i E K (Nonce i, M i ) Real E K oracle Adv auth (A) = Pr[A forges] Nonce C Adversary A forges if she outputs Nonce C s.t. C is valid (it decrypts to a message, not to invalid ) there was no earlier query Nonce M i that returned C [Bellare, Rogaway] [Katz, Yung] this paper

Slide 21 Block-Cipher Security PRP and Strong PRP [Goldreich, Goldwasser, Micali] [Luby, Rackoff] [Bellare, Kilian, Rogaway] B E K (x i ) Real E K oracle xixi Rand perm oracle   (x i ) Adv prp (B) = Pr[B E K = 1] – Pr[B  = 1] xixi Adv sprp (B)= Pr[B E K E K -1 = 1] – Pr[B   = 1]

Slide 22 OCB Theorems Suppose  an adversary A that distinguishes OCB[E,  ] in: time = t total-num-of-blocks =  adv = Adv priv (A) Then  an adversary B that breaks block cipher E with: time  t num-of-queries   Adv prp (B)  Adv priv (A) – 1.5  2 / 2 n Privacy theorem: Suppose  an adversary A that forges OCB[E,  ] with: time = t total-num-of-blocks =  adv = Adv auth (A) Then  an adversary B that breaks block cipher E with: time  t num-of-queries   Adv sprp (B)  Adv auth (A) –1.5  2 / 2 n – 2 -  Authenticity theorem:

Slide 23 Proof Idea As usual, focus on the information-theoretic setting OCB[Perm(n),  ] Privacy: reasonably clear. Every nonce gives a “random” R, and then we pre-whiten with L+R, 2L+R, 3L+R, …, giving X[1] = M[1] + L + R, X[2] = M[2] + 2L + R, X[3] = M[3] + 3L + R With high probability, none of these X[i] values repeat. Authenticity: much more difficult. Suppose forge using nonce N, ciphertext C[1] … C[c] Case 1: no earlier (N,  ) Case 2: earlier (N, C ’ [1] … C ’ [m]) with m  c Case 3: earlier (N, C ’ [1] … C ’ [c] ) and C[i]  C[i] for some i < c Case 4: earlier (N, C ’ [1] … C ’ [c]) and C[i]  C[i] for all i < c and |C[c]| = |C ’ [c]| Case 5: earlier (N, C ’ [1] … C ’ [c]) and C[i]  C[i] for all i < c and |C[c]|  |C ’ [c]|

Slide 24

Slide 25 Structure Lemma Adv OCB[Perm(n),  ] (A)  max { m 1,…,m q sum to   Mcoll ( m i ) +  MMcoll ( m i, m j ) +  CMcoll (c,m i ) } + (  +2q+5c+11) n+1 22 + auth If A makes q queries of aggregate length  blocks then forges a c-block message, ii<j i

Slide 26 Mcoll, MMcoll, CMcoll (informally) Mcoll (m): Choose a string N M[1] …M[m] . Choose L, R  {0,1} n. What’s the chance of a collision when you form all the induced X[i] values (including 0, N+L)? MMcoll (m, m ’ ): Choose strings N M[1]…M[m]  and N ’ M ’ [1]…M ’ [m ’ ]  ’, choose L, R, R ’  {0,1} n. What’s the chance that one of the X[i] values associated to the first message is the same as an X ’ [j] value associated to the second? CMcoll (c, m): Choose strings N M[1]…M[m] C[1]…C[m] and N ’ C ’ [1]… C ’ [c]. Choose all random values needed to define X ’ [c+1]—the value that E K determines the tag from. What’s the chance that X ’ [c+1] collides with another X[i], X ’ [j]?

Slide 27 What the structure lemma does for us Eliminates adaptivity as an issue. Lets us focus on pairs of messages instead of all q messages. Lets us calculate, carry out case analysis. Proving the structure lemma Uses the “game substitution approach” (as in [KR]). Six games are used, slowly blending.

Slide 28 Assembly Speed Data from Helger Lipmaa OCB-AES 16.9 cpb (271 cycles) CBC-AES 15.9 cpb (255 cycles) ECB-AES 14.9 cpb (239 cycles) CBCMAC-AES 15.5 cpb (248 cycles) 6.5 % slower // Best Pentium AES code known. C Speed OCB-AES 28.1 cpb (449 cycles) CBCMAC-AES 26.8 cpb (428 cycles) 4.9 % slower Data from Ted Krovetz. Compiler is MS VC++. Uses rijndael-alg-fst.c ref code. 1 Kbyte messages—pure Pentium 3 assembly—AES128. Overhead so small that AES with a C-code CBC wrapper is slightly more expensive than AES with an assembly OCB wrapper.

Slide 29 Why I like OCB Ease-of-correct-use. Reasons: all-in-one approach; any type of nonce; parameterization limited to block cipher and tag length Aggressively optimized:  optimal in many dimensions: key length, ciphertext length, key setup time, encryption time, decryption time, available parallelism; SW characteristics; HW characteristics; … Simple but non-obvious Ideal setting for practice-oriented provable security For More Information OCB web page  Contains FAQ, papers, reference code,...