Authenticated Encryption

Authenticated Encryption

The Evolution of Authenticated Encryption Phillip Rogaway University of California, Davis, USA Includes joint work with Mihir Bellare, John Black, Ted Krovetz, and Tom Shrimpton DIAC — Directions in Authenticated Ciphers 05 July 2012 Stockholm, Sweden 1/52 1. Introduction Today - The recognition of AE as a useful “thing” - Modes that don’t work 2. Definitions and constructions - Defining AE Historically - Generic composition ordered - RPC, XCBC$, IAPM, OCB - Defining nonce-based AEAD - CCM - GCM - OCB, again - Defining MRAE - SIV 3. Discussion - Taxonomy - Patents - Suggestions - Sample research questions 2/52 Authenticated Encryption (AE) Promises two benefits 1. An easier-to-correctly-use abstraction boundary 2. More efficient realizations Begins with two realizations regarding symmetric encryption 1. “Integrity” /“authenticity” is routinely needed 2. “Standard” privacy mechanisms don’t provide it 1. Introduction 3/52 Check / insert redundancy No authenticity for any S = f (P) CBC 1. Introduction 4/52 Add more arrows PCBC See: Yu, Hartman, Raeburn 2004 “The Perils of Unauthenticated Encryption: Kerberos Version 4” 5/52 Still more arrows/operations iaPCBC [Gligor, Donescu 1999] Promptly broken by Jutla (1999) and by Ferguson, Whiting, Kelsey, Wagner (1999) 1. Introduction 6/52 Emerging understanding that: - Beyond IND-CPA privacy was often desirable ~2000 - Didn’t come with standard encryption methods - Simple ways to try to get it cheaply don’t work Similar realizations in the public-key world … - [Bleichenbacher 1998] – “A chosen ciphertext attack against protocols based on the RSA encryption standard PKCS #1” - Reaction was that IND-CPA security was not enough - CCA1 security (Naor-Yung 1990) - CCA2 security (Rackoff-Simon 1991) - Non-malleability (Dolev-Dwork-Naor 1991) 1. Introduction 7/52 AE Def ined [Bellare, Rogaway 2000] – “Encode-then-encipher encryption: how to exploit nonces or redundancy in plaintexts for efficient cryptography” [Katz, Yung 2000] – “Unforgeable encryption and chosen ciphertext secure modes of operation” coins M Enc C C Dec M or ^ K K • Conventional privacy [BDJR97]: Indistinguishability / semantic security. • Authenticity: The only ciphertexts C that will decrypt to something valid are those previously obtained by an Enc(·) call. 2. Definitions and constructions 8/52 [BDJR97] AE Def ined M || EncK () EncK (0 ) C C A priv || EncK () EncK (0 ) Adv ( A) = Pr[A 1] - Pr[A 1] P 2. Definitions and constructions 9/52 [BR00,KY00;BN00] AE Def ined M EncK () C A C* priv || EncK () EncK (0 ) Adv ( A) = Pr[A 1] - Pr[A 1] P auth EncK () * * * Adv ( A) = Pr[A C : no query returned C and DecK (C ) ^ ] P 2. Definitions and constructions 10/52 [BN00, KY0] The Strength of AE • Implies IND-CCA2 security • Implies NM-CCA2 security 2. Definitions and constructions 11/52 Generic Composition [BN 2000] of an IND-CPA encryption scheme and a PRF M M M EncK MACL MACL EncK C T EncK MACL C T C T Encrypt-and-MAC MAC-then-Encrypt Encrypt-then-MACP 2. Definitions and constructions 12/52 The Cost of Generic Composition M EncK Cost(AE) = Cost(Enc) + Cost(MAC) MACL C T Example cases: Enc = CTR, CBC MAC = CMAC, HMAC, PMAC, UMAC Generic composition can be pretty cheap – if you use a cheap MAC 2. Definitions and constructions 13/52 RPC Mode [KY00] M1 M2 M3 M4 start i M1 i+1 M2 i+2 M3 i+3 M4 i+4 end i+5 EK EK EK EK EK EK i C0 C1 C2 C3 C4 C5 2. Definitions and constructions 14/52 XCBC$ Mode [Gligor Donescu 2001] Illustration from Gligor-Donescu US Patent 6973182 (2001) 2. Definitions and constructions 15/52 IAPM Mode [Jutla 2001] Illustration from [Jutla 2001] 2. Definitions and constructions 16/52 OCB Mode (later “OCB1”) [R, Bellare, Black, Krovetz 2001] Like IAPM but highly optimized. Motivated by NIST’s modes call. Z [i] = R gi L Checksum = M[1] M[m-1] C[m]0*Y[m] • Arbitrary-length messages • Efficient offset calculations • m + 2 blockcipher calls, m = |M|/n • Single blockcipher key • Cheap key setup (one blockcipher call) 2. Definitions and constructions 17/52 Two important players: NIST and IEEE 802.11i • WiFi standard ratified in 1999 Uses WEP security • Fatal attacks soon emerge: - [Fluhrer, Mantin, Shamir 2001] Weaknesses in the key scheduling algorithm of RC4 - [Stubblefield, Ioannidis, Rubin 2001] Using the Fluhrer, Mantin, Shamir attack to break WEP - [Borisov, Goldberg, Wagner 2001] Intercepting mobile communications: the insecurity of 802.11 - [Cam-Winget , Housley, Wagner, Walker 2003] Security flaws in 802.11 data links protocols • WEP TKIP WPA WPA2 - Draft solutions based on OCB - Politics and patent-avoidance: [Whiting, Housley, Ferguson 2002] develop CCM (=CCMP) - CCM standardized for 802.11, then NIST 2. Definitions and constructions 18/52 Before describing CCM … Back to the def initional story N coins N M Enc C C Dec M AD AD or ^ K K • Random values routinely aren’t • Many application have an available nonce • Weaker user requirement; less misuse 1) Move the coins “out” and make a “nonce” sufficient [RBBK01] 2) Add in “associated data” [R02] • Requirement from Cam-Winget, Kaliski, Walker • AD is authenticated but not encrypted • Failure to provide same AD on decryption results in ^ 2. Definitions and constructions 19/52 Also: (1) Ask for indistinguishability from random bits [RBBK00] AEAD (2) All-in-one definition [R, Shrimpton 2006] N, AD, M EncK (,,) $ (,, ) C C A M ^ ^ (,, ) DecK (,,) N, AD, C aead EncK DecK $ ^ Adv ( A) = Pr[A 1] - Pr[A 1] P A may not: repeat an N-value in an enc query; or ask a dec query (N, AD, C) after C is returned by an (N, AD, ) enc query 2. Definitions and constructions 20/52 [Whiting, Housley, Ferguson 2002] NIST SP 800-38C CCM Mode RFC 3610, 4309, 5084 Roughly MAC-then-Encrypt 2. Definitions and constructions 21/52 Functions FORMAT and COUNT where 2. Definitions and constructions 22/52 See: [R 2011], “Evaluation of Some [Whiting, Housley, Ferguson 2002] Blockcipher Modes of Operation” (Ch. 11); NIST SP 800-38C:2004 following [R, Wagner 2003], “A Critique of CCM” CCM Mode RFC 3610, 4309, 5084, 5116 • Provably secure, with OK bounds, if AE if E is a good PRP [Jonsson 2002] • Widely used, standardized (eg, in 802.11) • Simple to implement • Only forward direction of blockcipher used • About 2m+2 blockcipher calls • Half non-parallelizable • Word alignment disrupted • Can’t preprocess static AD • Not “online” — need to know m in advance • Complex Bit twiddling formatting • User must specify Absent abstraction boundary q {2,3,4,5,6,7,8} – byte length of byte length of longest message which determines nonce length(!) of t =15-q 2. Definitions and constructions 23/52 [Bellare, R, Wagner 2004] ANSI C12.22, ISO 19772 The issues with CCM aren’t hard to f ix • Generic composition of CTR and CMAC is a good alternative • EAX is a CCM-like mode intended to fix CCM’s problems N M A 0 1 CMACK CTRK CMACK C T 2 CMACK EAX 2. Definitions and constructions 24/52 See: [R 2011], “Evaluation of Some [McGrew, Viega 2004] Blockcipher Modes of Operation”, Ch. 12 (Follows CWC [Kohno, Viega, Whiting 2004]) NIST SP 800-38D:2007 RFC 4106, 5084, 5116, 5288, 5647 ISO 19772:2009 GCM Mode with 96-bit nonce N 2. Definitions and constructions 25/52 [McGrew, Viega 2004] GCM Mode Follows CWC [Kohno, Viega, Whiting 2004] NIST SP 800-38D • Provably secure, with OK bounds for long tags IPsec, TLS, MACsec, P1619.1, TLS • Parallelizable, online ISO 19772:2009 • About m+1 blockcipher calls, all of them parallelizable • Very efficient in HW • Reasonably efficient in SW with AES-NI, PCMULDQ, preprocessing & tables • Static AD can be preprocessed • Only forward direction of blockcipher used t/2 • First forgery after 2 queries • After, additional forgeries come quickly • Poor bound if truncate tag too much [Ferguson, 2005] (don’t truncate <96 bits) • Not that efficient in SW, even with PCMULDQ support • Timing attacks an issue for table-based realizations (slow setup, too) 36 • Maximum of 2 -32 bytes • “Reflected-bit” convention for representing field points unfortunate • |N|96 case not handled well • Published proof is buggy [Iwata, 2012] 2. Definitions and constructions26 /52 OCB3 [RBBK01, R04, KR10] OCB Mode in terms of a tweakable blockcipher [LRW02] = M1 M2 M3 M4 2. Definitions and constructions 27/52 [RBBK01, R04, KR10] OCB Mode in terms of a tweakable blockcipher [LRW02] = M1 M2 M3 M410 * 2. Definitions and constructions 28/52 [RBBK01, R04, KR10] OCB Mode in terms of a tweakable blockcipher [LRW02] 2. Definitions and constructions 29/52 Making the Tweakable Blockcipher ~N i EK (X) = EK (XD) D with D= Initial + li L ~ N i * * EK (X) = EK (XD) with D= Initial + li L ~N i $ $ EK (X) = EK (XD) with D= Initial + li L ~ N i * $ *$ EK (X) = EK (XD) with D= Initial + li L ~ i EK (X) = EK (XD) with D= li L ~ i * * EK (X) = EK (XD) with D= li L 127-|N| 128 a(0) = 0 Nonce = 0 1 N L = EK (0 ) Top = Nonce & 1122 06 ntz (i) li = 4 a(i) a(i) = a(i-1) 2 122 6 * Bottom = Nonce & 1 1 li = 4 a(i)+1 $ Ktop = EK (Top) li = 4 a(i)+2 *$ Stretch = Ktop || (Ktop (Ktop << 8)) li = 4 a(i)+3 Initial = (Stretch << Bottom) [1..128] 2. Definitions and constructions 30/52 [KR11] Software Performance Mode 4KB cpb Intel Core x86 i7 – “Sandy Bridge” CCM 5.14 64-bit OS, using AES/GCM NIs GCM 2.95 OCB 0.87 Time 2. Definitions and constructions 31/52 [KR11] Software Performance Mode 4K cpb Intel Core x86 i5-650 – “Clarkdale” CCM 2.09 64-bit OS, using AES/GCM NIs GCM 2.46 OCB 0.21 Overhead 2.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    52 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us