Keynote: White-Box Cryptography

Similar documents
From obfuscation to white-box crypto: relaxation and security notions

White-Box Cryptography

Differential Computation Analysis Hiding your White-Box Designs is Not Enough

Differential Computation Analysis Hiding your White-Box Designs is Not Enough. Joppe W. Bos

Differential Computation Analysis Hiding your White-Box Designs is Not Enough

Unboxing the whitebox. Jasper van CTO Riscure North America ICMC 16

Security of Block Ciphers Beyond Blackbox Model

White-Box Cryptography State of the Art. Paul Gorissen

White-box Cryptomania

WhoamI. Attacking WBC Implementations No con Name 2017

ECRYPT II Workshop on Physical Attacks November 27 th, Graz, Austria. Stefan Mangard.

External Encodings Do not Prevent Transient Fault Analysis

Computer Security CS 526

Lecture 2: Secret Key Cryptography

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

Power Analysis Attacks

2 What does it mean that a crypto system is secure?

Block ciphers used to encode messages longer than block size Needs to be done correctly to preserve security Will look at five ways of doing this

Fault Sensitivity Analysis

On the Ineffectiveness of Internal Encodings - Revisiting the DCA Attack on White-Box Cryptography

Goals of Modern Cryptography

Winter 2011 Josh Benaloh Brian LaMacchia

Cryptography [Symmetric Encryption]

SIDE CHANNEL ATTACKS AGAINST IOS CRYPTO LIBRARIES AND MORE DR. NAJWA AARAJ HACK IN THE BOX 13 APRIL 2017

Side channel attack: Power Analysis. Chujiao Ma, Z. Jerry Shi CSE, University of Connecticut

Implementing Cryptography: Good Theory vs. Bad Practice

Cryptography. Andreas Hülsing. 6 September 2016

Some Aspects of Block Ciphers

Cryptography (cont.)

HOST Differential Power Attacks ECE 525

Symmetric Cryptography

1 Achieving IND-CPA security

Information Security CS526

Applying TVLA to Public Key Cryptographic Algorithms. Michael Tunstall Gilbert Goodwill

Cache Timing Attacks in Cryptography

Stream Cipher Criteria

Lecture 1: Perfect Security

White-Box Cryptography: Don t Forget About Grey Box Attacks

Homework 2. Out: 09/23/16 Due: 09/30/16 11:59pm UNIVERSITY OF MARYLAND DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

Vortex: A New Family of One-way Hash Functions Based on AES Rounds and Carry-less Multiplication

Paper presentation sign up sheet is up. Please sign up for papers by next class. Lecture summaries and notes now up on course webpage

Cryptography Basics. IT443 Network Security Administration Slides courtesy of Bo Sheng

Cryptography CS 555. Topic 11: Encryption Modes and CCA Security. CS555 Spring 2012/Topic 11 1

Secret Key Cryptography

CSE 127: Computer Security Cryptography. Kirill Levchenko

FDTC 2010 Fault Diagnosis and Tolerance in Cryptography. PACA on AES Passive and Active Combined Attacks

Data Encryption Standard (DES)

Symmetric Cryptography

La Science du Secret sans Secrets

A Countermeasure Circuit for Secure AES Engine against Differential Power Analysis

9/30/2016. Cryptography Basics. Outline. Encryption/Decryption. Cryptanalysis. Caesar Cipher. Mono-Alphabetic Ciphers

Breaking Korea Transit Card with Side-Channel Attack

Lecture 1 Applied Cryptography (Part 1)

Symmetric-Key Cryptography Part 1. Tom Shrimpton Portland State University

Cryptographic Primitives A brief introduction. Ragesh Jaiswal CSE, IIT Delhi

symmetric cryptography s642 computer security adam everspaugh

A physical level perspective

Side-Channel Attack against RSA Key Generation Algorithms

page 1 Introduction to Cryptography Benny Pinkas Lecture 3 November 18, 2008 Introduction to Cryptography, Benny Pinkas

Side-Channel Countermeasures for Hardware: is There a Light at the End of the Tunnel?

Security. Communication security. System Security

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Multi-Stage Fault Attacks

CSC 580 Cryptography and Computer Security

A Tutorial on White-box AES

A Chosen-key Distinguishing Attack on Phelix

The Davies-Murphy Power Attack. Sébastien Kunz-Jacques Frédéric Muller Frédéric Valette DCSSI Crypto Lab

JUST ONE FAULT Persistent Fault Analysis on Block Ciphers

ISA 562: Information Security, Theory and Practice. Lecture 1

Block cipher modes. Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 75

Riscure Inspector Release Notes

CSCE 813 Internet Security Symmetric Cryptography

ENGI 8868/9877 Computer and Communications Security III. BLOCK CIPHERS. Symmetric Key Cryptography. insecure channel

Stream ciphers. Lecturers: Mark D. Ryan and David Galindo. Cryptography Slide: 91

Scanned by CamScanner

Masking as a Side-Channel Countermeasure in Hardware

Lecture 3: Symmetric Key Encryption

Random Oracles - OAEP

Fundamentals of Cryptography

Assignment 3: Block Ciphers

Foundations of Cryptography CS Shweta Agrawal

Block Cipher Operation. CS 6313 Fall ASU

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2018

PARAMETRIC TROJANS FOR FAULT-BASED ATTACKS ON CRYPTOGRAPHIC HARDWARE

TinySec: A Link Layer Security Architecture for Wireless Sensor Networks. Presented by Paul Ruggieri

Security against Timing Analysis Attack

A Weight Based Attack on the CIKS-1 Block Cipher

Cryptography: Symmetric Encryption [continued]

Fault injection attacks on cryptographic devices and countermeasures Part 1

3 Symmetric Cryptography

Sho Endo1, Naofumi Homma1, Yu-ichi Hayashi1, Junko Takahashi2, Hitoshi Fuji2 and Takafumi Aoki1

Cryptography Functions

Security Analysis of Extended Sponge Functions. Thomas Peyrin

Overview of Cryptography

Cryptography. and Network Security. Lecture 0. Manoj Prabhakaran. IIT Bombay

Cryptography Introduction

CS154, Lecture 18: 1

Breaking the Bitstream Decryption of FPGAs

NETWORK SECURITY & CRYPTOGRAPHY

Lecture 5: Protocols - Authentication and Key Exchange* CS 392/6813: Computer Security Fall Nitesh Saxena

Transcription:

Keynote: White-Box Cryptography Matthieu Rivain PHIIC Workshop, 4 Oct 2016

Outline Context: white-box crypto: big trend in the industry cryptographic obfuscation: big trend in the scientific literature huge gap between both This presentation: what is (cryptographic) obfuscation? what is white-box cryptography? white-box cryptography in practice

What is (cryptographic) obfuscation?

What is obfuscation? Obfuscation is the deliberate act of creating obfuscated code that is difficult for humans to understand. Obfuscators make reverse engineering more difficult but do not alter the behavior of the obfuscated application. wikipedia

What is obfuscation? Obfuscation is the deliberate act of creating obfuscated code that is difficult for humans to understand. Obfuscators make reverse engineering more difficult but do not alter the behavior of the obfuscated application. wikipedia make a program unintelligible while preserving its functionality

Defining obfuscation Program word in a formal (programming) language P L function execute L {0, 1} {0, 1} execute (P, in) out P implements a function f A B if a A execute(p, a) = f(a) denoted P f P 1 and P 2 are functionally equivalent if P 1 f P 2 for some f denoted P 1 P 2

Defining obfuscation Obfuscator algorithm O mapping a program P to a program O(P ) st: functionality: O(P ) P efficiency: O(P ) is efficiently executable security: (informal) O(P ) is hard to understand (informal) O(P ) protects its data How to formally define the security property?

Virtual Black-Box (VBB) Obfuscation O(P ) reveals nothing more than the I/O behavior of P Any adversary on O(P ) can be simulated with a black-box access to P P x P (x) O(P ) A { 0 1 { 0 1 Adversary imulator Pr[A(O(P ))) = 1] Pr[ P ( ) = 1] ε

Impossibility result VBB-O does not exist on general programs (CRYPTO 01) Counterexample: uint128_t cannibal ( prog P, uint128_t password ) { uint128_t secret1 = 0 xe075b4f4eabf4377c1aa7202c8cc1ccb ; uint128_t secret2 = 0 x94ff8ec818de3bd8223a62e4cb7c84a4 ; if ( password == secret1 ) return secret2 ; if ( execute (P, null, secret1 ) == secret2 ) return secret1 ; } return 0; O(cannibal)(O(cannibal), 0) = secret1

Indistinguishability obfuscation (io) Restricted to circuits i.e. programs without branches/loops For any two programs P 1 and P 2 st P 1 P 2 and P 1 = P 2, the obfuscated programs O(P 1 ) and O(P 2 ) are indistinguishable O(P 1 ) A { 0 O(P 2 ) A 1 { 0 1 Pr[A(O(P 1 )) = 1] Pr[A(O(P 2 )) = 1] ε Best possible obfuscation in some sense

What is white-box cryptography?

What is white-box cryptography? the attacker is assumed to have full access to the encrypting software and control of the execution environment Our main goal is to make key extraction difficult. While an attacker can clearly make use of the software itself, forcing an attacker to use the installed instance is often of value to DRM systems providers. Chow et al. (DRM 2002)

What is white-box cryptography? the attacker is assumed to have full access to the encrypting software and control of the execution environment obfuscation restricted to encryption (or another crypto primitive) Our main goal is to make key extraction difficult. While an attacker can clearly make use of the software itself, forcing an attacker to use the installed instance is often of value to DRM systems providers. Chow et al. (DRM 2002)

What is white-box cryptography? the attacker is assumed to have full access to the encrypting software and control of the execution environment obfuscation restricted to encryption (or another crypto primitive) Our main goal is to make key extraction difficult. relaxed security requirements While an attacker can clearly make use of the software itself, forcing an attacker to use the installed instance is often of value to DRM systems providers. Chow et al. (DRM 2002)

What is white-box cryptography? the attacker is assumed to have full access to the encrypting software and control of the execution environment obfuscation restricted to encryption (or another crypto primitive) Our main goal is to make key extraction difficult. relaxed security requirements While an attacker can clearly make use of the software itself, forcing an attacker to use the installed instance is often of value to DRM systems providers. encryption software secret key Chow et al. (DRM 2002)

What is white-box cryptography? Obfuscation restricted to a specific class of crypto primitives Typically, PN ciphers: k 1 k 2 k 3 k n m LL LL LL LL c Running example: F = {AE k ( ) k {0, 1} 128 } White-box obfuscator: k WB-AE k AE k ( )

VBB-obfuscated AE trongest form of WBC AE k ( ) m c WB-AEk A { 0 1 { 0 1 Adversary imulator Impossibility result does not apply The AE-LUT program achieves VBB but does not fit into 10 9 10 9 10 9 TB How to build a compact VBB AE implementation? could be impossible to achieve

io-obfuscated AE Is this a good obfuscator? 1. k extract-key(p k ) 2. return reference implem AE k This is an io AE obfuscator! If key-extraction is difficult on some P k key-extraction is still difficult on O(P k ) key-extraction is difficult on any O(P k ) O(P k) o what does io-ae means? not clear!

Defining WBC simple AE io AE? VBB AE Obfuscation scale We need something relaxed compared to VBB meaningful compared to io

Defining WBC simple AE io AE further white-box security notions? Obfuscation scale VBB AE We need something relaxed compared to VBB meaningful compared to io further notions AC 2013: White-Box ecurity Notions for ymmetric Encryption chemes

What could we expect? The least requirement: key extraction must be difficult WB-AE k A k Code-lifting cannot be avoided It should be different to have WB-AE k and k Using the software should constrain the adversary

Incompressibility Make the implementation huge and incompressible WB-AE k > 10 GB A AE k < 10 KB

Incompressibility Make the implementation huge and incompressible WB-AE k > 10 GB A AE k < 10 KB everal new primitives based on this idea Toy example (AC 2013): RA with large public exponent Block-ciphers based on large tables (AIACRYPT 2016) Big-key cipher (CRYPTO 2016)

One-wayness Make the implementation one-way m WB-AE k A m c Namely: turning AE into a public-key cryptosystem PK crypto with light-weight private operations

Traceability Include a tracing mechanism WB-AE k,id A Π AE k( ) T id T st A WB-AE k,id Π AE k ( ) T (Π) = id Possible use case: pay-tv

Traceability Include a tracing mechanism WB-AE k,id1 WB-AE k,id2 A Π AE k( ) T id {id 1, id 2,..., id t} WB-AE k,idt T st A WB-AE k,id Π AE k ( ) T (Π) = id Possible use case: pay-tv

White-box cryptography in practice

Original white-box AE AC 2002: White-Box Cryptography and an AE Implementation (Chow et al. ) First step: represent AE as a network of look-up tables Each AE round composed of 4 sub-rounds of the form: 02 03 01 01 (x 0 k 0 ) 01 02 03 01 (x (y 0, y 1, y 2, y 3 ) = 5 k 5 ) 01 01 02 03 (x 10 k 10 ) 03 01 01 02 (x 15 k 15 )

Original white-box AE This rewrites: (y 0, y 1, y 2, y 3 ) = T 0 [x 0 ] T 5 [x 5 ] T 10 [x 10 ] T 15 [x 15 ] where T i 8 bits 32 bits defined as T 0 [x] = (x k 0 ) (02 01 01 03) T T 5 [x] = (x k 5 ) (03 02 01 01) T T 10 [x] = (x k 10 ) (01 03 02 01) T T 15 [x] = (x k 15 ) (01 01 03 02) T XORs performed with a table T xor 8 bits 4 bits T xor [x 0 x 1 ] = x 0 x 1

Original white-box AE Illustration: J. Muir A Tutorial on White-box AE (eprint 2013)

Original white-box AE Illustration: J. Muir A Tutorial on White-box AE (eprint 2013)

Original white-box AE econd step: randomize the look-up tables Each table T is replaced by T = g T f 1 where f, g are random encodings For two connected tables T, R T = g T f 1 R = h R g 1 R T = h (R T ) f 1 Intuition: encoded tables bring no information on the key true for a single table true for a chain g T n T n 1 T 1 f 1 not true for the larger picture

Original white-box AE Consider the encoded sub-round (32 bits 32 bits): Illustration: Y. De Mulder (presentation AC 2013) The four key bytes can be easily extracted from it

Original white-box AE For instance, a simple collision attack: 02 0(α) 03 1(0) = 02 0(0) 03 1(β) where 0(x) = (P 0(x) k 0) and 1(x) = (P 1(x) k 1) Illustration: Y. De Mulder (presentation AC 2013)

A white-box cemetery Many attacks on the original design: First break: BGE attack (Billet et al. AC 2004) Generic attack on WB PN ciphers (Michiels et al. AC 2008) Improved BGE attack (Lepoint et al. AC 2013) Collision attack (Lepoint et al. AC 2013) Classical fault attacks (e.g. Piret-Quisquater, CHE 2003) Differential Computational Analysis (Bos et al. CHE 2016) Other attempts: Perturbed WB-AE using MV crypto (Bringer et al. eprint 2006) broken (De Mulder et al. INDOCRYPT 2010) WB-AE based on wide linear encodings (Xiao-Lai et al. CA 2009) broken (De Mulder et al. AC 2012) WB-AE based on dual AE ciphers (Karroumi, ICIC 2010) broken (Lepoint et al. AC 2013) Not better for white-box DE...

White-box crypto today All published WB implementations have been broken Yet the industrial need exists Digital content protection (pay-tv, DRM) Mobile payments oftware protection Advent of the secret specification paradigm mix of WBC techniques and code obfuscation attackers don t know how the implementation was generated this is called security through obscurity Kerckhoffs / hannon must be turning in their graves! Development of generic attacks against WBC Differential Computational Analysis (DCA) Differential Fault Analysis (DFA)

Differential Computational Analysis uggested by NXP / Riscure Presentation at BalckHat 2015 Best paper award CHE 2016 Dynamically record all the data-dependent information during an execution memory writes / loads (addresses + values) logical instructions (operands + result) program counter re-synchronization computational trace Apply DPA techniques to computational traces score[ˆk] = ρ(bˆk, CT k ) Bˆk : bit computed if k = ˆk CT k : computational traces

Differential Computational Analysis Example trace build from 8-bit data reads: Corresponding trace with Hamming weights: Corresponding bits: Traces: J. Bos (presentation CHE 2016)

Differential Computational Analysis Advantages of DCA: generic / not specific to some WB design does not require reverse engineering efforts defeats all attempts of code-obfuscation seems to work remarkably well in practice Why does it work? in most WB implementations, randomization is static encodings are generated once and hardcoded we might have ρ(x i, Enc[x] j ) 0 especially with 4-bit encodings Enc[x 0 x 1 ] = Enc[x 0 ] Enc[x 1 ]

Differential Computational Analysis imple correlation experiment (1000 samples) Target variable: Enc[(x k)] (4-bit encoding) Model: MB of (x k ) 0.4 0.4 0.2 0.2 5 10 15 5 20-0.2-0.2-0.4-0.4 Bit 0 10 15 20 15 20 Bit 1 0.4 0.2 0.2 5 10-0.2 15 5 20 10-0.2-0.4-0.4 Bit 2 Bit 3

Differential Computational Analysis With another (4-bit) encoding: 0.4 0.2 0.2 5 5 10 15 10 15 20 15 20 20-0.2-0.2-0.4 Bit 0 Bit 1 0.4 0.4 0.2 0.2 5 10-0.2 15 5 20 10-0.2-0.4-0.4 Bit 2 Most of the time 1, 2, or 3 bits leak For 8-bit encodings: correlation to weak Bit 3

Countermeasures? We know a lot of countermeasures against DPA / DFA It might be hard to translate them to the white-box context Attackers have a full control of the implementation any external RNG can be set to 0 easy synchronization of traces (all can be monitored) dummy operations can be easily detected and removed coherence checks can be bypassed Only pseudorandomness based on the plaintext is possible Countermeasures must be obfuscated to be hard to remove

Conclusion

Conclusion WBC can be define as a restriction of cryptographic obfuscation subset of programs (e.g. given crypto primitive) relaxed security notions More work is needed to refine / define alternative security notions build new candidate white-box implementations analyze DCA / DFA against WBC translate existing countermeasures to the white-box context Open question: who beats who? secret-spec designer vs. state-of-the-art cryptanalyst

Interested in white-box crypto? WhibOx 2016, white-box cryptography and obfuscation 14 Aug. 2016, UCB https://www.cryptoexperts.com/whibox2016/ Ecrypt white-box challenge, coming soon submit your (secret-design) white-box AE try to break submitted implementations Visit CryptoExperts website: https://www.cryptoexperts.com/technologies/white-box/

Questions?