Towards Fresh Re-Keying with Leakage-Resilient PRFs: Cipher Design - - PowerPoint PPT Presentation

towards fresh re keying with leakage resilient prfs
SMART_READER_LITE
LIVE PREVIEW

Towards Fresh Re-Keying with Leakage-Resilient PRFs: Cipher Design - - PowerPoint PPT Presentation

Towards Fresh Re-Keying with Leakage-Resilient PRFs: Cipher Design Principles and Analysis d 1 , F. De Santis 2 , 3 , J. Heyszl 4 , S. Mangard 3 , S. Bela M. Medwed 5 , J.-M. Schmidt 6 , F.-X. Standaert 7 , S. Tillich 8 1 Ecole Normale Sup


slide-1
SLIDE 1

Towards Fresh Re-Keying with Leakage-Resilient PRFs: Cipher Design Principles and Analysis

  • S. Bela¨

ıd1, F. De Santis2,3, J. Heyszl4, S. Mangard3,

  • M. Medwed5, J.-M. Schmidt6, F.-X. Standaert7, S. Tillich8

1 Ecole Normale Sup´

erieure and Thales Communications, France.

2 Institute for Security in Information Technologies, Technical University of Munich. 3 Infineon Technologies AG, Neubiberg, Germany. 4 Fraunhofer Research Institution AISEC, Munich, Germany. 5 NXP Semiconductors, Graz, Austria. 6 IAIK, Graz University of Technology, Austria. 7 ICTEAM/ELEN/Crypto Group, Universit´

e catholique de Louvain, Belgium.

8 Department of Computer Science, University of Bristol, UK.

24.08.2013 PROOFS Workshop

1 / 23

slide-2
SLIDE 2

Outline

Intro Efficient Leakage-Resilient PRFs Fresh Re-Keying with Efficient Leakage-Resilient PRFs Conclusion

2 / 23

slide-3
SLIDE 3

Side-Channel Information Leakage

Cryptographic implementations leak information over side-channels

C k p c ℓ

Implementation countermeasures:

➥ Protected logic styles, masking schemes, re-keying schemes, ...

Focus on: re-keying schemes for symmetric cryptography 3 / 23

slide-4
SLIDE 4

Re-Keying Schemes [AB00, MSGR10]

The success probability of many (physical) attacks depends on the amount

  • f cryptographic operations which are observable under the same key

Idea: generate fresh keys from a master key using a re-keying function g

g C k p c k∗ r

Requirements:

➥ g is DPA/SPA secure ➥ C is SPA secure ➥ r is a public random nonce

4 / 23

slide-5
SLIDE 5

Re-keying Functions

Re-keying functions in the literature:

Modular multiplication [MSGR10]

g : (GF(28)[x]/(xd + 1))2 → GF(28)[x]/(xd + 1): (k, r) → k · r Our proposal:

Leakage resilient pseudo-random function [SPY+09]

Informally:

A pseudo-random function (PRF) is a function which is computationally

indistinguishable from a truly random function

A leakage resilient pseudo-random function (LRPRF) is a PRF which

preserves “some” security, even in presence of leakages

5 / 23

slide-6
SLIDE 6

Instantiating Block Cipher based PRFs

From classical construction [GGM86], r=bit0bit1bit2,bit3...bitm

BC k bit0 BC bit1 BC bit2 BC bit3 BC bitm F(k, r)

6 / 23

slide-7
SLIDE 7

Instantiating Block Cipher based PRFs

From classical construction [GGM86], r=bit0bit1bit2,bit3...bitm

BC k bit0 BC bit1 BC bit2 BC bit3 BC bitm F(k, r)

From efficient construction [SPY+09], r=word0word1word2...wordn

BC k word0 BC word1 BC word2 BC wordn

  • F(k, r)

6 / 23

slide-8
SLIDE 8

Classical DPA Attack Scenario

S x0 k0 ℓ0(S(x0 ⊕ k0)) S x1 k1 ℓ1(S(x1 ⊕ k1)) S x2 k2 ℓ2(S(x2 ⊕ k2)) S x3 k3 ℓ3(S(x3 ⊕ k3)) Divide et Impera: attack each S-box output independently

7 / 23

slide-9
SLIDE 9

Classical DPA Attack Scenario

S x0 k0 ℓ0(S(x0 ⊕ k0)) Divide et Impera: attack first S-box output

7 / 23

slide-10
SLIDE 10

Classical DPA Attack Scenario

S x1 k1 ℓ1(S(x1 ⊕ k1)) Divide et Impera: attack second S-box output

7 / 23

slide-11
SLIDE 11

Classical DPA Attack Scenario

S x2 k2 ℓ2(S(x2 ⊕ k2)) Divide et Impera: attack third S-box output

7 / 23

slide-12
SLIDE 12

Classical DPA Attack Scenario

S x3 k3 ℓ3(S(x3 ⊕ k3)) Divide et Impera: attack fourth S-box output ...

7 / 23

slide-13
SLIDE 13

BC-based PRF DPA Attack Scenario [MSJ12]

S r0 k0 ℓ0(S(r0 ⊕ k0)) S r0 k1 ℓ1(S(r0 ⊕ k1)) S r0 k2 ℓ2(S(r0 ⊕ k2)) S r0 k3 ℓ3(S(r0 ⊕ k3))

The implementation is parallel The leakage functions ℓi are all equal The subkey words ki are successfully recovered

⇒ Still there is a super-exponential time complexity of an enumeration over Ns to recover the full key, in case of AES: 16! = 244 time complexity

8 / 23

slide-14
SLIDE 14

Contributions

  • 1. Which block cipher best suits a leakage resilient PRF in hardware?
  • 2. Which performance can be achieved for re-keying applications?
  • 3. Is it possible to mount classical DPA attacks in a localized EM setting?

9 / 23

slide-15
SLIDE 15

Efficient Leakage-Resilient PRFs: Block Cipher Design Principles

S r0 k0 S r0 k1 S r0 k2 S r0 k3 Diffusion Box SP-networks:

  • 1. Define the round structure
  • 2. Define the key schedule

10 / 23

slide-16
SLIDE 16

Efficient Leakage-Resilient PRFs: Block Cipher Design Principles

Design Parameter: number of S-boxes Ns and S-box size b Design Criteria: best security vs performance trade-off

Ns 16 32 b = 4 239 295 b = 8 244 2116

Table: Time complexity in the 1st round

Ns 16 32 b = 4 213.4 215.5 b = 8 228.8 238.1

Table: Time complexity in the 2nd round

Ns 16 32 b = 4 432 1051 b = 8 1060 2954

Table: # Tr. CPA VS data complexity

Ns 16 32 b = 4 64 128 b = 8 128 256

Table: Datapath size Nsb

⇒ Our Choice: 4-bit Present S-box with Ns = 32

11 / 23

slide-17
SLIDE 17

Efficient Leakage-Resilient PRFs: Block Cipher Design Principles

Design Parameter: Diffusion layer Design Criteria: Efficient in hardware and not leaking intermediate values

First option: Small-Present pLayer

1 2 3 1 2 3 1 1 1 2 1 3 1 2 1 2 2 2 3 2 3 1 3 2 3 3 3

Issue: HD leaks the relative position of nibbles ...

12 / 23

slide-18
SLIDE 18

Efficient Leakage-Resilient PRFs: Block Cipher Design Principles

Design Parameter: Diffusion layer Design Criteria: Efficient in hardware and not leaking intermediate values

Our proposal: Single-Pattern

1 2 3 1 1 2 2 3 3 1 1 2 2 3 3 1 1 2 2 3 3 1 1 2 2 3 3

The relative offset of inputs bits must be preserved after the permutation ⇒ Our Choice: Single-Pattern

13 / 23

slide-19
SLIDE 19

Efficient Leakage-Resilient PRFs: Block Cipher Design Principles

Design Parameter: Number of rounds Design Criteria: Full diffusion (minimum property for re-keying) ≥ 3 rounds for Ns = 32, b = 4

⇒ Our Choice: 5 rounds

Design Parameter: Key schedule Design Criteria: Efficient and not leaking intermediate values

⇒ Our Choice: No key schedule, simple key addition

14 / 23

slide-20
SLIDE 20

Efficient Leakage-Resilient PRFs: Block Cipher Design Principles

To sum up:

S-box layer: 32 × 4-bit Present S-boxes Diffusion layer: Single-Pattern wire crossing with improved “regularity” Key schedule: Simple key addition as for the LED block cipher Number of rounds: 5 Iterations: 32 for 128-bit nonces x k S P k S P k S P k S P k S P y

Note: intended for re-keying application only !

15 / 23

slide-21
SLIDE 21

Fresh Re-Keying with Efficient Leakage-Resilient PRFs: Implementation Results

g BC Area [kGE] Latency [Clock Cycles] [MSGR10] 8-bit AES [FWR05] 10.7 562 Our PRF 8-bit AES [HAHH06] 7.19 324 Threshold AES [MPL+11] 10.8 266 Our PRF Present(ser) [RPLP08] 4.09 643 Our PRF Present(par) [RPLP08] 4.47 131 Threshold Present [PMK+11] 3.59 578

16 / 23

slide-22
SLIDE 22

Fresh Re-Keying with Efficient Leakage-Resilient PRFs: Localized EM Attacks

Analysis conducted on a depackaged (VQ100) Xilinx Spartan FPGA 3 EM activity measured on the frontside Univariate profiled CPA attacks 17 / 23

slide-23
SLIDE 23

Fresh Re-Keying with Efficient Leakage-Resilient PRFs: Localized EM Attacks

ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðî ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðí ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ðòë ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðê ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðé ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ðòè ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïð ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïï ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïì ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ðòë ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïë ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðð ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðï ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðì ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðë ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðè ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ðç ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïî ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïí ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ðòè ï

18 / 23

slide-24
SLIDE 24

Fresh Re-Keying with Efficient Leakage-Resilient PRFs: Localized EM Attacks

ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïè ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ðòë ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïç ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îî ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îí ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ðòë ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îê ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îé ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ðòë ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» íð ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ðòè ï ïòî ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» íï ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ðòè ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïê ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» ïé ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îð ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îï ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ðòè ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îì ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îë ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ðòè ï ïòî ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îè ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòî ðòì ðòê ë ïð ïë îð îë ë ïð ïë îð îë Õ»§ ²·¾¾´» îç ¨ I ïðî ³ ³ § I ïðî ³ ³ ðòï ðòî ðòí ðòì

19 / 23

slide-25
SLIDE 25

Fresh Re-Keying with Efficient Leakage-Resilient PRFs: Localized EM Attacks

An optimal key enumeration algorithm [VCGRS13] was used to evaluate

the remaining time complexity after localized EM attacks

Yet experimental results suggest security bounds > 280 time complexity 20 / 23

slide-26
SLIDE 26

Fresh Re-Keying with Efficient Leakage-Resilient PRFs: Localized EM Attacks

An optimal key enumeration algorithm [VCGRS13] was used to evaluate

the remaining time complexity after localized EM attacks

Yet experimental results suggest security bounds > 280 time complexity

5 10 15 20 25 5 10 15 20 25 x ⋅ 102 µ m y ⋅ 102 µ m 0.2 0.4 0.6 0.8 1 1.2

20 / 23

slide-27
SLIDE 27

Conclusion

  • 1. We provided block cipher design principles to best suit an efficient

leakage-resilient PRF in hardware

➥ Security should be considered at all abstraction levels

  • 2. We showed that efficient leakage resilient PRFs are valid alternatives for

fresh re-keying in hardware

  • 3. We showed that the key-dependent algorithmic noise is still hard to

exploit, even in a localized EM setting (univariate) Future work:

Full specification of our BC-like proposal Multivariate attacks Randomization countermeasure to thwart localized EM attacks 21 / 23

slide-28
SLIDE 28

References I

Michel Abdalla and Mihir Bellare. Increasing the lifetime of a key: A comparative analysis of the security of re-keying techniques. In Advances in Cryptology, ASIACRYPT ’00, pages 546–559, London, UK, UK, 2000. Springer-Verlag. Martin Feldhofer, Johannes Wolkerstorfer, and Vincent Rijmen. Aes implementation on a grain of sand. Information Security, IEE Proceedings, 152:13 – 20, 2005. Oded Goldreich, Shafi Goldwasser, and Silvio Micali. How to construct random functions.

  • J. ACM, 33(4):792–807, August 1986.
  • P. Hamalainen, T. Alho, M. Hannikainen, and T.D. Hamalainen.

Design and implementation of low-area and low-power aes encryption hardware core. In DSD 2006. 9th EUROMICRO Conference, pages 577–583, 2006. Amir Moradi, Axel Poschmann, San Ling, Christof Paar, and Huaxiong Wang. Pushing the limits: A very compact and a threshold implementation of aes. In KennethG. Paterson, editor, Advances in Cryptology - EUROCRYPT 2011, volume 6632 of LNCS, pages 69–88. Springer Berlin Heidelberg, 2011. Marcel Medwed, Fran¸ cois-Xavier Standaert, Johann Großsch¨ adl, and Francesco Regazzoni. Fresh re-keying: Security against side-channel and fault attacks for low-cost devices. In Daniel J. Bernstein and Tanja Lange, editors, AFRICACRYPT, volume 6055 of LNCS, pages 279–296. Springer, 2010. Marcel Medwed, Fran¸ cois-Xavier Standaert, and Antoine Joux. Towards super-exponential side-channel security with efficient leakage-resilient prfs. In Emmanuel Prouff and Patrick Schaumont, editors, CHES 2012, volume 7428 of LNCS, pages 193–212. Springer Berlin Heidelberg, 2012. Axel Poschmann, Amir Moradi, Khoongming Khoo, Chu-Wee Lim, Huaxiong Wang, and San Ling. Side-channel resistant crypto for less than 2, 300 ge.

  • J. Cryptology, 24(2):322–345, 2011.

22 / 23

slide-29
SLIDE 29

References II

Carsten Rolfes, Axel Poschmann, Gregor Leander, and Christof Paar. Ultra-lightweight implementations for smart devices - security for 1000 gate equivalents. In Gilles Grimaud and Fran¸ cois-Xavier Standaert, editors, CARDIS, volume 5189 of LNCS, pages 89–103. Springer, 2008. Fran¸ cois-Xavier Standaert, Olivier Pereira, Yu Yu, Jean-Jacques Quisquater, Moti Yung, and Elisabeth Oswald. Leakage resilient cryptography in practice. IACR Cryptology ePrint Archive, 2009:341, 2009. Nicolas Veyrat-Charvillon, Benoˆ ıt G´ erard, Mathieu Renauld, and Fran¸ cois-Xavier Standaert. An optimal key enumeration algorithm and its application to side-channel attacks. In Lars R. Knudsen and Huapeng Wu, editors, SAC, volume 7707 of LNCS, pages 390–406. Springer Berlin Heidelberg, 2013. 23 / 23