Symmetric-key Cryptography: an Engineering Perspective Nicky Mouha - - PowerPoint PPT Presentation

symmetric key cryptography an engineering perspective
SMART_READER_LITE
LIVE PREVIEW

Symmetric-key Cryptography: an Engineering Perspective Nicky Mouha - - PowerPoint PPT Presentation

Symmetric-key Cryptography: an Engineering Perspective Nicky Mouha 1 ESAT/COSIC, KU Leuven and iMinds, Belgium 2 Project-team SECRET, Inria, France ASK 2014 December 19, 2014 1 / 44 Overview Engineering Perspective Design, analysis,


slide-1
SLIDE 1

Symmetric-key Cryptography: an Engineering Perspective

Nicky Mouha

1ESAT/COSIC, KU Leuven and iMinds, Belgium 2Project-team SECRET, Inria, France

ASK 2014 — December 19, 2014

1 / 44

slide-2
SLIDE 2

Overview

Engineering Perspective

  • Design, analysis, implementation
  • Basic concepts and techniques

2 / 44

slide-3
SLIDE 3

Overview

Engineering Perspective

  • Design, analysis, implementation
  • Basic concepts and techniques

Two Parts

  • Hash functions
  • MAC algorithms

2 / 44

slide-4
SLIDE 4

Overview

Engineering Perspective

  • Design, analysis, implementation
  • Basic concepts and techniques

Two Parts

  • Hash functions
  • MAC algorithms

Simplified View

  • Small inaccuracies, details missing
  • Incomplete study: citations missing

2 / 44

slide-5
SLIDE 5

Part I: Hash Functions

3 / 44

slide-6
SLIDE 6

Hash Function

m h(m) h

Hash Function h

  • Generates a short “fingerprint” of a message

Security Requirements

  • One-way function:

given Y , hard to find m : h(m) = Y

  • Collision resistant function:

hard to find m = m′ : h(m) = h(m′)

  • . . .

SHA-3 Competition (2008-2012)

4 / 44

slide-7
SLIDE 7

Hash Function

m h(m) h

Hash Function h

  • Generates a short “fingerprint” of a message

Security Requirements

  • One-way function:

given Y , hard to find m : h(m) = Y

  • Collision resistant function:

hard to find m = m′ : h(m) = h(m′)

  • . . .

SHA-3 Competition (2008-2012)

4 / 44

slide-8
SLIDE 8

Permutation-Based Hash Functions

Hash Functions Based on Permutations

  • Simpler to design: no key schedule
  • Block-cipher-based: see later

x y π K E P C κ b b b b

(Cryptographic) Permutation

  • Provable security: statistical object (random permutation)
  • Cryptanalysis: deterministic algorithm (no “distinguishers”)

5 / 44

slide-9
SLIDE 9

Hash Function Rate

Hash Function Rate α

  • α =

data processed per permutation call (in bits) permutation size (in bits)

  • Note: various definitions of “rate” exist!

6 / 44

slide-10
SLIDE 10

Hash Function Rate

Hash Function Rate α

  • α =

data processed per permutation call (in bits) permutation size (in bits)

  • Note: various definitions of “rate” exist!

Ideal Construction

  • Rate-1 hash function: α = 1

6 / 44

slide-11
SLIDE 11

Rate-1 Hash Function: First Attempt

Simplest Rate-1 Hash Function

m1 π π . . . π h(m) m2 mℓ n n n

7 / 44

slide-12
SLIDE 12

Rate-1 Hash Function: First Attempt

Collision: Correcting Block Attack

m1 π π . . . π h(m) m2 mℓ n n n π π . . . π h(m) m′

2

mℓ⊕x ⊕ y n n n m′

1

x y

8 / 44

slide-13
SLIDE 13

Rate-1 Hash Function: Second Attempt

Another Rate-1 Hash Function

m1 π m1 π . . . π mℓ h(m) m2 m2 mℓ n n n

9 / 44

slide-14
SLIDE 14

Rate-1 Hash Function: Second Attempt

Observation

π π . . . π mℓ h(m) mℓ n n m1 m1 x x n m1 x m1 x

10 / 44

slide-15
SLIDE 15

Rate-1 Hash Function: Second Attempt

Collision Attack (Black et al., Crypto ’02)

π π . . . π mℓ h(m) mℓ n n π π . . . π mℓ h(m) n n n m′

1

m′

1

x′ x′ mℓ m′

1

x′ m′

1

x′ m1 m1 x x n m1 x m1 x

11 / 44

slide-16
SLIDE 16

Impossibility Result

f1 f2 π n n n n mi hi−1 hi n

Black et al. (Eurocrypt ’05)

  • Compression function from n-bit permutation
  • Information-theoretic: f1, f2 can be any function
  • Generic collision attack: at most n + ⌈log2(n)⌉ queries

12 / 44

slide-17
SLIDE 17

Security/Efficiency Tradeoffs

f1 v w f2 π3 f3 π2 g mn sn n n n n n n π1

Rogaway-Steinberger (Eurocrypt ’08)

  • Compression function from k n-bit permutations
  • Information-theoretic: fi can be any function
  • Generic collision attack: 2n[1−(m−0.5s)/k]

13 / 44

slide-18
SLIDE 18

Security/Efficiency Tradeoffs

f1 v w f2 π3 f3 π2 g mn sn n n n n n n π1

Rogaway-Steinberger (Eurocrypt ’08)

  • Compression function from k = 3 n-bit permutations
  • Information-theoretic: fi can be any function, m = 2, s = 1
  • Generic collision attack: 2n[1−(2−0.5·1)/3] = 2n/2

14 / 44

slide-19
SLIDE 19

Security/Efficiency Tradeoffs

π1 v1 w π3 ⊕ π2 ⊕ n n n n n n n n v2 n

Mennink-Preneel (Crypto ’12)

  • Compression function from k = 3 n-bit permutations
  • Constructions with only XORs, first systematic analysis
  • Optimal collision resistance: 2n/2

15 / 44

slide-20
SLIDE 20

Security/Efficiency Tradeoffs

v w

π

2n n

Why Not One Big Permutation?

  • 2n-bit permutation instead of n-bit
  • Same generic collision attack: 2n/2
  • More efficient than three n-bit permutations?

16 / 44

slide-21
SLIDE 21

Scaling Law

“When the input size of a symmetric-key primitive doubles, the number of operations (roughly) doubles as well”.

17 / 44

slide-22
SLIDE 22

Scaling Law

“When the input size of a symmetric-key primitive doubles, the number of operations (roughly) doubles as well”. Remarks

  • Not intuitive: b → b bits: (2b)2b = 2b2b functions
  • Not rigorous: based on design choices and attacks
  • How to count “operations”?

17 / 44

slide-23
SLIDE 23

Scaling Law

“When the input size of a symmetric-key primitive doubles, the number of operations (roughly) doubles as well”. Remarks

  • Not intuitive: b → b bits: (2b)2b = 2b2b functions
  • Not rigorous: based on design choices and attacks
  • How to count “operations”?

Next Slides: Scaling Law Examples

17 / 44

slide-24
SLIDE 24

Scaling Law: Fixed Word Size

PHOTON: 4-bit Words

  • 100/144/196/256-bit permutation: 12 rounds
  • (288-bit permutation: 12 rounds, but 8-bit word size)

18 / 44

slide-25
SLIDE 25

Scaling Law: Fixed Word Size

PHOTON: 4-bit Words

  • 100/144/196/256-bit permutation: 12 rounds
  • (288-bit permutation: 12 rounds, but 8-bit word size)

Rijndael (256-bit key): 8-bit Words

  • 128/192/256-bit block size: 14 rounds

18 / 44

slide-26
SLIDE 26

Scaling Law: Fixed Word Size

PHOTON: 4-bit Words

  • 100/144/196/256-bit permutation: 12 rounds
  • (288-bit permutation: 12 rounds, but 8-bit word size)

Rijndael (256-bit key): 8-bit Words

  • 128/192/256-bit block size: 14 rounds

Skein: 64-bit Words

  • 256/512-bit block/key size: 72 rounds
  • 1024-bit block/key size: 80 rounds
  • Overdesign? Best (non-biclique) attack is on 36 rounds

(Yu et al., SAC ’13)

18 / 44

slide-27
SLIDE 27

Scaling Law: Variable Word Size

BLAKE

  • 960-to-256-bit: 14 rounds (32-bit words)
  • 1920-to-512-bit: 16 rounds (64-bit words)

19 / 44

slide-28
SLIDE 28

Scaling Law: Variable Word Size

BLAKE

  • 960-to-256-bit: 14 rounds (32-bit words)
  • 1920-to-512-bit: 16 rounds (64-bit words)

SHA-2

  • SHA-256: 768-to-256-bit: 64 rounds (32-bit words)
  • SHA-512: 1536-to-512 bit: 80 rounds (64-bit words)

19 / 44

slide-29
SLIDE 29

Scaling Law: Variable Word Size

BLAKE

  • 960-to-256-bit: 14 rounds (32-bit words)
  • 1920-to-512-bit: 16 rounds (64-bit words)

SHA-2

  • SHA-256: 768-to-256-bit: 64 rounds (32-bit words)
  • SHA-512: 1536-to-512 bit: 80 rounds (64-bit words)

Keccak

  • 800-bit permutation: 22 rounds (32-bit words)
  • 1600-bit permutation: 24 rounds (64-bit words)
  • Note: zero-sum distinguisher for full-round 1600-bit per-

mutation (Boura et al., Duan-Lai)

19 / 44

slide-30
SLIDE 30

Scaling Law: Counterexamples?

Grøstl

  • 512-bit permutation: 10 rounds
  • 1024-bit permutation: 14 rounds

20 / 44

slide-31
SLIDE 31

Scaling Law: Counterexamples?

Grøstl

  • 512-bit permutation: 10 rounds
  • 1024-bit permutation: 14 rounds
  • Close! If 15 rounds: three small or one big: same cost

20 / 44

slide-32
SLIDE 32

Scaling Law: Counterexamples?

Grøstl

  • 512-bit permutation: 10 rounds
  • 1024-bit permutation: 14 rounds
  • Close! If 15 rounds: three small or one big: same cost
  • Best attacks: resp. 9/10 rounds (Jean et al., FSE ’12)

20 / 44

slide-33
SLIDE 33

Scaling Law: Counterexamples?

Grøstl

  • 512-bit permutation: 10 rounds
  • 1024-bit permutation: 14 rounds
  • Close! If 15 rounds: three small or one big: same cost
  • Best attacks: resp. 9/10 rounds (Jean et al., FSE ’12)

Spongent

  • b-bit permutation, r = b/2 rounds, b/4 S-boxes/round:

b2/8 S-boxes in total

20 / 44

slide-34
SLIDE 34

Scaling Law: Counterexamples?

Grøstl

  • 512-bit permutation: 10 rounds
  • 1024-bit permutation: 14 rounds
  • Close! If 15 rounds: three small or one big: same cost
  • Best attacks: resp. 9/10 rounds (Jean et al., FSE ’12)

Spongent

  • b-bit permutation, r = b/2 rounds, b/4 S-boxes/round:

b2/8 S-boxes in total

  • Four n-bit or one 2n-bit permutation: same cost

20 / 44

slide-35
SLIDE 35

Scaling Law: Counterexamples?

Grøstl

  • 512-bit permutation: 10 rounds
  • 1024-bit permutation: 14 rounds
  • Close! If 15 rounds: three small or one big: same cost
  • Best attacks: resp. 9/10 rounds (Jean et al., FSE ’12)

Spongent

  • b-bit permutation, r = b/2 rounds, b/4 S-boxes/round:

b2/8 S-boxes in total

  • Four n-bit or one 2n-bit permutation: same cost
  • 272-bit Spongent:

5x lower throughput than 256-bit PHOTON (Bogdanov et al., IEEE Trans. Comp. 2013)

20 / 44

slide-36
SLIDE 36

Hash Functions with 2n/2 Collision Resistance

Rate-1 Hash Function (α = 1)

  • Impossible (Black et al., Eurocrypt ’05)
  • Generic collision attack: at most n + ⌈log2(n)⌉

21 / 44

slide-37
SLIDE 37

Hash Functions with 2n/2 Collision Resistance

Rate-1 Hash Function (α = 1)

  • Impossible (Black et al., Eurocrypt ’05)
  • Generic collision attack: at most n + ⌈log2(n)⌉

Rate-0.5 Hash Function (α = 0.5)

  • Three n-bit permutations
  • One 2n-bit permutation

21 / 44

slide-38
SLIDE 38

Hash Functions with 2n/2 Collision Resistance

Rate-1 Hash Function (α = 1)

  • Impossible (Black et al., Eurocrypt ’05)
  • Generic collision attack: at most n + ⌈log2(n)⌉

Rate-0.5 Hash Function (α = 0.5)

  • Three n-bit permutations
  • One 2n-bit permutation

Higher Rate Possible? (0.5 < α < 1)

  • Yes, arbitrarily close to α = 1!
  • See next slide...

21 / 44

slide-39
SLIDE 39

Sponge Function

Sponge Function

  • α =

r r+c

. . . . . . π π π π m1 r m2 mℓ z1 z2 r c

Example

  • SHA3-256: c = 512, r + c = 1600, α = 0.68

22 / 44

slide-40
SLIDE 40

Concatenate-Permute-Truncate

Concatenate-Permute-Truncate

  • α =

r r+c

. . . π π π m1 r m2 mℓ h(m) c

Example

  • Grindahl-256: r = 32, r + c = 416, α = 0.08

(Note: low α, but compensated by weak π)

23 / 44

slide-41
SLIDE 41

Merkle-Damgård with Davies-Meyer

Merkle-Damgård with Davies-Meyer

  • α =

r r+c

. . . π π π m1 r m2 mℓ h(m) c

Example

  • SHA256: c = 256, r = 512, α = 0.67

24 / 44

C K E P C π K P K r r c c c c r

slide-42
SLIDE 42

Considerations

Lightweight

  • Small hardware implementation
  • Achieved by small permutation!
  • Typically very low α

25 / 44

slide-43
SLIDE 43

Considerations

Lightweight

  • Small hardware implementation
  • Achieved by small permutation!
  • Typically very low α

Simplicity

  • e.g. JH: one 1024-bit permutation for all output sizes
  • Downside: not best tradeoff for small outputs

25 / 44

slide-44
SLIDE 44

Considerations

Lightweight

  • Small hardware implementation
  • Achieved by small permutation!
  • Typically very low α

Simplicity

  • e.g. JH: one 1024-bit permutation for all output sizes
  • Downside: not best tradeoff for small outputs

Other Criteria

  • Software: register pressure, instruction set, parallelism,...
  • Hardware: throughput, latency, power, energy,...
  • Both: message length, reuse of function/library, secure

implementation, interoperability, standards compliance,...

25 / 44

slide-45
SLIDE 45

Conclusion

Permutation-Based Hash Functions

  • Engineering approach
  • Tradeoffs for theory/cryptanalysis/implementation
  • Simplified model: inaccuracies in figures, designs

26 / 44

slide-46
SLIDE 46

Conclusion

Permutation-Based Hash Functions

  • Engineering approach
  • Tradeoffs for theory/cryptanalysis/implementation
  • Simplified model: inaccuracies in figures, designs

Goal

  • Help to understand design choices
  • No intention to critize certain designs!
  • Feedback is welcome

26 / 44

slide-47
SLIDE 47

Part II: MAC Algorithms

27 / 44

slide-48
SLIDE 48

Chaskey: An Efficient MAC Algorithm for 32-bit Microcontrollers

Nicky Mouha1, Bart Mennink1, Anthony Van Herrewege1, Dai Watanabe2, Bart Preneel1, Ingrid Verbauwhede1

1ESAT/COSIC, KU Leuven and iMinds, Belgium 2Yokohama Research Laboratory, Hitachi, Japan

Presented at SAC 2014

28 / 44

slide-49
SLIDE 49

MAC Algorithm for Microcontrollers

Message Authentication Code (MAC)

  • MACK(m) = τ
  • Authenticity, no confidentiality
  • Same key for MAC generation and verification

29 / 44

slide-50
SLIDE 50

MAC Algorithm for Microcontrollers

Message Authentication Code (MAC)

  • MACK(m) = τ
  • Authenticity, no confidentiality
  • Same key for MAC generation and verification

Microcontroller

  • Cheap 8/16/32-bit processor: USD 25-50¢
  • Applications: home, medical, industrial,...
  • Ubiquitous: 30-100 in any recent car

29 / 44

slide-51
SLIDE 51

Design

Requirements

  • Drop-in replacement for AES-CMAC

(variant of CBC-MAC for variable-length messages)

  • Same functionality and security

30 / 44

slide-52
SLIDE 52

Design

Requirements

  • Drop-in replacement for AES-CMAC

(variant of CBC-MAC for variable-length messages)

  • Same functionality and security

Speed

  • “Ten times faster than AES”

30 / 44

slide-53
SLIDE 53

Design

Requirements

  • Drop-in replacement for AES-CMAC

(variant of CBC-MAC for variable-length messages)

  • Same functionality and security

Speed

  • “Ten times faster than AES”

Approach

  • Dedicated design for microcontrollers

30 / 44

slide-54
SLIDE 54

Commonly used MACs

Based on (cryptographic) hash function

  • Example: HMAC, SHA3-MAC
  • Large block size, collision resistance unnecessary

31 / 44

slide-55
SLIDE 55

Commonly used MACs

Based on (cryptographic) hash function

  • Example: HMAC, SHA3-MAC
  • Large block size, collision resistance unnecessary

Based on universal hashing

  • Examples: UMAC, GMAC, Poly1305
  • Requires: nonce, constant-time multiply, long tags

31 / 44

slide-56
SLIDE 56

Commonly used MACs

Based on (cryptographic) hash function

  • Example: HMAC, SHA3-MAC
  • Large block size, collision resistance unnecessary

Based on universal hashing

  • Examples: UMAC, GMAC, Poly1305
  • Requires: nonce, constant-time multiply, long tags

Based on block cipher

  • Example: CMAC

31 / 44

slide-57
SLIDE 57

Commonly used MACs

Based on (cryptographic) hash function

  • Example: HMAC, SHA3-MAC
  • Large block size, collision resistance unnecessary

Based on universal hashing

  • Examples: UMAC, GMAC, Poly1305
  • Requires: nonce, constant-time multiply, long tags

Based on block cipher

  • Example: CMAC
  • Problem: ten times too slow!

31 / 44

slide-58
SLIDE 58

Our Approach

Every cycle counts!

  • Avoid load/store: keep data in registers
  • Avoid bit masking
  • Make optimal use of instruction set

32 / 44

slide-59
SLIDE 59

Our Approach

Every cycle counts!

  • Avoid load/store: keep data in registers
  • Avoid bit masking
  • Make optimal use of instruction set

Bridging the gap

  • Cryptanalysis
  • Provable security
  • Implementation

32 / 44

slide-60
SLIDE 60

Primitive

Which primitive?

  • Cryptographic hash function ✗

33 / 44

slide-61
SLIDE 61

Primitive

Which primitive?

  • Cryptographic hash function ✗
  • Universal hash function ✗

33 / 44

slide-62
SLIDE 62

Primitive

Which primitive?

  • Cryptographic hash function ✗
  • Universal hash function ✗
  • Block cipher ✗

33 / 44

slide-63
SLIDE 63

Primitive

Which primitive?

  • Cryptographic hash function ✗
  • Universal hash function ✗
  • Block cipher ✗
  • Ideal permutation ✗

33 / 44

slide-64
SLIDE 64

Primitive

Which primitive?

  • Cryptographic hash function ✗
  • Universal hash function ✗
  • Block cipher ✗
  • Ideal permutation ✗
  • → Even-Mansour Block Cipher ✓

P K π K C

33 / 44

slide-65
SLIDE 65

Primitive

Which primitive?

  • Cryptographic hash function ✗
  • Universal hash function ✗
  • Block cipher ✗
  • Ideal permutation ✗
  • → Even-Mansour Block Cipher ✓

P K π K C

Related-key attacks

  • Insecure: choose uniformly random keys!

33 / 44

slide-66
SLIDE 66

Chaskey: Mode of Operation

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n
  • K1 = 2K

K m1 π m2 π . . . π mℓ π τ K1 K1 rightt K m1 π m2 π . . . π mℓ10∗ π τ K2 K2 rightt

34 / 44

slide-67
SLIDE 67

Chaskey: Mode of Operation

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

K m1 π m2 π . . . π mℓ π τ K1 K1 rightt K m1 π m2 π . . . π mℓ10∗ π τ K2 K2 rightt

34 / 44

slide-68
SLIDE 68

Chaskey: Mode of Operation: Phantom XORs

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

m1 π m2 π . . . π mℓ π τ K1 rightt K K K K K K ⊕K K1 m1 π m2 π . . . π mℓ10∗ π τ K2 rightt K K K K K K ⊕K K2

35 / 44

slide-69
SLIDE 69

Chaskey: Mode of Operation: Phantom XORs

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

m1 π m2 π . . . π mℓ π τ K1 rightt K K K K K K ⊕K K1 m1 π m2 π . . . π mℓ10∗ π τ K2 rightt K K K K K K ⊕K K2

36 / 44

slide-70
SLIDE 70

Chaskey: Mode of Operation: Block-cipher-based

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

m1 m2 . . . mℓ τ rightt EKK EKK EK1⊕KK1 EKK m1 m2 . . . mℓ10∗ τ rightt EKK EKK EK2⊕KK2 EKK

37 / 44

slide-71
SLIDE 71

Chaskey: Mode of Operation: Block-cipher-based

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

variant of FCBC [BR’00]

m1 m2 . . . mℓ τ rightt EKK EKK EK1⊕KK1 EKK m1 m2 . . . mℓ10∗ τ rightt EKK EKK EK2⊕KK2 EKK

37 / 44

slide-72
SLIDE 72

Chaskey: Mode of Operation: Compared to CMAC

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

variant of CMAC [IK’03]

m1 m2 . . . mℓ τ rightt K1 K ⊕ K1 EKK EKK EKK EKK m1 m2 . . . mℓ10∗ τ rightt K2 K ⊕ K2 EKK EKK EKK EKK

38 / 44

slide-73
SLIDE 73

Chaskey: Mode of Operation: Compared to CMAC

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

variant of CMAC [IK’03]

m1 m2 . . . mℓ τ rightt K1 K ⊕ K1 EKK EKK EKK EKK m1 m2 . . . mℓ10∗ τ rightt K2 K ⊕ K2 EKK EKK EKK EKK

38 / 44

1 EK(0n) → K

slide-74
SLIDE 74

Chaskey: Mode of Operation: Compared to CMAC

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

variant of CMAC [IK’03]

m1 m2 . . . mℓ τ rightt K1 K ⊕ K1 EKK EKK EKK EKK m1 m2 . . . mℓ10∗ τ rightt K2 K ⊕ K2 EKK EKK EKK EKK

38 / 44

1 EK(0n) → K 2 Even-Mansour

slide-75
SLIDE 75

Chaskey: Mode of Operation: Compared to CMAC

  • Split m into ℓ blocks of n bits
  • Top: |mℓ| = n, bottom: 0 ≤ |mℓ| < n
  • K1 = 2K, K2 = 4K

variant of CMAC [IK’03]

m1 m2 . . . mℓ τ rightt K1 K ⊕ K1 EKK EKK EKK EKK m1 m2 . . . mℓ10∗ τ rightt K2 K ⊕ K2 EKK EKK EKK EKK

38 / 44

1 EK(0n) → K 2 Even-Mansour 3 not in CMAC

slide-76
SLIDE 76

Cryptanalysis

MAC forgery: find new valid (m, τ)

  • D: data complexity (# chosen plaintexts)
  • T: time complexity (# permutation eval.)

Attacks

  • Internal collision: D ≈ 2n/2
  • Key recovery:

T ≈ 2n/D

  • Tag guessing:

≈ 2t guesses Chaskey parameters

  • Key size, block size: n = 128, tag length: t ≥ 64

39 / 44

slide-77
SLIDE 77

Permutation

≪ 5 v1 v0 v2 v3 v1 v0 v2 v3 ≪ 16 ≪ 8 ≪ 13 ≪ 7 ≪ 16

Design

  • Add-Rot-XOR (ARX)
  • Inspired by SipHash
  • 32-bit words
  • 8 rounds

Properties

  • Rotations by 8, 16:

faster on 8-bit µC

  • Fixed point: 0 → 0
  • Cryptanalysis: rotational,

(truncated) differential, MitM, slide,... see paper!

40 / 44

slide-78
SLIDE 78

Chaskey: Speed Optimized (gcc -O2)

Data ROM Speed Microcontroller Algorithm [byte] [byte] [cycles/byte] Cortex-M0 AES-128-CMAC 16 13 492 173.4 128 13 492 136.5 Chaskey 16 1 308 21.3 128 1 308 18.3 Cortex-M4 AES-128-CMAC 16 28 524 118.3 128 28 524 105.0 Chaskey 16 908 10.6 128 908 7.0

41 / 44

slide-79
SLIDE 79

Chaskey: Size Optimized (gcc -Os)

Data ROM Speed Microcontroller Algorithm [byte] [byte] [cycles/byte] Cortex-M0 AES-128-CMAC 16 11 664 176.4 128 11 664 140.0 Chaskey 16 414 21.8 128 414 16.9 Cortex-M4 AES-128-CMAC 16 10 925 127.5 128 10 925 89.4 Chaskey 16 402 16.1 128 402 11.2

42 / 44

slide-80
SLIDE 80

Conclusion and Current Status

Chaskey: MAC algorithm for 32-bit microcontrollers

  • Addition-Rotation-XOR (ARX)
  • Even-Mansour block cipher
  • ARM Cortex-M: 7-15× faster than AES-128-CMAC

43 / 44

slide-81
SLIDE 81

Conclusion and Current Status

Chaskey: MAC algorithm for 32-bit microcontrollers

  • Addition-Rotation-XOR (ARX)
  • Even-Mansour block cipher
  • ARM Cortex-M: 7-15× faster than AES-128-CMAC

Standardization

  • Chaskey: currently in study period
  • ISO/IEC JTC1 SC27: MAC standardization
  • ITU-T SG17: crypto for IoT, ITS

43 / 44

slide-82
SLIDE 82

Questions?

44 / 44

slide-83
SLIDE 83

Supporting Slides

45 / 44

slide-84
SLIDE 84

Security Proof

MAC forgery: find new valid (m, τ)

  • D: block cipher (PRP) queries
  • T: permutation queries

Standard Model

  • Advmac

Chaskey-B(q, D, r) ≤ 2D2

2n + 1 2t + Adv3prp

E

(D, r) Ideal Permutation Model

  • Advmac

Chaskey

(q, D, r) ≤ 2D2 2n + 1 2t + D2 + 2DT 2n

46 / 44