On Invariant Attacks Gregor Leander Ruhr University Bochum Germany - - PowerPoint PPT Presentation

on invariant attacks
SMART_READER_LITE
LIVE PREVIEW

On Invariant Attacks Gregor Leander Ruhr University Bochum Germany - - PowerPoint PPT Presentation

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks On Invariant Attacks Gregor Leander Ruhr University Bochum Germany 1 FSE 2019 1 Based on work in collaboration with: Christof Beierle, Anne Canteaut,


slide-1
SLIDE 1

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

On Invariant Attacks

Gregor Leander Ruhr University Bochum Germany 1 FSE 2019

1Based on work in collaboration with: Christof Beierle, Anne Canteaut,

Brice Minaud, Yann Rotella, Sondre Rønjom, Yu Sasaki, Yosuke Todo

slide-2
SLIDE 2

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Outline

1

Intro

2

Invariant Subspace Attack

3

Non-linear Invariant Attack

4

How to prevent those attacks

slide-3
SLIDE 3

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Outline

1

Intro

2

Invariant Subspace Attack

3

Non-linear Invariant Attack

4

How to prevent those attacks

slide-4
SLIDE 4

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The Real Impact of Lightweight Crypto

Lightweight Crypto Ligthweight crypto tends to be more aggressive less standard Main advantage: New insights We learn more about the basics on how (not) to design secure ciphers.

slide-5
SLIDE 5

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The Real Impact of Lightweight Crypto

Lightweight Crypto Ligthweight crypto tends to be more aggressive less standard Main advantage: New insights We learn more about the basics on how (not) to design secure ciphers. It is a pity that NIST states: [...] submission of algorithms that are not well-understood is discouraged

slide-6
SLIDE 6

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Main focus: Key-Alternating Block Cipher

k KEY SCHEDULING m k0 R1 k1 R2 Rr kr c Remark Most results apply to other structures as well. Details might change, in particular for Partial Non-linear layer Cryptographic permutations

slide-7
SLIDE 7

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Main focus: Key-Alternating Block Cipher

m k0 R1 k1 R2 Rr kr c Ri

=

S L S: Sboxes L: Linear mapping

slide-8
SLIDE 8

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Minimal Keys-Scheduling

Simplify the Key-Scheduling Use the same key in every round add round constants m k R1 k R2 Rr k c

slide-9
SLIDE 9

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Minimal Keys-Scheduling

Question Is this a good idea? When picking the round constants at random: This is sound. Otherwise: Beware of symmetries.

slide-10
SLIDE 10

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Symmetries

What you do not want (e.g.): A symmetric plain-text p = (x||x) with a symmetric key k = (y||y) produces always a symmetric cipher-text c = (z||z) One possible abstraction: Invariant Subspaces A symmetry is an affine subspace that is (for weak keys) invariant under encryption. Do those things happen?

slide-11
SLIDE 11

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Examples

1

PRINTCipher (’11)

2

iSCREAM (’15)

3

Robin (’15)

4

Zorro (’15)

5

Midori (’16)

6

Haraka (v.0) (’16)

7

Simpira (v.1) (’16)

8

NORX (v 2.0) (’17)

slide-12
SLIDE 12

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A trend- and were it might lead to (I/III)

slide-13
SLIDE 13

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A trend- and were it might lead to (II/III)

slide-14
SLIDE 14

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A trend- and were it might lead to (III/III)

slide-15
SLIDE 15

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

PRIDE v.0

Insider information: I/III

slide-16
SLIDE 16

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

PRIDE v.0

Insider information: I/III Email 3 days before the submission deadline Von: Benedikt An: Mich Betreff: PRIDE Test Vektoren Ist das hier ein Grund, sich Sorgen zu machen? key = 00000000000000000000000000000000 plaintext = 0000000000000000 ciphertext = 0000e87b0000eee2 Benedikt

slide-17
SLIDE 17

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

PRIDE v.0

Insider information: I/III Email 3 days before the submission deadline Von: Benedikt An: Mich Betreff: PRIDE Test Vektoren Ist das hier ein Grund, sich Sorgen zu machen? key = 00000000000000000000000000000000 plaintext = 0000000000000000 ciphertext = 0000e87b0000eee2 Benedikt Good for PRIDE, but...

slide-18
SLIDE 18

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The Impact of Fixing PRIDE

slide-19
SLIDE 19

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The Impact of Fixing PRIDE

Fixing PRIDE lead to 100 ciphers more being broken in the future

slide-20
SLIDE 20

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The Impact of Fixing PRIDE

Fixing PRIDE lead to 100 ciphers more being broken in the future

slide-21
SLIDE 21

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Outline

1

Intro

2

Invariant Subspace Attack

3

Non-linear Invariant Attack

4

How to prevent those attacks

slide-22
SLIDE 22

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Origin

First attack with this name: Abdelraheem et al ’11 Invariant Subspace Attack on PRINTCIPHER-48. Several similar ideas previously, in particular non-linear approximations partitioning cryptanalysis

slide-23
SLIDE 23

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

PRINTCIPHER-48

slide-24
SLIDE 24

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

PRINTCIPHER-48 Attack

Summary Prob 1 distinguisher for full cipher 250 out of 280 keys weak. Similar for PRINTCIPHER-96 Abstraction: F(U ⊕ a) = U ⊕ b If k ∈ U ⊕ (a ⊕ b) Fk(U ⊕ a) = U ⊕ a Thus an invariant subspace Question How to detect it automatically?

slide-25
SLIDE 25

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

U+a F Key-add U+b U+a next round

F(U + a) = U + b k ∈ U + (a + b) then U + b + k = U + a Iterative for all rounds (for identical round keys).

slide-26
SLIDE 26

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

Generic Algorithm (Minaud, Rønjom, L, EC 2015) Guess a subspace of U. Map it back and forth. If the guess was correct: Recovers U If not: Find trivial solution.

slide-27
SLIDE 27

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

F F -1

F := Fn

2 → Fn 2 (permutation)

slide-28
SLIDE 28

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

1) Guess a subspace of U

slide-29
SLIDE 29

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

F

2) Map it using F

slide-30
SLIDE 30

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

3) Compute the linear span

slide-31
SLIDE 31

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

F -1

4) Map it using F −1

slide-32
SLIDE 32

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

5) Compute the linear span

slide-33
SLIDE 33

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

F

6) Map it using F

slide-34
SLIDE 34

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

7) Compute the linear span

slide-35
SLIDE 35

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

8) Map it using F −1

slide-36
SLIDE 36

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The General Idea

F F -1

9) ...until it stabilizes. Done.

slide-37
SLIDE 37

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Some Further Considerations

Block length: n Running Time Roughly 23(n−d) for the initial guess if an invariant subspace of

  • dim. d exists.
slide-38
SLIDE 38

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Some Further Considerations

Block length: n Running Time Roughly 23(n−d) for the initial guess if an invariant subspace of

  • dim. d exists.

Much better: Include round constants in the initial guess. Guess only the offset. Reduced Running Time 2n−d when an invariant subspace of dim. d exists. Still not satisfactory...

slide-39
SLIDE 39

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

One square is a bit. Columns are stored in registers

slide-40
SLIDE 40

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

S-Box One square is a bit. Columns are stored in registers

slide-41
SLIDE 41

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

S-Box S-Box One square is a bit. Columns are stored in registers

slide-42
SLIDE 42

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

S-Box S-Box S-Box One square is a bit. Columns are stored in registers

slide-43
SLIDE 43

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

S-Box S-Box S-Box S-Box One square is a bit. Columns are stored in registers

slide-44
SLIDE 44

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

S-Box S-Box S-Box S-Box S-Box One square is a bit. Columns are stored in registers

slide-45
SLIDE 45

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

S-Box S-Box S-Box S-Box S-Box S-Box One square is a bit. Columns are stored in registers

slide-46
SLIDE 46

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

S-Box S-Box S-Box S-Box S-Box S-Box S-Box One square is a bit. Columns are stored in registers

slide-47
SLIDE 47

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

S-Box S-Box S-Box S-Box S-Box S-Box S-Box S-Box One square is a bit. Columns are stored in registers

slide-48
SLIDE 48

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

L One square is a bit. Columns are stored in registers

slide-49
SLIDE 49

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

L L One square is a bit. Columns are stored in registers

slide-50
SLIDE 50

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

L L L One square is a bit. Columns are stored in registers

slide-51
SLIDE 51

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

L L L L One square is a bit. Columns are stored in registers

slide-52
SLIDE 52

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

L L L L L One square is a bit. Columns are stored in registers

slide-53
SLIDE 53

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

L L L L L L One square is a bit. Columns are stored in registers

slide-54
SLIDE 54

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

L L L L L L L One square is a bit. Columns are stored in registers

slide-55
SLIDE 55

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

L L L L L L L L One square is a bit. Columns are stored in registers

slide-56
SLIDE 56

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Robin and iScream

c One square is a bit. Columns are stored in registers

slide-57
SLIDE 57

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Applications to Zorro, Robin and iScream

Easy but Powerful Allows to detect some things 32 dim subspace for Robin . . . and for Zorro Improve Afterwards The tool detects a (minimal) invariant subspace. Careful analysis increases attack and understanding.

slide-58
SLIDE 58

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

The Robin Sbox

00000000 → 00000000 10000000 → 10100001 01100100 → 01100100 11100100 → 11000101 00100001 → 00100001 10100001 → 10000000 01000101 → 01000101 11000101 → 11100100 S(∗, a, b, 0, 0, a, 0, a ⊕ b) = (∗, α, β, 0, 0, α, 0, α ⊕ β)

slide-59
SLIDE 59

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

* a0 b0 a0 c0 * a1 b1 a1 c1 * a2 b2 a2 c2 * a3 b3 a3 c3 * a4 b4 a4 c4 * a5 b5 a5 c5 * a6 b6 a6 c6 * a7 b7 a7 c7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-60
SLIDE 60

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

S-Box S-Box S-Box S-Box S-Box S-Box S-Box S-Box * a0 b0 a0 c0 * a1 b1 a1 c1 * a2 b2 a2 c2 * a3 b3 a3 c3 * a4 b4 a4 c4 * a5 b5 a5 c5 * a6 b6 a6 c6 * a7 b7 a7 c7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-61
SLIDE 61

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

S-Box S-Box S-Box S-Box S-Box S-Box S-Box * a1 b1 a1 c1 * a2 b2 a2 c2 * a3 b3 a3 c3 * a4 b4 a4 c4 * a5 b5 a5 c5 * a6 b6 a6 c6 * a7 b7 a7 c7 * α0 β0 α0 γ0 ci = ai ⊕ bi γi = αi ⊕ βi

slide-62
SLIDE 62

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

S-Box S-Box S-Box S-Box S-Box S-Box * a2 b2 a2 c2 * a3 b3 a3 c3 * a4 b4 a4 c4 * a5 b5 a5 c5 * a6 b6 a6 c6 * a7 b7 a7 c7 * α0 β0 α0 γ0 * α1 β1 α1 γ1 ci = ai ⊕ bi γi = αi ⊕ βi

slide-63
SLIDE 63

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

S-Box S-Box S-Box S-Box S-Box * a3 b3 a3 c3 * a4 b4 a4 c4 * a5 b5 a5 c5 * a6 b6 a6 c6 * a7 b7 a7 c7 * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 ci = ai ⊕ bi γi = αi ⊕ βi

slide-64
SLIDE 64

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

S-Box S-Box S-Box S-Box * a4 b4 a4 c4 * a5 b5 a5 c5 * a6 b6 a6 c6 * a7 b7 a7 c7 * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 ci = ai ⊕ bi γi = αi ⊕ βi

slide-65
SLIDE 65

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

S-Box S-Box S-Box * a5 b5 a5 c5 * a6 b6 a6 c6 * a7 b7 a7 c7 * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 ci = ai ⊕ bi γi = αi ⊕ βi

slide-66
SLIDE 66

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

S-Box S-Box * a6 b6 a6 c6 * a7 b7 a7 c7 * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 ci = ai ⊕ bi γi = αi ⊕ βi

slide-67
SLIDE 67

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

S-Box * a7 b7 a7 c7 * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 ci = ai ⊕ bi γi = αi ⊕ βi

slide-68
SLIDE 68

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

* α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-69
SLIDE 69

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

L L L L L L L L * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-70
SLIDE 70

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

L L L L L L L * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-71
SLIDE 71

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

L L L L L L * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-72
SLIDE 72

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

L L L L L * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-73
SLIDE 73

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

L L L L * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-74
SLIDE 74

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

L L L * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-75
SLIDE 75

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

L L * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-76
SLIDE 76

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

L * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-77
SLIDE 77

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

* α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-78
SLIDE 78

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

* α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-79
SLIDE 79

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

c * α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-80
SLIDE 80

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

A Problem of Robin and iScream

* α0 β0 α0 γ0 * α1 β1 α1 γ1 * α2 β2 α2 γ2 * α3 β3 α3 γ3 * α4 β4 α4 γ4 * α5 β5 α5 γ5 * α6 β6 α6 γ6 * α7 β7 α7 γ7 ci = ai ⊕ bi γi = αi ⊕ βi

slide-81
SLIDE 81

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Generalization

Question Can we generalize this attack? Possible directions: Not focus on subspaces only Statistical Variant Allow the subspace to change Non-trivial key-scheduling

slide-82
SLIDE 82

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Generalization

Question Can we generalize this attack? Possible directions: Not focus on subspaces only Statistical Variant Allow the subspace to change Non-trivial key-scheduling

slide-83
SLIDE 83

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Outline

1

Intro

2

Invariant Subspace Attack

3

Non-linear Invariant Attack

4

How to prevent those attacks

slide-84
SLIDE 84

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Non-linear Invariant Attacks

ASIACRYPT 2016 joint work with Yosuke Todo and Yu Sasaki (NTT) Developed not like the storyline suggests.

slide-85
SLIDE 85

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Invariant Subspace Attacks

U+a F Key-add U+b U+a next round

slide-86
SLIDE 86

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Nonlinear Invariant Attack (I/II)

F Key-add next round

slide-87
SLIDE 87

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Invariant Subspace Attacks (II/II)

F Key-add next round

slide-88
SLIDE 88

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Basics

Definition Given a permutation F : Fn

2 → Fn

  • 2. A Boolean function

g : Fn

2 → F2 is called a non linear invariant for F if

g(F(x)) = g(x) + c ∀x where c ∈ F2 is a constant. Link to the picture:

1

Split Fn

2 into two sets

A := {x | g(x) = 1} B := {x | g(x) = 0}

2

F(A) = A and F(B) = B (c = 0)

3

F(A) = B and F(B) = A (c = 1)

slide-89
SLIDE 89

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Applications

Applications This leads to attacks on iSCREAM Midori64 SCREAM (v.3) Can be extended to a cipher-text only attack when used in certain modes (e.g. CBC, CTR) mode same message encrypted multiple times with very low complexity.

slide-90
SLIDE 90

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Results

weak keys recovered bits data time SCREAM (v.3) 296 1/4 33 CT 323 iSCREAM 296 1/4 33 CT 323 Midori64 264 1/2 33 CT 323 More details in the paper. In particular The details An explanation why that attack works on those ciphers

slide-91
SLIDE 91

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

Insider information II/III: How it was actually developed.

slide-92
SLIDE 92

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

Insider information II/III: How it was actually developed. Yosuke Todo was visiting RUB

slide-93
SLIDE 93

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

Insider information II/III: How it was actually developed. Yosuke Todo was visiting RUB Division Property A set X has division property Dn

k if

  • x∈X

xu = 0 for all u ∈ Fn

2 with wt(u) < k.

⇔ For all f : Fn

2 → F2 with deg(f) < k we have

  • x∈X

f(x) = 0

slide-94
SLIDE 94

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

Research Question Can we overcome one Sbox without guessing the entire key?

S k x y Dn

3

slide-95
SLIDE 95

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

S k x y Dn

3

z

Find a function g : Fn

2

→ F2 z → g(z)

1

g(z) does not depend non-linear on all bits of z.

2

Equals a quadratic function f in the inputs x That is: g(z) = g(S(x)) = f(x)

slide-96
SLIDE 96

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

S k x y Dn

3

z f(x) = g(z)

Attack Outline Guess parts of the key Compute g(z) For correct key we get

  • z

g(z) =

  • x∈X

f(x) = 0

slide-97
SLIDE 97

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

S k x y Dn

3

z

Looking at many examples we found: Scream x1x2 + x0 + x2 + x5 = z1z2 + z0 + z2 + z5 + 1 That is f = g + 1.

slide-98
SLIDE 98

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

S k x y Dn

3

z

Looking at many examples we found: Scream x1x2 + x0 + x2 + x5 = z1z2 + z0 + z2 + z5 + 1 That is f = g + 1. interesting...

slide-99
SLIDE 99

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

S k x y Dn

3

z

Looking at many examples we found: Scream x1x2 + x0 + x2 + x5 = z1z2 + z0 + z2 + z5 + 1 That is f = g + 1. interesting... just a coincidence?

slide-100
SLIDE 100

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

S k x y Dn

3

z

Looking at many examples we found: Scream x1x2 + x0 + x2 + x5 = z1z2 + z0 + z2 + z5 + 1 That is f = g + 1. interesting... just a coincidence? can we do anything with that?

slide-101
SLIDE 101

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

How it was actually developed

One Month Later: Email from Yosuke I have new results, and I want to submit this result to Asiacrypt 2016.

slide-102
SLIDE 102

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Outline

1

Intro

2

Invariant Subspace Attack

3

Non-linear Invariant Attack

4

How to prevent those attacks

slide-103
SLIDE 103

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Avoiding those Attacks

A satisfactory(?) answer for the designers

slide-104
SLIDE 104

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Invariants under L and S

S L S L S L S S S S S S S k1 k2 kt

Focus on invariants that are Invariant for S-Layer Invariant for all Addki ◦ L Not much of a restriction!? Most known attacks are of this form. Exception: ASIACRYPT 2018

slide-105
SLIDE 105

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Implication

g(L(x) + ki) = g(x) + εi and g(L(x) + kj) = g(x) + εj ⇒ g(L(x) + ki) = g(L(x) + kj) + (εi + εj) ⇔ g(y + ki + kj) = g(y) + (εi + εj) Linear Structure (ki + kj) is a linear structure of g. Recall: Linear space of a Boolean function g LS(g) := {α ∈ Fn

2 : x → g(x + α) + g(x) is constant}

slide-106
SLIDE 106

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

More Implications

Lemma Let g be an invariant for S-Layer for all Addki ◦ L then LS(g) contains ki + kj LS(g) is invariant under L. Focus on the simplest key-scheduling: ki = k + ci That is ki + kj = ci + cj

slide-107
SLIDE 107

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Existence of Non-Trivial Non-linear Invariant

Given D := {(ci + cj) | i, j ∈ {1, . . . , r}} we define WL(D) := smallest L-invariant subspace containing D Question Is there a non-trivial invariant g for the S-Layer such that WL(D) ⊆ LS(g)?

slide-108
SLIDE 108

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Dimension of WL(D)

Corollary If dim(WL(D)) ≥ n − 1 than such a g does not exist. Proof. Otherwise S-Layer has linear component. Proves that the attack does not work for e.g. LED Skinny-64-64

slide-109
SLIDE 109

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

More General

Theorem Let Q1, . . . Qr be the invariant factors of L. For any t ≤ r max

c1,...,ct dim WL({c1, . . . , ct}) = t

  • i=1

deg Qi Study the invariant factors of the linear layer! Explains required number of constants Explains how to choose them Works independent of S-layer.

slide-110
SLIDE 110

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Examples

2 4 6 8 10 12 14 16 18 20 22 24 26 0.2 0.4 0.6 0.8 1 #D P(dim WL(D) = 64) LED Skinny64 Prince Mantis

slide-111
SLIDE 111

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

But....

Insider Information III/III

slide-112
SLIDE 112

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

But....

Insider Information III/III Remember: It has to work for both S and L analysis independend of the Sbox

S L S L S L S S S S S S S k1 k2 kt

slide-113
SLIDE 113

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Cosmetic Changes

S S S L k1

slide-114
SLIDE 114

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Cosmetic Changes

S S S L k1

slide-115
SLIDE 115

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Cosmetic Changes

S S S T T T T −1 T −1 T −1 L k1

slide-116
SLIDE 116

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Cosmetic Changes

S S S T T T T −1 T −1 T −1 L k1

slide-117
SLIDE 117

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

Cosmetic Changes

S S S T T T T −1 T −1 T −1 L k1

slide-118
SLIDE 118

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

What does it mean?

S S S T T T T −1 T −1 T −1 L k1 S S S L k1

The argument might work for one but not for the other representation!

slide-119
SLIDE 119

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

What does it mean?

Important Restriction The argument is an argument for the security of a representation of the cipher Not what we really want Can we remove the restriction? More General Not an uncommon restriction.

slide-120
SLIDE 120

Intro Invariant Subspace Attack Non-linear Invariant Attack How to prevent those attacks

What does it mean?

Important Restriction The argument is an argument for the security of a representation of the cipher Not what we really want Can we remove the restriction? More General Not an uncommon restriction. Thank you very much for your attention!