innovations in permutation based crypto
play

Innovations in permutation-based crypto Joan Daemen based on joint - PowerPoint PPT Presentation

Innovations in permutation-based crypto Joan Daemen based on joint work with Guido Bertoni, Seth Hoffert, Bart Mennink, Michal Peeters, Gilles Van Assche and Ronny Van Keer COINS Winter School, 5-10 May 2019, Finse 1 1 Radboud


  1. Innovations in permutation-based crypto Joan Daemen¹ based on joint work with Guido Bertoni³, Seth Hoffert, Bart Mennink¹, Michaël Peeters², Gilles Van Assche² and Ronny Van Keer² COINS Winter School, 5-10 May 2019, Finse 1 1 Radboud University 2 STMicroelectronics 3 Security Pattern

  2. The simplest possible keyed cryptographic function 2 input … Z ← F K ( m , ℓ )

  3. The ideal cryptographic function Random Oracle Inc.: letter answering service! 3 ▶ What would the ideal cryptographic function look like? ▶ It is called a Random Oracle ( RO ) [Bellare-Rogaway 1993] ▶ Random Oracle can be built but is not practical

  4. Random Oracle Inc. 4 1. Letter with ( m , ℓ ) arrives at Random Oracle Inc.

  5. Random Oracle Inc. 5 2. Manager checks archive for presence of a file ( m , Z )

  6. Random Oracle Inc. 6 3a. If no ( m , Z ) in archive, employee generates random Z with | Z | = ℓ 3b. Else if | Z | < ℓ , employee extends Z to length ℓ with random string

  7. Random Oracle Inc. 4. Manager copies Z 7

  8. Random Oracle Inc. 8 4. Manager puts file with ( m , Z ) (back) in archive

  9. Random Oracle Inc. 9 5. Manager sends response Z truncated to length ℓ to sender

  10. Security notion as a distinguishing game 10 F K ? m, l m, l Z Z Distinguishing game for an Adversary A : ▶ A faces system S that it can query ( m , ℓ ) to get Z ▶ but does not know the world it lives in • in real world S = F K • in ideal world S = RO ▶ in both worlds, A has the specifications of F ▶ A can make queries and do computations ▶ and should guess the world it is in

  11. Security notion: PRF security 11 F K ? m, l m, l Z Z ▶ F is PRF-secure if Pr ( success ) is 1 / 2 + ϵ with ϵ negligible • for any reasonable amount of queries and computation • we call 2 ϵ the ( RO distinguishing) advantage Adv ▶ Quantifying effort of adversary A • online complexity M : sum of data | m | + ℓ over all queries • offline complexity N : computational effort (per some unit) ▶ PRF security of F is a bound on Adv as f ( M , N ) ▶ Implication: for any attack Pr ( succ. | F ) ≤ f ( M , N ) + Pr ( succ. |RO )

  12. What can we do with (PRF) security bounds? 12 F K ? m, l m, l Z Z ▶ We cannot prove a bound for any concrete F ▶ But we can formulate one and use in a security claim for F • statement on expected security • made by the designers (or standardization organization) ▶ Claim serves as challenge for cryptanalysts • break: distinguishing attack with Adv > f ( M , N ) ▶ Claim serves as security specification for user • …as long as it is not broken ▶ Assurance grows as years and public scrutiny pile up

  13. Back to our cryptographic function F What can we do with a concrete F ? Say we have: with claim, say, N 2 256 for K chosen uniformly from space of 256-bit keys 13 input … Adv ≤ 2 256 + M 2

  14. Stream encryption 14 nonce plaintext = ciphertext

  15. Message authentication (MAC) 15 plaintext plaintext

  16. 16 Authenticated encryption nonce plaintext plaintext = ciphertext

  17. String sequence input and incrementality F K We call this: doubly-extendable cryptographic keyed function deck function 17 packet #1 packet #2 packet #3 packet #1 packet #2 packet #3 ( P ( 3 ) ◦ P ( 2 ) ◦ P ( 1 ) )

  18. Session authenticated encryption (SAE) [KT, SAC 2011] Initialization taking nonce N Wrap taking metadata A and plaintext P return tag T of length t 18 A (1) P (1) A (2) P (2) A (3) P (3) K, N 1 T (0) C (1) T (1) C (2) T (3) C (3) T (2) T ← 0 t + F K ( N ) history ← N C ← P + F K ( A ◦ history ) T ← 0 t + F K ( C ◦ A ◦ history ) history ← C ◦ A ◦ history return ciphertext C of length | P | and tag T of length t

  19. Synthetic initialization value (SIV) of [KT, eprint 2016/1188] Unwrap taking metadata A , ciphertext C and tag T Variant of SIV of [Rogaway & Shrimpton, EC 2006] 19 P A F K F K T C P ← C + F K ( T ◦ A ) τ ← 0 t + F K ( P ◦ A ) if τ ̸ = T then return error! else return plaintext P of length | C |

  20. Wide block cipher (WBC), as in [KT, eprint 2016/1188] L Inspired by HHFHFH of [Bernstein, Nandi & Sarkar, Dagstuhl 2016] R C Encipher P with K and tweak W L 0 R 20 R 0 P ʹ left P ʹ right W ( L , R ) ← split ( P ) H K (... ° 0) ← R 0 + H K ( L ◦ 0 ) ← L + G K ( R ◦ W ◦ 1 ) G K (... ° 1) ← R + G K ( L ◦ W ◦ 0 ) ← L 0 + H K ( R ◦ 1 ) G K (... ° 0) ← L || H K (... ° 1) return ciphertext C of length | P | C left C right

  21. How to build a deck function? By icelight (flickr.com) 21

  22. Sponge [Keccak Team, Ecrypt 2008] M 2 N 22 input output r 0 f f f f f f outer inner c 0 absorbing squeezing ▶ Uses b -bit permutation, has rate r and capacity c with b = r + c ▶ Taking K as first part of input gives a deck function (almost) 2 c + 1 + ▶ We can prove Adv < 2 | K | if f and K are randomly chosen ▶ So sponge construction is sound but f must still be built

  23. Intermezzo: how to build a suitable permutation f ? constants 23 ▶ Same as a block cipher (e.g. AES): • design an efficient round function and repeat that • resistance to attacks grows (hopefully fast) with # rounds • determine # rounds that is broken and take some more ▶ Steps of a good round function: • nonlinear step: combines nearby bits non-linearly • mixing layer: combines nearby bits linearly • transposition layer: moves nearby bits far away ▶ Difference with block ciphers • no key schedule nor round keys but instead round • no need for efficient inverse

  24. 24 For example: Keccak- p [ 1600 , n r ] ▶ Bit-oriented round function with high amount of symmetry: • software with cyclic shift and Boolean instructions only • fast and compact in hardware ▶ Non-linear step χ : algebraic degree 2 ▶ Lightweight round function with heavy inverse

  25. 25 Speed up absorbing: sponge → donkeySponge [KT, DIAC 2012]

  26. Incrementality: duplex [Keccak Team, SAC 2011] 26 σ 0 σ 1 σ 2 Z 0 Z 1 Z 2 pad trunc pad trunc pad trunc r 0 f f f outer … inner c 0 initialize duplexing duplexing duplexing

  27. Very popular: 27 Speed up: duplex → monkeyDuplex [KT, DIAC 2012] ▶ Adopted by half a dozen CAESAR submissions ▶ including our proposal Ketje [KT, CAESAR 2014]

  28. Consolidation: Full-state keyed duplex [Mennink, Reyhanitabar, & Vizar, Asiacrypt 2015] [Daemen, Mennink & Van Assche, Asiacrypt 2017] 28 Z ¾ Z ¾ Z ¾ K f f f … ± iv

  29. How to build a parallelizable deck function? by Peter Miller (flick.com) 29

  30. How to build a parallelizable deck function? by Barilla Food Service 29

  31. Farfalle: early attempt [KT 2014-2016] 30 M 0 k k f f Z 0 0 0 M 1 k k f f Z 1 1 1 … … M i k k f f Z j i j ▶ Reminds of Protected Counter Sums [Bernstein, “stretch”, JOC 1999] ▶ In Protected Counter Sums, f is assumed to be a PRF ▶ We had in mind for f : Keccak- p [ 1600 , n r ] with few rounds

  32. Problem of early Farfalle: higher-order-differential collisions 31 M 0 k k f f Z 0 0 0 M 1 k k f f Z 1 1 1 … … M i k k f f Z j i j ▶ Differential ∆ v f ( x ) = f ( x + v ) + f ( x ) is kind of derivative of f ▶ The algebraic degree of ∆ v f is at most that of f minus one ▶ Derive ∆ v f in turn: ∆ u ∆ v f ( x ) = f ( x + v + u ) + f ( x + u ) + f ( x + v ) + f ( x ) ▶ d -th derivative is ∆ V f ( x ) = ∑ v ∈ V f ( x + v ) with V a vector space ▶ Degree of n r -round Keccak- p [ 1600 , n r ] : 2 n r ▶ if dim ( V ) = 2 n r : ∆ V f ( x ) is a constant

  33. Problem of early Farfalle: higher-order-differential collisions (cont’d) Collision-generating attack: 32 M 0 k k f f Z 0 0 0 M 1 k k f f Z 1 1 1 … … M i k k f f Z j i j ▶ Choose a message m of 2 n r blocks m i that form a vector space ▶ Encodings of block numbers also form a vector space ▶ Inputs to f also form a vector space ▶ Accumulator is a constant independent of m or k ▶ n -fold multicollision with online cost M = n 2 2 n r input blocks ▶ With carefully chosen blocks m i this reduces to M = n 2 2 n r − 1 ▶ Practical up to n r = 6: each such message is only 0 . 5 Terabyte

  34. Higher-order-differential collisions: attempts at mitigation that AES S-box has differential uniformity 4 33 M 0 k k f f Z 0 0 0 M 1 k k f f Z 1 1 1 … … M i k k f f Z j i j Fancy encoding enc ( i ) of block numbers ▶ To fully prevent high-dimensional affine spaces at f input ▶ We tried many things … ▶ Nicest one: enc ( i ) = x i mod p ( x ) ∥ x − i mod p ( x ) • with p ( x ) an primitive polynomial • computing enc ( i + 1 ) from enc ( i ) takes two LFSR updates • No affine spaces exist with dimension > 2 for same reason

  35. Higher-order-differential collisions: chosen mitigation space at input to f is infeasible 34 ▶ Not to prevent affine spaces but just to make them hard to find ▶ Computing of f -input for block i : m i + ( x i k ) mod p ( x ) ▶ We call this input mask rolling • k is full-width secret mask derived from user key K • If p ( x ) not sparse, choosing m i to form exploitable affine ▶ Additional benefit: increases rate of blocks m i to full-width K ∥ 10 ∗ p b k ′ k i + 2 c c p c p e m 0 z 0 e k ′ k c p c p e m 1 z 1 e p d … … k ′ i k c p c p e m i j z j e

Recommend


More recommend