The QARMA Block Cipher Family Roberto Avanzi Qualcomm Product - - PowerPoint PPT Presentation

the qarma
SMART_READER_LITE
LIVE PREVIEW

The QARMA Block Cipher Family Roberto Avanzi Qualcomm Product - - PowerPoint PPT Presentation

Qualcomm QARMA T E C H N O L O G I E S , I N C PRODUCT SECURITY Use cases The road to QARMA Analysis Implementation Conclusion The QARMA Block Cipher Family Roberto Avanzi Qualcomm Product Security Germany Tokyo, March 7, 2017 Roberto


slide-1
SLIDE 1

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The QARMA

Block Cipher Family

Roberto Avanzi

Qualcomm Product Security Germany

Qualcomm

T E C H N O L O G I E S , I N C

PRODUCT SECURITY

Tokyo, March 7, 2017

Roberto Avanzi : The QARMA Block Cipher Family 1/ 33

slide-2
SLIDE 2

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

For industry, developing a new cipher is expensive∗. Deploying it is risky: With great power comes great responsibility. Hence, motivation must come from very strong use cases, ...

∗ Because qualifjed human resources are expensive. And, by the way, QPSI is hiring...

Roberto Avanzi : The QARMA Block Cipher Family 2/ 33

slide-3
SLIDE 3

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

For industry, developing a new cipher is expensive∗. Deploying it is risky: With great power comes great responsibility. Hence, motivation must come from very strong use cases, ...

∗ Because qualifjed human resources are expensive. And, by the way, QPSI is hiring...

Roberto Avanzi : The QARMA Block Cipher Family 2/ 33

slide-4
SLIDE 4

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

For industry, developing a new cipher is expensive∗. Deploying it is risky: With great power comes great responsibility. Hence, motivation must come from very strong use cases, ...

∗ Because qualifjed human resources are expensive. And, by the way, QPSI is hiring...

Roberto Avanzi : The QARMA Block Cipher Family 2/ 33

slide-5
SLIDE 5

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

(... use cases) where “transparent” performance is the difgerence between possible customer acceptance and outright feature rejection:

Memory Encryption Software Security

Roberto Avanzi : The QARMA Block Cipher Family 3/ 33

slide-6
SLIDE 6

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

(... use cases) where “transparent” performance is the difgerence between possible customer acceptance and outright feature rejection:

Memory Encryption Software Security

Roberto Avanzi : The QARMA Block Cipher Family 3/ 33

slide-7
SLIDE 7

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Tweakable Block Ciphers and applications

P Q C K T

◮ Memory encryption: Just directly use address/nonce as

tweak; no expensive XEX-like whitening value derivation: Reduced initial latency – direct impact on performance!

◮ Software security: SW exploits that manipulate pointers.

Mitigations: Encrypt or hash these pointers... But: Decipher before use and/or increased memory trafgic... Note: ARMv8 has 64-bit pointers and 52-bit address space Idea: Use a TBC to compute tag, truncated to just a few bits, key set by higher execution environment tweak = pointer’s context then insert the tag in unused bits of the pointer!

Roberto Avanzi : The QARMA Block Cipher Family 4/ 33

slide-8
SLIDE 8

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Tweakable Block Ciphers and applications

P Q C K T

◮ Memory encryption: Just directly use address/nonce as

tweak; no expensive XEX-like whitening value derivation: Reduced initial latency – direct impact on performance!

◮ Software security: SW exploits that manipulate pointers.

Mitigations: Encrypt or hash these pointers... But: Decipher before use and/or increased memory trafgic... Note: ARMv8 has 64-bit pointers and 52-bit address space Idea: Use a TBC to compute tag, truncated to just a few bits, key set by higher execution environment tweak = pointer’s context then insert the tag in unused bits of the pointer!

Roberto Avanzi : The QARMA Block Cipher Family 4/ 33

slide-9
SLIDE 9

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

We had a look at all generic constructions and available primitives, but...

... they were all too large or too slow. Timing requirements point to a “real TBC” with low latency but no critical restrictions on total area. We want a cipher that goes well fully unrolled, pipelined. ... a “TWEAKED-PRINCE,” a bit fatter, but not much taller, than PRINCE.

Roberto Avanzi : The QARMA Block Cipher Family 5/ 33

slide-10
SLIDE 10

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

I took the train from Munich to Bochum ... and MANTIS was born

h h h · · · h h w0 P S τ M S τ M S · · · τ M S τ M S τ M S M C S τ M S τ M S · · · τ M S τ M S τ M S w1 h h h · · · h h T k0 c0 k0 c1 k0 c2 k0 c3 k0 c4 k0 c5 k0 c5 α k0 c4 α k0 c3 α k0 c2 α k0 c1 α k0 c0 α

=

Maria Eichlseder described it so well I could only do worse... Texts / tweak / state = vectors of sixteen 4-bit cells / 4 × 4 matrices τ, h = Cell Shufgles, M = Involutory Almost MDS 4 × 4 matrix, S = S-Box layer τ ◦ M ◦ S related to MIDORI round function – lighter than PRINCE’s to ofgset the additional rounds.

Roberto Avanzi : The QARMA Block Cipher Family 6/ 33

slide-11
SLIDE 11

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Beyond MANTIS

I had second thoughts about the 4-round SuperBox in the middle, some partners about the (re)use of MIDORI components. So I had to go back to the drawing board. Boring: spice it with mathematics.

  • 1. New structure
  • 2. Better difgusion matrices
  • 3. Better S-Boxes (and new heuristics to fjnd them)
  • 4. Provide a 128-bit variant with 256-bit key

Shortly after that, security margins of MANTIS eroded a bit. Outcome: MANTIS has a new cousin ...

Roberto Avanzi : The QARMA Block Cipher Family 7/ 33

slide-12
SLIDE 12

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

... a cipher partly designed on the slopes of the Mt. Carmel ...

Q

Qualcomm

+

ARM

  • A + R + M +

Authenticator

A

  • Roberto M. Avanzi

(and it might badly afgect my karma)

Roberto Avanzi : The QARMA Block Cipher Family 8/ 33

slide-13
SLIDE 13

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

  • 1. New structure

Roberto Avanzi : The QARMA Block Cipher Family 9/ 33

slide-14
SLIDE 14

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

QARMA has a new Structure

w0 w1 = o(w0) w0 w1 P

F C F

C k0 T k1 k0 + α T Whitening key derivation is s.t. w0 → w1 and w0 → w0 + w1 both 1-1 (orthomorphism) It is a 3-round, 2-key, alternating-key (non ideal) Even-Mansour scheme (TD tradeofg may increase from TD n−ǫ to TD 2

3 2 n−ǫ) Roberto Avanzi : The QARMA Block Cipher Family 10/ 33

slide-15
SLIDE 15

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

QARMA Encryption

h ω h ω h ω · · · h ω h ω w0 P S τ M S τ M S · · · τ M S τ M S C S τ M S τ M S · · · τ M S τ M S w1 h ω h ω h ω · · · h ω h ω τ M S τ M τ τ M S T w1 w0 k1 k0 c0 k0 c1 k0 c2 k0 c3 k0 cr−1 k0 α cr−1 k0 α c3 k0 α c2 k0 α c1 k0 α c0

Texts / tweak / state = vectors of sixteen 4-bit cells / 4 × 4 matrices τ, h = Cell Shufgles; M = involutory Almost MDS 4 × 4 matrix; S = S-Box layer; ω = LSFR on 7/16 cells

Roberto Avanzi : The QARMA Block Cipher Family 11/ 33

slide-16
SLIDE 16

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

QARMA Encryption

h ω h ω h ω · · · h ω h ω w0 P S τ M S τ M S · · · τ M S τ M S C S τ M S τ M S · · · τ M S τ M S w1 h ω h ω h ω · · · h ω h ω τ M S τ M τ τ M S T w1 w0 k1 k0 c0 k0 c1 k0 c2 k0 c3 k0 cr−1 k0 α cr−1 k0 α c3 k0 α c2 k0 α c1 k0 α c0

Texts / tweak / state = vectors of sixteen 4-bit cells / 4 × 4 matrices τ, h = Cell Shufgles; M = involutory Almost MDS 4 × 4 matrix; S = S-Box layer; ω = LSFR on 7/16 cells

Roberto Avanzi : The QARMA Block Cipher Family 11/ 33

slide-17
SLIDE 17

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

QARMA Decryption

h ω h ω h ω · · · h ω h ω w1 P S τ M S τ M S · · · τ M S τ M S C S τ M S τ M S · · · τ M S τ M S w0 h ω h ω h ω · · · h ω h ω τ M S τ M τ τ M S T w0 w1 k1 k0 α c0 k0 α c1 k0 α c2 k0 α c3 k0 α cr−1 k0 cr−1 k0 c3 k0 c2 k0 c1 k0 c0

Texts / tweak / state = vectors of sixteen 4-bit cells / 4 × 4 matrices τ, h = Cell Shufgles; M = involutory Almost MDS 4 × 4 matrix; S = S-Box layer; ω = LSFR on 7/16 cells Decrypt with: k0 → k0 ⊕ α, swap w0 and w1 , replace k1 M k1

Roberto Avanzi : The QARMA Block Cipher Family 12/ 33

slide-18
SLIDE 18

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

QARMA Decryption

h ω h ω h ω · · · h ω h ω w1 P S τ M S τ M S · · · τ M S τ M S C S τ M S τ M S · · · τ M S τ M S w0 h ω h ω h ω · · · h ω h ω τ M S τ M τ τ M S T w0 w1 M · k1 k0 α c0 k0 α c1 k0 α c2 k0 α c3 k0 α cr−1 k0 cr−1 k0 c3 k0 c2 k0 c1 k0 c0

Texts / tweak / state = vectors of sixteen 4-bit cells / 4 × 4 matrices τ, h = Cell Shufgles; M = involutory Almost MDS 4 × 4 matrix; S = S-Box layer; ω = LSFR on 7/16 cells Decrypt with: k0 → k0 ⊕ α, swap w0 and w1, replace k1 → M · k1

Roberto Avanzi : The QARMA Block Cipher Family 12/ 33

slide-19
SLIDE 19

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

QARMA Encryption

h ω h ω h ω · · · h ω h ω w0 P S τ M S τ M S · · · τ M S τ M S C S τ M S τ M S · · · τ M S τ M S w1 h ω h ω h ω · · · h ω h ω τ M S τ M τ τ M S T w1 w0 k1 k0 c0 k0 c1 k0 c2 k0 c3 k0 cr−1 k0 α cr−1 k0 α c3 k0 α c2 k0 α c1 k0 α c0

Texts / tweak / state = vectors of sixteen 4-bit cells / 4 × 4 matrices τ, h = Cell Shufgles; M = involutory Almost MDS 4 × 4 matrix; S = S-Box layer; ω = LSFR on 7/16 cells Decrypt with: k0 → k0 ⊕ α, swap w0 and w1, replace k1 → M · k1

Roberto Avanzi : The QARMA Block Cipher Family 13/ 33

slide-20
SLIDE 20

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Impact of new central construction

h ω h ω h ω · · · h ω h ω w0 P S τ M S τ M S · · · τ M S τ M S C S τ M S τ M S · · · τ M S τ M S w1 h ω h ω h ω · · · h ω h ω τ M S τ M τ τ M S T w1 w0 k1 k0 c0 k0 c1 k0 c2 k0 c3 k0 cr−1 k0 α cr−1 k0 α c3 k0 α c2 k0 α c1 k0 α c0

Use of whitening key(s) instead of core key thwarts refmection attacks Non involutory, keyed Pseudo-Refmector also makes refmection attacks more difgicult τ and τ around it improve difgusion, kill 4-round SuperBox

Roberto Avanzi : The QARMA Block Cipher Family 14/ 33

slide-21
SLIDE 21

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

  • 2. Better difgusion matrices

Roberto Avanzi : The QARMA Block Cipher Family 15/ 33

slide-22
SLIDE 22

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

MIDORI and MANTIS: Almost MDS Matrix circ(0, 1, 1, 1)

Represent state as a 4 × 4 matrix: IS =     s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15     . Difgusion layer based on Almost MDS matrix M = circ( 0 , 1 , 1 , 1 ) =     1 1 1 1 1 1 1 1 1 1 1 1     .

Roberto Avanzi : The QARMA Block Cipher Family 16/ 33

slide-23
SLIDE 23

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

A feature of the MIDORI matrix

      1 1 1 1 1 1 1 1 1 1 1 1       ×       v0 v1 · · · · · ·       =       v1 ⊕ · · · v0 ⊕ · · · (v0 ⊕ v1) ⊕ · · · (v0 ⊕ v1) ⊕ · · ·       Two S-Boxes copied, same addition twice – characteristics propagate unchanged and easily controlled.

Roberto Avanzi : The QARMA Block Cipher Family 17/ 33

slide-24
SLIDE 24

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

QARMA: Almost MDS Matrix over a ring that encodes circular rotations Cell values = vector space F m

2 (m = 4 or 8) with basis {ρm−1, ..., ρ2, ρ, 1}

and ρm = 1. So we have a ring R = F2[ρ] where ρ “=” circular rotation to the left by one place. We consider matrices over R of form M = circ(0, ρa, ρb, ρc) =     ρa ρb ρc ρc ρa ρb ρb ρc ρa ρa ρb ρc     These matrices are as expensive (area, latency) as the {0, 1}-matrices. We classify them (see paper): e.g. the involutory ones.

Roberto Avanzi : The QARMA Block Cipher Family 18/ 33

slide-25
SLIDE 25

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Choice of Matrices for QARMA Example with m = 8 (involutory):

     ρ1 ρ4 ρ5 ρ5 ρ1 ρ4 ρ4 ρ5 ρ1 ρ1 ρ4 ρ5      ×      v0 v1 · · · · · ·      =      (v1 ≪ 1) ⊕ · · · (v0 ≪ 5) ⊕ · · · (v0 ≪ 4)⊕(v1 ≪ 5) ⊕ · · · (v0 ≪ 1)⊕(v1 ≪ 4) ⊕ · · ·      ∆ = 1 ∆ = 3

Then next S-Box layer more likely to disrupt characteristics (linear, difgerential, etc), or at least to avoid copy-and-paste. Select values heuristically by minimising difgerentials over 1.5 rounds.

Roberto Avanzi : The QARMA Block Cipher Family 19/ 33

slide-26
SLIDE 26

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Choice of Matrices for QARMA Example with m = 8 (involutory):

     ρ1 ρ4 ρ5 ρ5 ρ1 ρ4 ρ4 ρ5 ρ1 ρ1 ρ4 ρ5      ×      v0 v1 · · · · · ·      =      (v1 ≪ 1) ⊕ · · · (v0 ≪ 5) ⊕ · · · (v0 ≪ 4)⊕(v1 ≪ 5) ⊕ · · · (v0 ≪ 1)⊕(v1 ≪ 4) ⊕ · · ·      ∆ = 1 ∆ = 3

Then next S-Box layer more likely to disrupt characteristics (linear, difgerential, etc), or at least to avoid copy-and-paste. Select values heuristically by minimising difgerentials over 1.5 rounds.

Roberto Avanzi : The QARMA Block Cipher Family 19/ 33

slide-27
SLIDE 27

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

  • 3. Fantastic S-Boxes

and where to fjnd them

Roberto Avanzi : The QARMA Block Cipher Family 20/ 33

slide-28
SLIDE 28

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

S-Box Search Heuristics

Most important property in our context: total latency Logic synthesis of a circuit is expensive and slow. Cannot synthesise billions of S-boxes. Idea: apply crude heuristics based on Quine-McCluskey to bound the depth of individual output bits. Take max. Minimise it. Use variant of Prissette’s algorithm to enumerate involutions with a predetermined subset of fjxed points.

Roberto Avanzi : The QARMA Block Cipher Family 21/ 33

slide-29
SLIDE 29

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

S-Box Search Heuristics

Most important property in our context: total latency Logic synthesis of a circuit is expensive and slow. Cannot synthesise billions of S-boxes. Idea: apply crude heuristics based on Quine-McCluskey to bound the depth of individual output bits. Take max. Minimise it. Use variant of Prissette’s algorithm to enumerate involutions with a predetermined subset of fjxed points.

Roberto Avanzi : The QARMA Block Cipher Family 21/ 33

slide-30
SLIDE 30

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The Three S-Boxes

QARMA S-Box PRINCE σ2 MIDORI Direct Inverse σ0 σ1 Direct Inverse

  • Max. prob. of a difgerential

1/4 1/4 1/4 1/4 1/4 1/4 1/4 # with max. probability 24 15 15 18 15 15 15

  • Max. bias of a lin. approx.

1/4 1/4 1/4 1/4 1/4 1/4 1/4 # with max. bias 36 30 30 32 30 30 30 Algebraic Degree 3 3 3 3 3 3 3 # components of deg 3, 2 12, 3 15, 0 15, 0 14, 1 15, 0 15, 0 15, 0 Fixed Points 4 2 Minimal depth (GE) 3.5 5 4.5 3.5 4 4.5 4 Minimal area (GE) 12.8 20.2 19 14.17 16.5 20.2 19

Roberto Avanzi : The QARMA Block Cipher Family 22/ 33

slide-31
SLIDE 31

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The Three S-Boxes

QARMA S-Box PRINCE σ2 MIDORI Direct Inverse σ0 σ1 Direct Inverse

  • Max. prob. of a difgerential

1/4 1/4 1/4 1/4 1/4 1/4 1/4 # with max. probability 24 15 15 18 15 15 15

  • Max. bias of a lin. approx.

1/4 1/4 1/4 1/4 1/4 1/4 1/4 # with max. bias 36 30 30 32 30 30 30 Algebraic Degree 3 3 3 3 3 3 3 # components of deg 3, 2 12, 3 15, 0 15, 0 14, 1 15, 0 15, 0 15, 0 Fixed Points 4 2 Minimal depth (GE) 3.5 5 4.5 3.5 4 4.5 4 Minimal area (GE) 12.8 20.2 19 14.17 16.5 20.2 19 σ0 is similar to MIDORI’s S-Box but is has better cryptographic properties (all parameters that can be improved are improved), same latency, and slightly larger area

Roberto Avanzi : The QARMA Block Cipher Family 22/ 33

slide-32
SLIDE 32

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The Three S-Boxes

QARMA S-Box PRINCE σ2 MIDORI Direct Inverse σ0 σ1 Direct Inverse

  • Max. prob. of a difgerential

1/4 1/4 1/4 1/4 1/4 1/4 1/4 # with max. probability 24 15 15 18 15 15 15

  • Max. bias of a lin. approx.

1/4 1/4 1/4 1/4 1/4 1/4 1/4 # with max. bias 36 30 30 32 30 30 30 Algebraic Degree 3 3 3 3 3 3 3 # components of deg 3, 2 12, 3 15, 0 15, 0 14, 1 15, 0 15, 0 15, 0 Fixed Points 4 2 Minimal depth (GE) 3.5 5 4.5 3.5 4 4.5 4 Minimal area (GE) 12.8 20.2 19 14.17 16.5 20.2 19 σ1 is optimal and involutory, and has properties that may make side channel attacks more difgicult

Roberto Avanzi : The QARMA Block Cipher Family 22/ 33

slide-33
SLIDE 33

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The Three S-Boxes

QARMA S-Box PRINCE σ2 MIDORI Direct Inverse σ0 σ1 Direct Inverse

  • Max. prob. of a difgerential

1/4 1/4 1/4 1/4 1/4 1/4 1/4 # with max. probability 24 15 15 18 15 15 15

  • Max. bias of a lin. approx.

1/4 1/4 1/4 1/4 1/4 1/4 1/4 # with max. bias 36 30 30 32 30 30 30 Algebraic Degree 3 3 3 3 3 3 3 # components of deg 3, 2 12, 3 15, 0 15, 0 14, 1 15, 0 15, 0 15, 0 Fixed Points 4 2 Minimal depth (GE) 3.5 5 4.5 3.5 4 4.5 4 Minimal area (GE) 12.8 20.2 19 14.17 16.5 20.2 19 σ2 comes from the PRINCE selection

Roberto Avanzi : The QARMA Block Cipher Family 22/ 33

slide-34
SLIDE 34

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

  • 4. A 128-bit cipher

with a 256-bit key

Roberto Avanzi : The QARMA Block Cipher Family 23/ 33

slide-35
SLIDE 35

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The 8-bit S-Box for QARMA-128

σ σ

x0 x1 x2 x3 x4 x5 x6 x7 x′ x′

1

x′

2

x′

3

x′

4

x′

5

x′

6

x′

7

Roberto Avanzi : The QARMA Block Cipher Family 24/ 33

slide-36
SLIDE 36

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The 8-bit S-Box for QARMA-128

σ σ σ σ

Roberto Avanzi : The QARMA Block Cipher Family 25/ 33

slide-37
SLIDE 37

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The 8-bit S-Box for QARMA-128

σ σ σ σ

Roberto Avanzi : The QARMA Block Cipher Family 25/ 33

slide-38
SLIDE 38

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The 8-bit S-Box for QARMA-128

σ σ σ σ

Roberto Avanzi : The QARMA Block Cipher Family 25/ 33

slide-39
SLIDE 39

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The 8-bit S-Box for QARMA-128

σ σ σ σ

Roberto Avanzi : The QARMA Block Cipher Family 25/ 33

slide-40
SLIDE 40

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The 8-bit S-Box for QARMA-128

σ σ σ σ

Roberto Avanzi : The QARMA Block Cipher Family 25/ 33

slide-41
SLIDE 41

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

The 8-bit S-Box for QARMA-128

σ σ σ σ

Roberto Avanzi : The QARMA Block Cipher Family 25/ 33

slide-42
SLIDE 42

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Security Analysis

Roberto Avanzi : The QARMA Block Cipher Family 26/ 33

slide-43
SLIDE 43

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Considered attacks (designing block ciphers is horrible, horrible)

◮ Linear and difgerential cryptanalysis

(MILP models, following Beierle)

◮ —, under related tweak model

(MILP models, following Beierle)

◮ Refmection Attacks

(follows from structure)

◮ Generic attacks on Even-Mansour schemes

(follows from structure)

◮ Slide attacks

(follows from round heterogeneity)

◮ Meet-in-the-middle attacks

(following MIDORI)

◮ Invariant subspace attacks

(new heuristic arguments)

◮ Algebraic cryptanalysis

(count equations and variables)

◮ Impossible difgerential & zero correlation linear cryptanalysis

(method: Sun et al. EC ’16)

◮ Higher order difgerential cryptanalysis (boomerang, integral)

(following MIDORI)

Roberto Avanzi : The QARMA Block Cipher Family 27/ 33

slide-44
SLIDE 44

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Invariant Subspace Attacks

These are subtle attacks and focus of very recent research.

P F0 F1 F2 F3 C k c0 T0 = T k c1 T1 k c2 T2 k c3 T3 k c4 T4 a+VT b+VT a+VT b+VT a+VT b+VT a+VT b+VT a+VT b+VT

Suppose there is a vector space V , s.t. Fi(b + V) = a + V for all i. Note: V contains all ci + cj ... Distinguisher: if P ∈ a + V and C ∈ b + V, then k ∈ a + b + ci + V (likely). We want V very small or very large ( ⊇ almost whole space).

Roberto Avanzi : The QARMA Block Cipher Family 28/ 33

slide-45
SLIDE 45

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Invariant Subspace Attacks

These are subtle attacks and focus of very recent research.

P F0 F1 F2 F3 C k c0 T0 = T k c1 T1 k c2 T2 k c3 T3 k c4 T4 a+VT b+VT a+VT b+VT a+VT b+VT a+VT b+VT a+VT b+VT

Suppose there is a vector space V , s.t. Fi(b + V) = a + V for all i. Note: V contains all ci + cj ... Distinguisher: if P ∈ a + V and C ∈ b + V, then k ∈ a + b + ci + V (likely). We want V very small or very large ( ⊇ almost whole space).

Roberto Avanzi : The QARMA Block Cipher Family 28/ 33

slide-46
SLIDE 46

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Invariant Subspace Attacks

These are subtle attacks and focus of very recent research.

P F0 F1 F2 F3 C k c0 T0 = T k c1 T1 k c2 T2 k c3 T3 k c4 T4 a+VT b+VT a+VT b+VT a+VT b+VT a+VT b+VT a+VT b+VT

Suppose there is a vector space V , s.t. Fi(b + V) = a + V for all i. Note: V contains all ci + cj ... Distinguisher: if P ∈ a + V and C ∈ b + V, then k ∈ a + b + ci + V (likely). We want V very small or very large ( ⊇ almost whole space).

Roberto Avanzi : The QARMA Block Cipher Family 28/ 33

slide-47
SLIDE 47

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Invariant Subspace Attacks

These are subtle attacks and focus of very recent research.

P F0 F1 F2 F3 C k c0 T0 = T k c1 T1 k c2 T2 k c3 T3 k c4 T4 a+VT b+VT a+VT b+VT a+VT b+VT a+VT b+VT a+VT b+VT

Suppose there is a vector space V , s.t. Fi(b + V) = a + V for all i. Note: VT contains all (ci + Ti) + (cj + Tj) ... Distinguisher: if P ∈ a + V and C ∈ b + V, then k ∈ a + b + ci + Ti + VT (likely). We want VT very small or very large ( ⊇ almost whole space).

Roberto Avanzi : The QARMA Block Cipher Family 28/ 33

slide-48
SLIDE 48

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Invariant Subspaces - The importance of structure and difgusion matrices

Remark: in our case, any invariant subspace is invariant under τ, M and S. Construct a U ⊆ V by taking all (ci + Ti) + (cj + Tj) and α, repeatedly applying τ and M. Compute dimension of U for millions of random tweaks. Averages:

r 5 7 QARMA-64 60.32 63.02 MANTIS 46.92 55.37 r 8 11 QARMA-128 123.61 126.51 — with MIDORI matrix 92.17 107.17

These values vary with M. Their maximisation is part of the choice of M. If we also take the S-box into account we always get the full space or codimension 1 (rare).

Roberto Avanzi : The QARMA Block Cipher Family 29/ 33

slide-49
SLIDE 49

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Implementation

Roberto Avanzi : The QARMA Block Cipher Family 30/ 33

slide-50
SLIDE 50

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Implementation (7nm FinFet)

Targeting Minimum Area Minimum Delay Delay Area Delay Area Cipher ns GE ns GE QARMA7-64-σ1 6.23 18362 3.25 34354 MANTIS7 5.85 15831 2.94 27998 PRINCE 4.07 8702 2.12 20464

  • Mult. in F264

1.05 13083 0.44 16897

Roberto Avanzi : The QARMA Block Cipher Family 31/ 33

slide-51
SLIDE 51

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

Implementation (7nm FinFet)

Targeting Minimum Area Minimum Delay Delay Area Delay Area Cipher ns GE ns GE QARMA11-128-σ1 8.88 53872 4.80 96883 AES-128, pipelined∗ 15.67 71164 — — AES-256, pipelined∗ 21.99 101128 — —

  • Mult. in F2128

— — ≈ 0.5 ≈ 60K

∗ Note: The latency of one full AES round is 1.58 ns

Compare 2× AES plus one GFMULT to 1× QARMA-128

Roberto Avanzi : The QARMA Block Cipher Family 32/ 33

slide-52
SLIDE 52

Use cases The road to QARMA QARMA Analysis Implementation Conclusion

QARMA is placed in the public domain! Standard for ARMv8.3-A pointer authentication: QARMA-64.

https://community.arm.com/groups/processors/blog/2016/10/27/ armv8-a-architecture-2016-additions https://www.qualcomm.com/news/onq/2017/01/10/ qualcomm-releases-whitepaper-detailing-pointer-authentication-armv83

Ideal for memory encryption. Analysis welcome! We can fjx it if needed.

(For instance, Xiaoyang Dong et al: MITM on 10 rounds.)

Roberto Avanzi : The QARMA Block Cipher Family 33/ 33