GCM-SIV: Full Nonce Misuse-Resistant Authenticated Encryption at Under One Cycle per Byte. Yehuda Lindell Bar-Ilan University



Similar documents
AES-GCM software performance on the current high end CPUs as a performance baseline for CAESAR competition

AES-GCM for Efficient Authenticated Encryption Ending the Reign of HMAC-SHA-1?

Network Security. Modes of Operation. Steven M. Bellovin February 3,

Reconsidering Generic Composition

Talk announcement please consider attending!

Table of Contents. Bibliografische Informationen digitalisiert durch

MAC. SKE in Practice. Lecture 5

Lecture 10: CPA Encryption, MACs, Hash Functions. 2 Recap of last lecture - PRGs for one time pads

Overview of Cryptographic Tools for Data Security. Murat Kantarcioglu

Authenticated encryption

Cryptographic Algorithms and Key Size Issues. Çetin Kaya Koç Oregon State University, Professor

CS155. Cryptography Overview

Symmetric Crypto MAC. Pierre-Alain Fouque

Message Authentication Code

Designing Hash functions. Reviewing... Message Authentication Codes. and message authentication codes. We have seen how to authenticate messages:

CS 758: Cryptography / Network Security

The Impact of Cryptography on Platform Security

Modes of Operation of Block Ciphers

Information Security

Haswell Cryptographic Performance

Cryptography and Network Security Chapter 12

Message Authentication Codes. Lecture Outline

Provable-Security Analysis of Authenticated Encryption in Kerberos

SPINS: Security Protocols for Sensor Networks

1 Message Authentication

Outline. CSc 466/566. Computer Security. 8 : Cryptography Digital Signatures. Digital Signatures. Digital Signatures... Christian Collberg

Message authentication

IronKey Data Encryption Methods

Cryptographic Hash Functions Message Authentication Digital Signatures

FIPS Non- Proprietary Security Policy. McAfee SIEM Cryptographic Module, Version 1.0

UM0586 User manual. STM32 Cryptographic Library. Introduction

Lecture 13: Message Authentication Codes

Authentication and Encryption: How to order them? Motivation

Lecture 9 - Message Authentication Codes

lundi 1 octobre 2012 In a set of N elements, by picking at random N elements, we have with high probability a collision two elements are equal

NXP & Security Innovation Encryption for ARM MCUs

Cryptographic hash functions and MACs Solved Exercises for Cryptographic Hash Functions and MACs

Developing and Investigation of a New Technique Combining Message Authentication and Encryption

1 Construction of CCA-secure encryption

SPC5-CRYP-LIB. SPC5 Software Cryptography Library. Description. Features. SHA-512 Random engine based on DRBG-AES-128

Computational Soundness of Symbolic Security and Implicit Complexity

Message Authentication Codes 133

Key Hopping A Security Enhancement Scheme for IEEE WEP Standards

Transitions: Recommendation for Transitioning the Use of Cryptographic Algorithms and Key Lengths

Leakage-Resilient Authentication and Encryption from Symmetric Cryptographic Primitives

Performance Investigations. Hannes Tschofenig, Manuel Pégourié-Gonnard 25 th March 2015

NIST Cryptographic Algorithm Validation Program (CAVP) Certifications for Freescale Cryptographic Accelerators

AES-COPA v.2. Designers/Submitters: Elena Andreeva 1,2, Andrey Bogdanov 3, Atul Luykx 1,2, Bart Mennink 1,2, Elmar Tischhauser 3, and Kan Yasuda 1,4

Error oracle attacks and CBC encryption. Chris Mitchell ISG, RHUL

Security Analysis of DRBG Using HMAC in NIST SP

WINTER SCHOOL ON COMPUTER SECURITY. Prof. Eli Biham

How To Attack A Block Cipher With A Key Key (Dk) And A Key (K) On A 2Dns) On An Ipa (Ipa) On The Ipa 2Ds (Ipb) On Pcode)

The Misuse of RC4 in Microsoft Word and Excel

EXAM questions for the course TTM Information Security May Part 1

Authentication requirement Authentication function MAC Hash function Security of

Digital Signatures. Prof. Zeph Grunschlag

Network Security. Computer Networking Lecture 08. March 19, HKU SPACE Community College. HKU SPACE CC CN Lecture 08 1/23

On the Security of CTR + CBC-MAC


Security Policy for FIPS Validation

Hash Functions. Integrity checks

Cryptographic mechanisms

Forward Secrecy: How to Secure SSL from Attacks by Government Agencies

The Mathematics of the RSA Public-Key Cryptosystem

Overview of Public-Key Cryptography

Network Security - ISA 656 Introduction to Cryptography

Usable Crypto: Introducing minilock. Nadim Kobeissi HOPE X, NYC, 2014

Techniques of Asymmetric File Encryption. Alvin Li Thomas Jefferson High School For Science and Technology Computer Systems Lab

Lecture 4 Data Encryption Standard (DES)

How To Test A Toe For Security

Chapter 11 Security+ Guide to Network Security Fundamentals, Third Edition Basic Cryptography

Technologies to Improve. Ernie Brickell

RSA BSAFE. Crypto-C Micro Edition for MFP SW Platform (psos) Security Policy. Version , October 22, 2012

Breakthrough AES Performance with. Intel AES New Instructions

Vulnerabilità dei protocolli SSL/TLS

Outline. Computer Science 418. Digital Signatures: Observations. Digital Signatures: Definition. Definition 1 (Digital signature) Digital Signatures

Client Server Registration Protocol

The Future of Digital Signatures. Johannes Buchmann

Einführung in SSL mit Wireshark

Summary of Results. NGINX SSL Performance

SHA3 WHERE WE VE BEEN WHERE WE RE GOING

Cryptography Overview

Network Security CS 5490/6490 Fall 2015 Lecture Notes 8/26/2015

Secure Socket Layer. Carlo U. Nicola, SGI FHNW With extracts from publications of : William Stallings.

A PPENDIX H RITERIA FOR AES E VALUATION C RITERIA FOR

Chapter 3. Network Domain Security

Network Security. Security Attacks. Normal flow: Interruption: 孫 宏 民 Phone: 國 立 清 華 大 學 資 訊 工 程 系 資 訊 安 全 實 驗 室

Cryptography and Key Management Basics

Message Authentication Codes

Overview of Symmetric Encryption

Fundamentals of Computer Security

Block encryption. CS-4920: Lecture 7 Secret key cryptography. Determining the plaintext ciphertext mapping. CS4920-Lecture 7 4/1/2015

AN IMPLEMENTATION OF HYBRID ENCRYPTION-DECRYPTION (RSA WITH AES AND SHA256) FOR USE IN DATA EXCHANGE BETWEEN CLIENT APPLICATIONS AND WEB SERVICES

How to Send Stealth Text From Your Cell Phone

AES-Based Authenticated Encryption Modes in Parallel High-Performance Software

Password-based encryption in ZIP files

Transcription:

GCM-SIV: Full Nonce Misuse-Resistant Authenticated Encryption at Under One Cycle per Byte Shay Gueron Haifa Univ. and Intel Yehuda Lindell Bar-Ilan University Appeared at ACM CCS 2015

How to Encrypt with a Block Cipher

CBC vs CTR Efficiency: CBC encryption is strictly sequential CTR encryption can be parallelized Does this matter? The Intel AES-NI instruction is fully pipelineable AES-CTR encryption with AES-NI is 7 times faster!

CBC vs CTR

CBC vs CTR Security Security bounds CTR has better security bounds the counter is a nonce and security is preserved as long as it doesn t repeat CBC breaks at the birthday bound since random values are input to the block cipher Integrity CBC is harder to tamper with IV/nonce reuse CBC reveals common prefix CTR completely broken

IV/Nonce Reuse

Why Should an IV Repeat? Randomness is much harder than it should be Intel has RDRAND and RDSEED on all new chips Not used inside Linux /dev/random

Bad Randomness In 2008, a bug in Debian Linux was found In 2006, code that was crucial for RNG reseeding was commented out

Bad Randomness PlayStation 3 In 2010, the ECDSA private key used by Sony to sign software for PlayStation 3 was recovered because Sony failed to generate a new random nonce for each signature

RSA Keys Lenstra et al. 2012 Collected 6.4 million RSA keys from the web 71,052 occurred more than once Different owners can decrypt each other s traffic Some of the moduli repeated thousands of times (no entropy) 12,934 had a common factor Computed GCD(N, N ) where N = pq and N = p q Factor both moduli We use this for entropy estimation

Entropy Estimation via RSA Keys The expected number of collisions in q samples q from a domain of size N is 2 N q 2 2N We have q = 12, 800, 000 (number of primes is double) We have number of collisions = 12,934 So, 12,800,0002 2N = 12, 934 giving N 2 32.56 Conclusion: an average of 33 bits of entropy

Bad Randomness Given that randomness can repeat and does repeat, what should we do? CBC still reveals common prefixes, but is better than CTR Can we do better? Efficiently?

What About Authenticated Encryption? CCM: CBC-MAC followed by CTR encryption: slow due to CBC- MAC and vulnerable due to CTR encryption GCM:

What About Authenticated Encryption? GCM if the nonce repeats, then: As with CTR plaintexts can be recovered Much more seriously H can be recovered This means that integrity is lost forever!

Preliminaries: IV vs Nonce Encryption IV (initial vector) encryption: IV must be randomly chosen Nonce-based encryption: Only require that nonce is unique CBC encryption: need random IV; nonce not good enough CTR encryption: suffices to have a unique nonce In AES-CTR, use a nonce of length 96 bits and counter of length 32 bits

Nonce Misuse Resistance [Rogaway-Shrimpton] Denote nonce by N Security property If N is same and message is same the result is the same ciphertext This is inherent Otherwise full security (authenticated encryption): Even if N is the same and the message is not Even if N is different and the message the same This cannot be achieved for online encryption If two long messages differ only in the last bit, when same N is used, must have same prefix in online

Abstract SIV Encryption [Rogaway-Shrimpton] Input: message M and nonce N Step 1: Apply a PRF F with key K1 to (N, M); denote result by T Step 2: Encrypt M with key K2 using nonce T; denote result by C Output (N, M, T) Decryption: M Dec K2 C with nonce T; check T = F K1 (N, M)

SIV Encryption Security Encryption: T = F K1 (N, M); C Enc K2 M with nonce T Security If nonce N is different, then by PRF the value T is pseudorandom If nonce N is the same but M is different, then by PRF the value T is pseudorandom The value T also serves as a valid MAC and so have authenticated encryption

Efficient Instantiations Option 1 apply a PRF based on AES What PRFs do we have? CBC-MAC Very expensive Option 2 construct a more efficient PRF using simpler primitives Let H be an ε-xor universal hash function x, y, z Pr H K1 x H K1 y = z ε n Claim: F K1,K2 N, M = F K2 H K1 M N is a PRF

Universal-Hash Based PRF The construction: F K1,K2 N, M = F K2 H K1 M N Proof idea: By the PRF property of F, can distinguish only if it queries N, M, N, M where H K1 M N = H K1 M N Equivalently: if H K1 M H K1 M = N N By the ε-xor property, this happens with probability only ε for each pair Therefore, secure PRF for negligible ε

The GCM-SIV Instantiation The GHASH function H in GCM is an ε-xor universal hash function (for negligible ε) [McGrew-Viega] The PRF used is AES (only need a single block) Encryption is AES-CTR Versions: Three different keys (for GHASH, PRF, CTR-ENC) Two keys: use same key for PRF and CTR-ENC One key: derive the two keys using AES itself

The GCM-SIV Instantiation A very important property: all the elements here are identical to the existing AES-GCM We only change the order of operations Why is this important? Efficiency Deployment ease (use existing code bases)

cycles per byte AES-GCM Across Intel CPU Generations AES-GCM performance 4.00 3.50 3.00 3.08 2.75 (2015) AES- GCM at the cost of CTR! 2.50 2.00 1.50 1.00 1.02 0.76 0.65 0.50 0.00 23 Pre AES-NI / PACLMULQDQ Westmere (2010) Sandy bridge (2012) Haswell (2013) Broadwell (2014) Skylake (Sept. 2015) Use AES-NI for CTR and PCLMULQDQ for GHASH

Efficiency of GCM vs GCM-SIV Encryption In GCM, CTR-ENC and GHASH are interleaved and run in parallel In GCM-SIV, GHASH must be finished before CTR-ENC can begin (cannot be done in parallel)

Efficiency of GCM vs GCM-SIV Decryption: In GCM, once again CTR-DEC and GHASH interleaved In GCM-SIV, can also interleave (decryption cost should be the same as the original GCM)

Cycles per byte GCM-SIV Performance Highlights 2-key GCM-SIV over an 8KB message 1.40 1.20 1.18 1.10 1.16 1.00 0.92 0.94 0.80 0.60 0.77 0.65 0.76 0.65 Haswell Broadwell 0.40 Skylake 0.20 - GCM-SIV encrypt (with init) GCM-SIV decrypt (with init) AES-GCM (without init)

Time Comparison to AES-GCM GCM-SIV (our implementation) is faster than (OpenSSL s best) AES-GCM for short messages, due to a new software optimization

GCM-SIV Performance Comparison GCM-SIV significantly outperforms all other implemented nonce-misuse resistant schemes Including all CAESAR round 1 candidates Based on published authors optimized implementations When measured on modern x64 processors The only exception is AEZ, which is based on a non-standard use of AES

Summary Full nonce misuse-resistant authenticated encryption at an extremely low cost (almost AES-GCM) Full proof of security and full implementation Easily deployable: Utilizes existing hardware Utilize existing code and software (AES-GCM implementations) Detailed specifications, reference code and Open Source optimized code implementations coming soon Unpatented We hope to see it adopted

Thank You