Innovations in symmetric cryptography Joan Daemen - - PowerPoint PPT Presentation

innovations in symmetric cryptography
SMART_READER_LITE
LIVE PREVIEW

Innovations in symmetric cryptography Joan Daemen - - PowerPoint PPT Presentation

Innovations in symmetric cryptography Joan Daemen STMicroelectronics, Belgium SSTIC, Rennes, June 5, 2013 1 / 46 Outline 1 The origins 2 Early work 3 Rijndael 4 The sponge construction and Keccak 5 Conclusions 2 / 46 The origins


slide-1
SLIDE 1

Innovations in symmetric cryptography

Joan Daemen

STMicroelectronics, Belgium

SSTIC, Rennes, June 5, 2013

1 / 46

slide-2
SLIDE 2

Outline

1

The origins

2

Early work

3

Rijndael

4

The sponge construction and Keccak

5

Conclusions

2 / 46

slide-3
SLIDE 3

The origins

Outline

1

The origins

2

Early work

3

Rijndael

4

The sponge construction and Keccak

5

Conclusions

3 / 46

slide-4
SLIDE 4

The origins

Symmetric crypto around ’89

Stream ciphers: LFSR-based schemes

no actual design many mathematical papers on linear complexity

Block ciphers: DES

design criteria not published DC [Biham-Shamir 1990]: “DES designers knew what they were doing” LC [Matsui 1992]: “well, kind of”

Popular paradigms, back then (but even now)

property-preservation: strong cipher requires strong S-boxes confusion (nonlinearity): distance to linear functions diffusion: (strict) avalanche criterion you have to trade them off

4 / 46

slide-5
SLIDE 5

The origins The banality of DES

Data encryption standard: datapath

5 / 46

slide-6
SLIDE 6

The origins The banality of DES

Data encryption standard: F-function

6 / 46

slide-7
SLIDE 7

The origins Cellular automata based crypto

A different angle: cellular automata

Simple local evolution rule, complex global behaviour Popular 3-bit neighborhood rule: a′

i = ai−1 ⊕ (ai OR ai+1)

7 / 46

slide-8
SLIDE 8

The origins Cellular automata based crypto

Crypto based on cellular automata

CA guru Stephen Wolfram at Crypto ’85:

looking for applications of CA concrete stream cipher proposal

Crypto guru Ivan Damgård at Crypto ’89

hash function from compression function proof of collision-resistance preservation compression function with CA

Both broken

stream cipher in [Meier-Staffelbach, Eurocrypt ’91] hash function in [Daemen et al., Asiacrypt ’91]

8 / 46

slide-9
SLIDE 9

The origins Cellular automata based crypto

The trouble with Damgård’s compression function

9 / 46

slide-10
SLIDE 10

The origins Cellular automata based crypto

The trouble with Damgård’s compression function

9 / 46

slide-11
SLIDE 11

Early work

Outline

1

The origins

2

Early work

3

Rijndael

4

The sponge construction and Keccak

5

Conclusions

10 / 46

slide-12
SLIDE 12

Early work

Salvaging CA-based crypto

First experiments: investigate cycle distributions The following rule exhibited remarkable cycle lengths:

γ: flip the bit iff 2 cells at the right are not 01

Invertible if periodic boundary conditions and odd length

11 / 46

slide-13
SLIDE 13

Early work

Salvaging CA-based crypto

First experiments: investigate cycle distributions The following rule exhibited remarkable cycle lengths:

γ: flip the bit iff 2 cells at the right are not 01

nonlinear , but unfortunately, weak diffusion

11 / 46

slide-14
SLIDE 14

Early work

Salvaging CA-based crypto, second attempt

Found invertible 5-bit neighborhood rules with good diffusion Turned out to be composition of γ and following rule

θ: add to bit the sum of 2 cells at the right modulo 2

Idea: alternate γ (nonlinearity) and variant of θ (mixing)

12 / 46

slide-15
SLIDE 15

Early work

Salvaging CA-based crypto, second attempt

Found invertible 5-bit neighborhood rules with good diffusion Turned out to be composition of γ and following rule

θ: add to bit the sum of 2 cells at the right modulo 2

diffusion much better but still slow

12 / 46

slide-16
SLIDE 16

Early work

Salvaging CA-based crypto, third attempt

Abandon locality by adding in bit transpositions:

π: move bit in cell i to cell 9i modulo the length

Round function: R = π ◦ θ ◦ γ

13 / 46

slide-17
SLIDE 17

Early work

Salvaging CA-based crypto, third attempt

Abandon locality by adding in bit transpositions:

π: move bit in cell i to cell 9i modulo the length

full diffusion after few rounds!

13 / 46

slide-18
SLIDE 18

Early work

Resulting designs

Round function composed of specialized steps

γ: non-linearity θ: mixing π: transposition ι: addition of some constants for breaking symmetry

Designs directly resulting from this

Cellhash (1991): hash function Subterranean (1992), StepRightUp (1994) and Panama (1997): hash/stream cipher modules 3-Way and BaseKing (1993-94): block ciphers

Theoretical basis: DC and LC Supporting concepts introduced in [PhD Thesis Daemen, 1995]

branch number correlation matrices wide trail strategy

14 / 46

slide-19
SLIDE 19

Rijndael

Outline

1

The origins

2

Early work

3

Rijndael

4

The sponge construction and Keccak

5

Conclusions

15 / 46

slide-20
SLIDE 20

Rijndael

March 1995: last month at COSIC, after PhD defense

Blowfish [Schneier

, 1993]

F function: 8-to-32-bit Sboxes Derived from key My impression

Great potential Only 4 TLU and 3 additions Very high diffusion

Cryptanalysis contest in 1994 Won by Serge Vaudenay

Exploiting collisions In S-box: weak keys In F-function Published [Vaudenay, 1996]

But can it be fixed?

Yes, it can!

16 / 46

slide-21
SLIDE 21

Rijndael

March 1995: a month in Limbo; the Spark!

Mixing ◦ S-box Both invertible 4 TLU and 4 XORs smuggled my idea out of COSIC … S-boxes

just take a single one

  • ptimize nonlinearity

criteria defined by DC and LC

Linear mixing layer

  • ptimize diffusion

Clearly big potential! Challenge: finding right S-box and mixing layer

17 / 46

slide-22
SLIDE 22

Rijndael

March 1995: a month in Limbo; the Spark!

Mixing ◦ S-box Both invertible 4 TLU and 4 XORs smuggled my idea out of COSIC … S-boxes

just take a single one

  • ptimize nonlinearity

criteria defined by DC and LC

Linear mixing layer

  • ptimize diffusion

Clearly big potential! Challenge: finding right S-box and mixing layer

17 / 46

slide-23
SLIDE 23

Rijndael

March 1995: a month in Limbo; the Spark!

Mixing ◦ S-box Both invertible 4 TLU and 4 XORs smuggled my idea out of COSIC … S-boxes

just take a single one

  • ptimize nonlinearity

criteria defined by DC and LC

Linear mixing layer

  • ptimize diffusion

Clearly big potential! Challenge: finding right S-box and mixing layer

17 / 46

slide-24
SLIDE 24

Rijndael

March 1995: a month in Limbo; the Spark!

Mixing ◦ S-box Both invertible 4 TLU and 4 XORs smuggled my idea out of COSIC … S-boxes

just take a single one

  • ptimize nonlinearity

criteria defined by DC and LC

Linear mixing layer

  • ptimize diffusion

Clearly big potential! Challenge: finding right S-box and mixing layer

17 / 46

slide-25
SLIDE 25

Rijndael

March 1995: a month in Limbo; the Spark!

Mixing ◦ S-box Both invertible 4 TLU and 4 XORs smuggled my idea out of COSIC … S-boxes

just take a single one

  • ptimize nonlinearity

criteria defined by DC and LC

Linear mixing layer

  • ptimize diffusion

Clearly big potential! Challenge: finding right S-box and mixing layer

17 / 46

slide-26
SLIDE 26

Rijndael

Two years earlier …

Summer 1993: COSIC gets some classified contract work Supervisors decide to put on it: Joan Daemen and Vincent Rijmen

18 / 46

slide-27
SLIDE 27

Rijndael

The road to Rijndael

Switch back to autumn 1995 I decided to contact Vincent to work out my ideas

this lead to the following results

SHARK [SHARK, FSE 1996]

link with maximum distance separable (MDS) codes S-box: multiplicative inverse in GF(28) [Nyberg, 1994]

Square [Square, FSE 1997]

more efficient thanks to byte transposition layer state bytes arranged in a 4 × 4 square

BKSQ [BKSQ, Cardis 1998]:

support for non-square states

NIST AES call in autumn 1997

we defined Rijndael using these ideas and submitted it

19 / 46

slide-28
SLIDE 28

Rijndael

AES finalists: speed on Pentium

Percentage executed by the time Rijndael finishes:

20 / 46

slide-29
SLIDE 29

Rijndael

Rijndael (team) after AES selection

October 2, 2000: NIST announces Rijndael will be AES Security of AES

most heard criticism: too simple to be secure several times announced broken, false alarms current status: some dents in armor due to academic attacks

biclique attacks [Khovratovich, Rechberger , Bogdanov, 2011] up to a factor 4 more efficient than exhaustive key search

Follow-up work with Vincent, some highlights

Rijndael book at Springer , the reference of block cipher design new insights in differential propagation in AES-like functions LC and DC statistics of random mappings Pelican-MAC: 2.5 times faster than AES CBC-MAC

21 / 46

slide-30
SLIDE 30

The sponge construction and Keccak

Outline

1

The origins

2

Early work

3

Rijndael

4

The sponge construction and Keccak

5

Conclusions

22 / 46

slide-31
SLIDE 31

The sponge construction and Keccak Compression function and domain extension

See how mainstream hash functions were going

Mainstream hash functions have two layers:

Fixed-input-length compression function Iterating mode: domain extension

Merkle-Damgård iterating mode: very simple and elegant Yes, but can we have collision-resistance preservation?

23 / 46

slide-32
SLIDE 32

The sponge construction and Keccak Merkle-Damgård strengthening!

The iterating mode

Merkle-Damgård with strengthening Yes, but what about security when being used as a MAC?

24 / 46

slide-33
SLIDE 33

The sponge construction and Keccak Indifferentiable from a Random Oracle!

The iterating mode

Enveloped Merkle-Damgård Yes, but we often need long outputs, e.g., see PKCS#1, TLS, …

25 / 46

slide-34
SLIDE 34

The sponge construction and Keccak Brilliant!

The iterating mode

Mask generating function construction This does what we need!

26 / 46

slide-35
SLIDE 35

The sponge construction and Keccak The remaining problem: designing a compression function

The compression function

Let’s put in a block cipher Yes, but collisions are easy so collision-resistance preservation …

27 / 46

slide-36
SLIDE 36

The sponge construction and Keccak OK, OK, add a feedforward

The compression function

Block cipher in Davies-Meyer mode That’s it!

28 / 46

slide-37
SLIDE 37

The sponge construction and Keccak Some elegance and simplicity was lost along the road …

What we end up with

Remains to do: building a suitable block cipher …

29 / 46

slide-38
SLIDE 38

The sponge construction and Keccak Refactoring

Keccak Team to the rescue!

Michaël Peeters, Guido Bertoni, Gilles Van Assche and Joan Daemen

30 / 46

slide-39
SLIDE 39

The sponge construction and Keccak Refactoring

Do we really need a block cipher?

No diffusion from data path to key (and tweak) schedule Let’s remove these artificial barriers… That’s an iterative permutation!

31 / 46

slide-40
SLIDE 40

The sponge construction and Keccak Refactoring

Do we really need a block cipher?

No diffusion from data path to key (and tweak) schedule Let’s remove these artificial barriers… That’s an iterative permutation!

31 / 46

slide-41
SLIDE 41

The sponge construction and Keccak Refactoring

Do we really need a block cipher?

No diffusion from data path to key (and tweak) schedule Let’s remove these artificial barriers… That’s an iterative permutation!

31 / 46

slide-42
SLIDE 42

The sponge construction and Keccak Refactoring

Let’s re-factor the hashing mode

Goal: hashing mode that is sound and simple

with good level of security against generic attacks calling an iterated permutation rather than a block cipher

Remaining problem: design of iterated permutation

round function: good approaches known asymmetry: round constants

Advantage of permutation compared to block ciphers:

less barriers ⇒ more diffusion no more need for efficient decryption no more worries about key schedule

32 / 46

slide-43
SLIDE 43

The sponge construction and Keccak The sponge construction

The sponge construction

Arbitrary input and output length Parameters: width b, rate r and capacity c with b = c + r Proven sound in indifferentiability framework [Maurer et al, 2004]

abandoning property preservation paradigm security against generic attacks

33 / 46

slide-44
SLIDE 44

The sponge construction and Keccak The sponge construction

Permutation-based hash function

Hashing

34 / 46

slide-45
SLIDE 45

The sponge construction and Keccak The sponge construction

Permutation-based hash function

Hashing Salted hashing

34 / 46

slide-46
SLIDE 46

The sponge construction and Keccak The sponge construction

Permutation-based hash function

Hashing …Can be as slow as you like it!

34 / 46

slide-47
SLIDE 47

The sponge construction and Keccak The sponge construction

Permutation-based mask generating function

Key derivation function in SSL, TLS Full-domain hashing in public key cryptography

electronic signatures RSA PSS [PKCS#1] encryption RSA OAEP [PKCS#1] key establishment RSA KEM [IEEE Std 1363a]

35 / 46

slide-48
SLIDE 48

The sponge construction and Keccak The sponge construction

Permutation-based MACing

f f Key … Padded message f f f MAC

No more need for HMAC [FIPS 198] for sponge HMAC plugs security hole in SHA-1 and SHA-2

36 / 46

slide-49
SLIDE 49

The sponge construction and Keccak The sponge construction

Permutation-based (stream) encryption

f f Key IV f Key stream

Keystream generation

37 / 46

slide-50
SLIDE 50

The sponge construction and Keccak The sponge construction

Permutation-based authenticated encryption

f f Key … Padded message IV f Key stream f f MAC

Authentication and encryption in a single pass! Secure messaging (SSL/TLS, SSH, IPSEC …) Duplex construction [Duplex, SAC 2011]

generic security equivalent to sponge construction

  • ther applications include reseedable PRNG

38 / 46

slide-51
SLIDE 51

The sponge construction and Keccak The sponge construction

Keccak: the Seven Permutation Army

(5 × 5) lanes up to 64-bit each Our SHA-3 submission Sponge calling one of 7 permutations:

25, 50, 100, 200, 400, 800, 1600 bits toy → lightweight → fastest

repetition of a simple round function

lightweight and flexible inspired by Subterranean, etc. innovative, operating on a 3D state

large safety margin

number of rounds: 24 best attacks known: 5 rounds [Dinur

, Dunkelman, Shamir , 2012-13]

39 / 46

slide-52
SLIDE 52

The sponge construction and Keccak The sponge construction

Keccak: the Seven Permutation Army

(5 × 5) lanes up to 64-bit each First, choose your permutation …

e.g. width = 1600

…then choose the rate and capacity

such that rate + capacity = 1600

Security-speed trade-offs using the same permutation: Rate Capacity Strength Speed 1344 256 128 ×1.312 1216 384 192 ×1.188 1088 512 256 ×1.063 1024 576 288 1.000

39 / 46

slide-53
SLIDE 53

The sponge construction and Keccak The sponge construction

NIST SHA-3: a tough competition

ARIRANG AURORA BLAKE Blender BOOLE CHI CRUNCH CubeHash DCH EDON-R EnRUPT ESSENCE FSB Fugue Grøstl JH LANE Lesamnta Luffa MCSSHA3 MD6 Sgàil Shabal SHAMATA SIMD Skein StreamHash SWIFFTX T angle TIB3 T wister Vortex WaMM HASH 2X Maraca Ponic ZK-Crypt Waterfall Sarmal BMW SANDstorm Spectral Hash DynamicSHA NKS2D Abacus MeshHash DynamicSHA 2 Khichidi-1 ECOH LUX NaSHA Hamsi Keccak SHAvite-3 ECHO Cheetah

2005 2006 2007 2008 2009 2010 2011 2012 16/06/2009

[courtesy of Christophe De Cannière]

40 / 46

slide-54
SLIDE 54

The sponge construction and Keccak The sponge construction

Efficiency of Keccak in hardware

From Kris Gaj’s presentation at SHA-3, Washington 2012:

41 / 46

slide-55
SLIDE 55

The sponge construction and Keccak The sponge construction

Long-term effort

Rumours about NIST call for hash functions (late 2005)

forming of Keccak Team starting point: fixing Panama [Daemen, Clapp, FSE 1998]

RadioGatún [Keccak team, NIST 2nd hash workshop 2006]

variable-length output, streaming oriented for security claim: sponge functions [Keccak team, Ecrypt hash, 2007]

RadioGatún confidence crisis (2007-2008)

third-party and our own cryptanalysis did not inspire confidence NIST SHA-3 deadline approaching … U-turn: design a sponge with strong permutation f: Keccak

October 2, 2012: NIST announces Keccak will be SHA-3 Ongoing work:

tree hashing and Sakura dedicated keyed modes (CAESAR competition), protection against side-channel attacks …

42 / 46

slide-56
SLIDE 56

Conclusions

Outline

1

The origins

2

Early work

3

Rijndael

4

The sponge construction and Keccak

5

Conclusions

43 / 46

slide-57
SLIDE 57

Conclusions

Conclusions: trying to do things right

re-factoring over patching

fresh AES instead of DES-derivative sponge instead of trying to fix Merkle-Damgård, e.g. Haifa Keccak structure instead of just a heavier ARX

simplicity over complexity

single S-box in AES instead of several different ones permutation-based instead of block-cipher based crypto Keccak: CA-based mappings instead of S-boxes and MDS

result-focused over publication-driven

hard to get design ideas published examples: original sponge paper , sound tree hashing turn out to be influential in the long run …after linear complexity, T-functions, cube attacks etc. have long been forgotten

44 / 46

slide-58
SLIDE 58

Conclusions

Conclusions: team up with critical minds

How to build clean designs?

try out many ideas throw most of them away keep the good ones

The process: collaboration and confrontation

in a team with critical minds

  • verlapping competences rather than complementary

not too much ego please

Great to work with Vincent, Guido, Michaël and Gilles!

Rijndael/AES: ubiquitous by now and security still solid sponge/duplex: new permutation-based crypto paradigm Keccak/SHA-3: common sense made it to hashing, at last

45 / 46

slide-59
SLIDE 59

Conclusions

Questions?

Thanks for your attention!

Q?

More information on http://sponge.noekeon.org/ http://keccak.noekeon.org/

46 / 46