Breaking The FF3 Format- Preserving Encryption Standard Over Small - - PowerPoint PPT Presentation

breaking the ff3 format preserving encryption standard
SMART_READER_LITE
LIVE PREVIEW

Breaking The FF3 Format- Preserving Encryption Standard Over Small - - PowerPoint PPT Presentation

Breaking The FF3 Format- Preserving Encryption Standard Over Small Domains F. Betl Durak Serge Vaudenay 1 Block Ciphers {0,1} 128 0x149E00A50F0F00D6 K AES {0,1} 128 0xA4F22C1B78HE90A9 2 Block Ciphers {0,1} 128


slide-1
SLIDE 1

Breaking The FF3 Format- Preserving Encryption Standard Over Small Domains

  • F. Betül Durak

Serge Vaudenay

1

slide-2
SLIDE 2

Block Ciphers

AES

0x149E00A50F0F00D6 0xA4F22C1B78HE90A9

K ∈ {0,1}128 ∈ {0,1}128

2

slide-3
SLIDE 3

Block Ciphers

AES

0x149E00A50F0F00D6 0xA4F22C1B78HE90A9

K ∈ {0,1}128 ∈ {0,1}128 Strict with specific domains: bit-strings of length 128.

2

slide-4
SLIDE 4

Format-Preserving Encryption (FPE) [Brightwell and Smith, 1997],

[Black and Rogaway, 2002], [Spies’08],[BRRS’09],…

3

FPE

2938

K ∈ D ∈ D

7381

slide-5
SLIDE 5

Format-Preserving Encryption (FPE) [Brightwell and Smith, 1997],

[Black and Rogaway, 2002], [Spies’08],[BRRS’09],…

Legacy databases:

  • Passcodes
  • Social security numbers (SSN) |D|≈ 230
  • Credit card numbers (CCN) |D|≈ 251

3

FPE

2938

K ∈ D ∈ D

7381

slide-6
SLIDE 6

FPE in Practice: Encrypted Databases

Patients Passcode SSN Alice Yan 2356 34-582-9381 Bob Wu 4567 75-682-8345 … … … Sam Xi 9056 26-734-2108

4

slide-7
SLIDE 7

FPE in Practice: Encrypted Databases

  • Transparent encryption in legacy databases.

4

Patients Passcodes SSNs Alice Yan xxxx xxxxx-9381 Bob Wu xxxx xxxxx-8345 … … … Sam Xi xxxx xxxxx-2108

slide-8
SLIDE 8

Main FPE Challenge: Domain Mismatch

90D8

truncated 
 ciphertext

5

AES

0x149E00A50F0F00D6 0xA4F22C1B78HE90D8

K ∈ {0,1}128 ∈ {0,1}128

padded passcode

slide-9
SLIDE 9

Main FPE Challenge: Domain Mismatch

We cannot decrypt!

90D8

truncated 
 ciphertext

5

AES

0x149E00A50F0F00D6 0xA4F22C1B78HE90D8

K ∈ {0,1}128 ∈ {0,1}128

padded passcode

slide-10
SLIDE 10

FPE Constructions

  • Provably secure [HMR’12, RY’13, MR’14]
  • Not fast enough to use in practice.

6

slide-11
SLIDE 11

FPE Constructions

  • Provably secure [HMR’12, RY’13, MR’14]
  • Not fast enough to use in practice.
  • NIST Special Publications 800-38G:
  • Practical [BRS (FF1), V (FF2), BPS (FF3)]
  • Security by cryptanalysis (Voilà!).
  • FF1 and FF3 (somewhat balanced Feistel).

6

slide-12
SLIDE 12

Feistel Network (1973)

7

c = x ⊞ F0(y) d = y ⊞ F1(c)

P=x||y C=z||t

An instance of (balanced) Feistel network on domain D2

slide-13
SLIDE 13

Feistel Network (1973)

7

c = x ⊞ F0(y) d = y ⊞ F1(c)

P=x||y C=z||t

any secure PRF

  • nto domain D

An instance of (balanced) Feistel network on domain D2

slide-14
SLIDE 14

Feistel Network (1973)

7

c = x ⊞ F0(y) d = y ⊞ F1(c)

P=x||y C=z||t

any secure PRF

  • nto domain D

group operation defined on D

An instance of (balanced) Feistel network on domain D2

slide-15
SLIDE 15

Tweakable Format Preserving Encryption

8

FPE

P1

K ∈ D ∈ D

C1

FPE

P2

K ∈ D ∈ D

C2

Pr[P1=P2] is high with small domains, hence C1=C2

slide-16
SLIDE 16

Tweakable Format Preserving Encryption

8

FPE

P1

K ∈ D ∈ D

C1

FPE

P2

K ∈ D ∈ D

C2

T1 T2 When P1=P2 and T1≠T2, C1≠C2

slide-17
SLIDE 17

Feistel Networks in FF3

9

FPE: An encryption scheme on domain (i.e, domain size is ) when is really small, typically defined as .

N N 2

N ≪ 2128

ZN × ZN

slide-18
SLIDE 18

Feistel Networks in FF3

9

FPE: An encryption scheme on domain (i.e, domain size is ) when is really small, typically defined as .

N N 2

N ≪ 2128

ZN × ZN

mod N AES T0 y || K

padded 96-bit 32-bit tweak

slide-19
SLIDE 19

Feistel Networks in FF3

9

The secret key and tweaks are dropped in notation from now on.

FPE: An encryption scheme on domain (i.e, domain size is ) when is really small, typically defined as .

N N 2

N ≪ 2128

ZN × ZN

mod N AES T0 y || K

padded 96-bit 32-bit tweak

slide-20
SLIDE 20

NIST Standard SP-800-38G (2016): FF3

  • Round number r=8 for FF3 (r=10 for FF1).
  • Domain size is at least 100.
  • Security:
  • Targeted security is 128-bit.
  • Security of Feistel networks inherits to FF3.
  • FF3 asserts chosen-plaintext security and even PRP

security against chosen-plaintext/-ciphertext attack.

10

slide-21
SLIDE 21

Part 1: We develop a new generic attack on Feistel networks.

Our Contributions (Briefly)

11

slide-22
SLIDE 22

Part 1: We develop a new generic attack on Feistel networks. Part 2: We give a total practical break to FF3 standard when the message domain is small.

Our Contributions (Briefly)

11

slide-23
SLIDE 23

Part 1: We develop a new generic attack on Feistel networks. Part 2: We give a total practical break to FF3 standard when the message domain is small.

  • Our attack works with the best known query and time complexity.

Our Contributions (Briefly)

11

slide-24
SLIDE 24

Part 1: We develop a new generic attack on Feistel networks. Part 2: We give a total practical break to FF3 standard when the message domain is small.

  • Our attack works with the best known query and time complexity.
  • It is easy fix in order to prevent it from present attack.

Our Contributions (Briefly)

11

slide-25
SLIDE 25

Equivalent Round Functions [BLP’15]

12

Are the round functions uniquely defined to encrypt messages?

slide-26
SLIDE 26

Equivalent Round Functions [BLP’15]

12

Are the round functions uniquely defined to encrypt messages?

F0

x y c

slide-27
SLIDE 27

Equivalent Round Functions [BLP’15]

12

Are the round functions uniquely defined to encrypt messages?

F0

x y c

F1

t

y c

slide-28
SLIDE 28

Equivalent Round Functions [BLP’15]

12

Are the round functions uniquely defined to encrypt messages?

F0

x y c

F1

t

y c

F2

z t

c

slide-29
SLIDE 29

Equivalent Round Functions [BLP’15]

12

Are the round functions uniquely defined to encrypt messages?

F0

x y c

F1

t

y c

F2

z t

c

F0

x y

c + δ

slide-30
SLIDE 30

Equivalent Round Functions [BLP’15]

12

Are the round functions uniquely defined to encrypt messages?

F0

x y c

F1

t

y c

F2

z t

c

−δ F1

t

y

c + δ

F0

x y

c + δ

slide-31
SLIDE 31

Equivalent Round Functions [BLP’15]

12

Are the round functions uniquely defined to encrypt messages?

F0

x y c

F1

t

y c

F2

z t

c

−δ F1

t

y

c + δ

−δ F2

z t

c + δ

F0

x y

c + δ

slide-32
SLIDE 32

Equivalent Round Functions [BLP’15]

12

Are the round functions uniquely defined to encrypt messages?

F0

x y c

F1

t

y c

F2

z t

c

−δ F1

t

y

c + δ

−δ F2

z t

c + δ

F0

x y

c + δ

(F0, F1, F2)

(F0(y) + δ, F1(c − δ), F2(t) − δ)

slide-33
SLIDE 33

Equivalent Round Functions [BLP’15]

The output of one arbitrary input y can be set arbitrarily in F0, yet it still gives the same input/output behavior of (F0, F1, F2).

12

Are the round functions uniquely defined to encrypt messages?

F0

x y c

F1

t

y c

F2

z t

c

−δ F1

t

y

c + δ

−δ F2

z t

c + δ

F0

x y

c + δ

(F0, F1, F2)

(F0(y) + δ, F1(c − δ), F2(t) − δ)

slide-34
SLIDE 34
  • attacker goal:
  • round-function-recovery: The adversary recovers the round

functions or one of the equivalent set of round functions in a Feistel network.

  • codebook-recovery: The adversary can recover the mapping
  • f each plaintext to its ciphertext.
  • Both attack goals are as powerful as secret key recovery.

Terminology

13

slide-35
SLIDE 35

Our Contributions, Part 1: Generic Attacks on Feistel Networks

N ln N N ln N

cite r attack type attack goal query time this work 3 known-plaintext round-function- recovery

14

slide-36
SLIDE 36

Our Contributions, Part 1: Generic Attacks on Feistel Networks

N ln N N ln N

cite r attack type attack goal query time this work 3 known-plaintext round-function- recovery this work 4 known-plaintext round-function- recovery [Biryukov- Leurent- Perrin’15] 4 chosen-plaintext and ciphertext round-function- recovery

N 3

15

slide-37
SLIDE 37

Our Contributions, Part 1: Generic Attacks on Feistel Networks

N ln N N ln N

cite r attack type attack goal query time this work 3 known-plaintext round-function- recovery this work 4 known-plaintext round-function- recovery [Biryukov- Leurent- Perrin’15] 4 chosen-plaintext and ciphertext round-function- recovery this work 5 chosen-plaintext round-function- recovery [Biryukov- Leurent- Perrin’15] 5 chosen-plaintext and ciphertext round-function- recovery this work ≥6 chosen-plaintext round-function- recovery

N 3

16

slide-38
SLIDE 38

Our Contributions, Part 1: Generic Attacks on Feistel Networks

cite r attack type attack goal query time this work 3 known-plaintext round-function- recovery this work 4 known-plaintext round-function- recovery [Biryukov- Leuren- Perrin’15] 4 chosen-plaintext and ciphertext round-function- recovery this work 5 chosen-plaintext round-function- recovery [Biryukov- Leurent- Perrin’15] 5 chosen-plaintext and ciphertext round-function- recovery this work ≥6 chosen-plaintext round-function- recovery

N 3

17

N ln N N ln N

slide-39
SLIDE 39
  • utput: (partial) tables for F0,F1,F2.

input: The set that consists of (xkykzktk) pairs with unknown intermediate values ck.

S

The Sketch of 3-round Attack

18

F0

1 ⋮ ⋮ y1 ⋮ ⋮ y0 ⋮ ⋮ yk ⋮ ⋮ N-1

F1

1 ⋮ ⋮ c1 ⋮ ⋮ c2 ⋮ ⋮ c0 ⋮ ⋮ N-1

F2

1 ⋮ ⋮ t2 ⋮ ⋮ t0 ⋮ ⋮ tk ⋮ ⋮ N-1

slide-40
SLIDE 40
  • utput: (partial) tables for F0,F1,F2.

input: The set that consists of (xkykzktk) pairs with unknown intermediate values ck.

S

The Sketch of 3-round Attack

19

F0

1 ⋮ ⋮ y1 ⋮ ⋮ y0 ⋮ ⋮ yk ⋮ ⋮ N-1

F1

1 ⋮ ⋮ c1 ⋮ ⋮ c2 ⋮ ⋮ c0 2 ⋮ ⋮ N-1

F2

1 ⋮ ⋮ t2 ⋮ ⋮ t0 25 ⋮ ⋮ tk ⋮ ⋮ N-1

Pick a pair (x0y0z0t0) arbitrarily. Set F0(y0)=0. c=x+F0(y) F1(c)=t-y F2(t)=z-c

slide-41
SLIDE 41
  • utput: (partial) tables for F0,F1,F2.

input: The set that consists of (xkykzktk) pairs with unknown intermediate values ck.

S

The Sketch of 3-round Attack

20

F0

1 ⋮ ⋮ y1 32 ⋮ ⋮ y0 ⋮ ⋮ yk ⋮ ⋮ N-1

F1

1 ⋮ ⋮ c1 14 ⋮ ⋮ c2 ⋮ ⋮ c0 2 ⋮ ⋮ N-1

F2

1 ⋮ ⋮ t2 ⋮ ⋮ t0=t1 25 ⋮ ⋮ tk ⋮ ⋮ N-1

Pick another pair (x1y1z1t1) with t1=t0 c=x+F0(y) F1(c)=t-y F2(t)=z-c

slide-42
SLIDE 42
  • utput: (partial) tables for F0,F1,F2.

input: The set that consists of (xkykzktk) pairs with unknown intermediate values ck.

S

The Sketch of 3-round Attack

21

F0

1 ⋮ ⋮ y1=y2 32 ⋮ ⋮ y0 ⋮ ⋮ yk ⋮ ⋮ N-1

F1

1 ⋮ ⋮ c1 14 ⋮ ⋮ c2 8 ⋮ ⋮ c0 2 ⋮ ⋮ N-1

F2

1 ⋮ ⋮ t2 41 ⋮ ⋮ t0=t1 25 ⋮ ⋮ tk ⋮ ⋮ N-1

Pick a third pair (x2y2z2t2) with y2=y1 c=x+F0(y) F1(c)=t-y F2(t)=z-c

slide-43
SLIDE 43
  • utput: (partial) tables for F0,F1,F2.

The Sketch of 3-round Attack

22

F0

1 12 ⋮ ⋮ y1 32 ⋮ ⋮ y0 ⋮ ⋮ yk 92 ⋮ ⋮ N-1 6

F1

56 1 ⋮ ⋮ c1 14 ⋮ ⋮ c2 8 ⋮ ⋮ c0 2 ⋮ ⋮ N-1 7

F2

5 1 87 ⋮ ⋮ t2 41 ⋮ ⋮ t0 25 ⋮ ⋮ tk 1 ⋮ ⋮ N-1 65

Continue yo-yo game until no more revealed.

slide-44
SLIDE 44

3-round Attack on Feistel Networks

  • Model the set as a bipartite graph:
  • vertices: two parties of values of all possible y and t.
  • edges: each (xyzt) pair from pairs in that forms an edge.

23

input: The set that consists of (xkykzktk) pairs. S

S S N

plaintext right half (y) ciphertext right half (t)

. . . y0 . . . N − 1

1 . . . t0 . . . N − 1

slide-45
SLIDE 45

3-round Attack on Feistel Networks

  • Model the set as a bipartite graph:
  • vertices: two parties of values of all possible y and t.
  • edges: each (xyzt) pair from pairs in that forms an edge.
  • The algorithm looks for the connected component starting from


an arbitrary vertex y0 that the algorithm starts with.

23

input: The set that consists of (xkykzktk) pairs. S

S S N

plaintext right half (y) ciphertext right half (t)

. . . y0 . . . N − 1

1 . . . t0 . . . N − 1

slide-46
SLIDE 46

3-round Attack on Feistel Networks

  • Model the set as a bipartite graph:
  • vertices: two parties of values of all possible y and t.
  • edges: each (xyzt) pair from pairs in that forms an edge.
  • The algorithm looks for the connected component starting from


an arbitrary vertex y0 that the algorithm starts with.

23

input: The set that consists of (xkykzktk) pairs. S

S S N

plaintext right half (y) ciphertext right half (t)

. . . y0 . . . N − 1

1 . . . t0 . . . N − 1

slide-47
SLIDE 47

3-round Attack on Feistel Networks

  • Model the set as a bipartite graph:
  • vertices: two parties of values of all possible y and t.
  • edges: each (xyzt) pair from pairs in that forms an edge.
  • The algorithm looks for the connected component starting from


an arbitrary vertex y0 that the algorithm starts with.

23

input: The set that consists of (xkykzktk) pairs. S

S S N

plaintext right half (y) ciphertext right half (t)

. . . y0 . . . N − 1

1 . . . t0 . . . N − 1

slide-48
SLIDE 48

3-round Attack on Feistel Networks

  • Model the set as a bipartite graph:
  • vertices: two parties of values of all possible y and t.
  • edges: each (xyzt) pair from pairs in that forms an edge.
  • The algorithm looks for the connected component starting from


an arbitrary vertex y0 that the algorithm starts with.

23

input: The set that consists of (xkykzktk) pairs. S

S S N

plaintext right half (y) ciphertext right half (t)

. . . y0 . . . N − 1

1 . . . t0 . . . N − 1

slide-49
SLIDE 49

3-round Attack on Feistel Networks

  • Model the set as a bipartite graph:
  • vertices: two parties of values of all possible y and t.
  • edges: each (xyzt) pair from pairs in that forms an edge.
  • The algorithm looks for the connected component starting from


an arbitrary vertex y0 that the algorithm starts with.

  • The graph is fully connected if the size of is .
  • The graph has a giant connected component if the size of is

23

input: The set that consists of (xkykzktk) pairs. S

S S S S N

N

plaintext right half (y) ciphertext right half (t)

. . . y0 . . . N − 1

1 . . . t0 . . . N − 1

N ln N

slide-50
SLIDE 50

Experimental Results

Let . thin: The fraction of recovered F0 depending on . thick: The fraction of experiments which fully recovers all functions over 10,000 independent runs.

|S| = θN

θ

24

slide-51
SLIDE 51

The Principle of 4-round Attack on Feistel Networks

  • If we characterize F0, then we can find intermediate c values.
  • If enough intermediate c values are known, we can run 

  • ur 3-round attack.
  • Again: We can set an output of F0 on an arbitrary point.

25

slide-52
SLIDE 52

Experimental Results

Results with and

N M #trials Pr[succ] 4 9 3864 3.60% 8 29 5791 29.11% 16 91 6585 49.83% 32 288 6814 62.91% 64 913 6981 73.80% 128 2897 6609 83.10% 256 9196 3154 89.22% 512 29193 212 92.45%

N: the domain size to a round function. M: query complexity with a parameter L. trials: independent runs of the attack. succ: entire round functions have been recovered.

26

slide-53
SLIDE 53

Quick Look: FF3 Encryption

FF3 with tweak T = (TL, TR)

27

x y z t

slide-54
SLIDE 54

Quick Look: FF3 Encryption

FF3 with tweak T = (TL, TR) pairwise different round functions

27

x y z t

slide-55
SLIDE 55

Our Contributions, Part 2: Slide Attacks on FF3 Standard

cite construction attack type attack goal query time #tweaks this work FF3 (8-round tweakable Feistel Network) chosen- plaintext round-function- recovery 2

[Bellare- Hoang- Tessaro’16]

FF3 & FF1 (8 &10-round tweakable Feistel Network) chosen- plaintext partial-message- recovery (left half) 3

O(N

11 6 )O(N 5)

O(log(N)N r−3)

28

slide-56
SLIDE 56

Slide Attack

x y z t FF3 with tweak T = (TL, TR)

29

slide-57
SLIDE 57

Slide Attack

x y z t FF3 with tweak T = (TL, TR) x y z t FF3 with tweak T ′ = (TL, TR) ⊕ (4, 4)

29

slide-58
SLIDE 58

Slide Attack

x y z t FF3 with tweak T = (TL, TR) x y z t FF3 with tweak T ′ = (TL, TR) ⊕ (4, 4)

29

G G

slide-59
SLIDE 59

Slide Attack

x y z t FF3 with tweak T = (TL, TR) x y z t FF3 with tweak T ′ = (TL, TR) ⊕ (4, 4)

29

G H G H

slide-60
SLIDE 60

Chosen Plaintext Attack on FF3

xy1

30

slide-61
SLIDE 61

Chosen Plaintext Attack on FF3

xy1

30

xy1 xy1

1

xy1

2

. . . xy1

B

= ET

K

slide-62
SLIDE 62

Chosen Plaintext Attack on FF3

xy1 xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

30

xy1 xy1

1

xy1

2

. . . xy1

B

= ET

K

slide-63
SLIDE 63

Chosen Plaintext Attack on FF3

xy1 xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

30

xy1 xy1

1

xy1

2

. . . xy1

B

ET ⊕(4,4)

K

=

xy1 xy1

1

xy1

2

. . . xy1

B

= ET

K

slide-64
SLIDE 64

Chosen Plaintext Attack on FF3

xy1 xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xyi

j

xyi

j+1

xyi

j+2

xyi

j+3

xyi′ xyi′

1

xyi′

2

xyi′

3

30

xy1 xy1

1

xy1

2

. . . xy1

B

ET ⊕(4,4)

K

=

xy1 xy1

1

xy1

2

. . . xy1

B

= ET

K

slide-65
SLIDE 65

Chosen Plaintext Attack on FF3

xy1 xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xyi

j

xyi

j+1

xyi

j+2

xyi

j+3

xyi′ xyi′

1

xyi′

2

xyi′

3

30

xy1 xy1

1

xy1

2

. . . xy1

B

ET ⊕(4,4)

K

=

xy1 xy1

1

xy1

2

. . . xy1

B

= ET

K

slide-66
SLIDE 66

Chosen Plaintext Attack on FF3

xy1 xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xyi

j

xyi

j+1

xyi

j+2

xyi

j+3

xyi′ xyi′

1

xyi′

2

xyi′

3

30

xy1 xy1

1

xy1

2

. . . xy1

B

ET ⊕(4,4)

K

=

xy1 xy1

1

xy1

2

. . . xy1

B

= ET

K

If , then . G(xyi

j) = xyi′

H(xyi′

0 ) = xyi j+1

slide-67
SLIDE 67

Chosen Plaintext Attack on FF3

xy1 xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xy2 xy2

1

xy2

2

. . . xy2

B

xyA xyA

1

xyA

2

. . . xyA

B

· · · · · · · · · · · ·

xyi

j

xyi

j+1

xyi

j+2

xyi

j+3

xyi′ xyi′

1

xyi′

2

xyi′

3

30

xy1 xy1

1

xy1

2

. . . xy1

B

ET ⊕(4,4)

K

=

xy1 xy1

1

xy1

2

. . . xy1

B

= ET

K

If , then . G(xyi

j) = xyi′

H(xyi′

0 ) = xyi j+1

slide-68
SLIDE 68

Chosen Plaintext Attack on FF3

xyi

j

xyi

j+1

xyi

j+2

xyi

j+3

xyi′ xyi′

1

xyi′

2

xyi′

3

30

If , then . G(xyi

j) = xyi′

H(xyi′

0 ) = xyi j+1

Pr ( two segments of length defined with and

  • verlap on at least points) ≈ .

M

xyi′

2(B − M) N 2

B

xyi

j

slide-69
SLIDE 69

Experimental Results

Results with , , , and

B = 2M

N M A B #trials Pr[succ] 2 3 1 6 10000 0.00% 4 9 1 18 10000 1.40% 8 29 2 58 10000 17.99% 16 91 2 182 10000 35.35% 32 288 2 576 10000 45.89% 64 913 2 1826 10000 54.14% 128 2897 2 5794 10000 56.85% 256 9196 2 18392 5098 56.34% 512 29193 3 58386 256 77.73%

A = N √ 2M

31

N: the domain size to a round function. M: the query complexity of 4-round attack with a parameter L. A: the number of arbitrary plaintext to apply chain encryption. B: the length of the chain encryption.

slide-70
SLIDE 70

Conclusions

  • Feistel Networks over small domains are not well understood yet.
  • We need more research for generic attacks on Feistel networks.

32

slide-71
SLIDE 71

Conclusions

  • Feistel Networks over small domains are not well understood yet.
  • We need more research for generic attacks on Feistel networks.
  • FF3 suffers from very bad domain separation.
  • Fix to prevent from this attack: concatenate the tweak and round

index.

32

slide-72
SLIDE 72

Thank You!

33

slide-73
SLIDE 73

Security of Feistel Networks

: round numbers : number of queried plaintext : domain size of Feistel network

r q N 2

34

Security Proofs: [Patarin’10] proved that

  • No distinguisher exists with known plaintext when .
  • No distinguisher exists with chosen plaintext when .
  • No distinguisher exists with chosen plaintext/ciphertext .
  • If no distinguisher is possible, no other attack is possible either.

q ≪ N r ≥ 4 r ≥ 5 r ≥ 6 q ≪ N q ≪ N Information theory: The adversary needs known plaintext to recover all the round functions. q = r 2N Trivial attack: When the adversary knows the encryption of plaintext, it obtains the entire codebook for any r. q = N 2

slide-74
SLIDE 74

Warm Up: 2-round Feistel Networks

  • N2 known-plaintext attack is trivial.
  • Can we figure out a round-function-recovery with less than

N2 known-plaintext?

  • Each known plaintext/ciphertext gives a point in round

functions.

  • Since we know x and z, it is easy to derive F0(y)=z-x.
  • We simply compute F1(z)=t-y.
  • N (when N << N2) known plaintext recovers the all the

round functions with good probability.

z= x + F0(y) t = y + F1(z) F0,F1 are round functions. x||y ∈ , so is z||t.

ZN × ZN

35

slide-75
SLIDE 75

The Principle of 4-round Attack on Feistel Networks

36

slide-76
SLIDE 76

The Principle of 4-round Attack on Feistel Networks

36

Find collision on to characterize F0.

c = c′

slide-77
SLIDE 77

The Principle of 4-round Attack on Feistel Networks

Property: If , then =F0( ) - F0( )

x − x′

y′ y

c = c′

36

Find collision on to characterize F0.

c = c′

slide-78
SLIDE 78

The Principle of 4-round Attack on Feistel Networks

Property: If , then =F0( ) - F0( )

x − x′

y′ y

c = c′

36

Problem: Adversary cannot check if .

c = c′

slide-79
SLIDE 79

The Principle of 4-round Attack on Feistel Networks

V = {(xyzt, x′y′z′t′)|z′ = z, t′ − y′ = t − y, xy ̸= x′y′}

Property: If , then =F0( ) - F0( )

x − x′

y′ y

c = c′

36

Problem: Adversary cannot check if .

c = c′

slide-80
SLIDE 80

The Principle of 4-round Attack on Feistel Networks

V = {(xyzt, x′y′z′t′)|z′ = z, t′ − y′ = t − y, xy ̸= x′y′} Vgood = {(xyzt, x′y′z′t′)|z′ = z, c′ = c, xy ̸= x′y′} ⊆ V

Property: If , then =F0( ) - F0( )

x − x′

y′ y

c = c′

36

Problem: Adversary cannot check if .

c = c′

slide-81
SLIDE 81

The Principle of 4-round Attack on Feistel Networks

V = {(xyzt, x′y′z′t′)|z′ = z, t′ − y′ = t − y, xy ̸= x′y′} Vgood = {(xyzt, x′y′z′t′)|z′ = z, c′ = c, xy ̸= x′y′} ⊆ V

Define label(xyzt, x′y′z′t′) = x − x′ Property: If , then =F0( ) - F0( )

x − x′

y′ y

c = c′

x1 − x′

1

v1

x2 − x′

2

v2

x3 − x′

3

v3

x4 − x′

4

v4

36

Problem: Adversary cannot check if .

c = c′

slide-82
SLIDE 82

How to Identify Good Vertices?

Define a graph with

G = (V, E)

E = {x1y1z1t1x′

1y′ 1z′ 1t′ 1, x2y2z2t2x′ 2y′ 2z′ 2t′ 2|y′ 1 = y2}

37

slide-83
SLIDE 83

How to Identify Good Vertices?

Define a graph with

G = (V, E)

E = {x1y1z1t1x′

1y′ 1z′ 1t′ 1, x2y2z2t2x′ 2y′ 2z′ 2t′ 2|y′ 1 = y2}

Property: If is a cycle with all in , then

Vgood

L

  • i=1

label(vi) = 0

v1v2 . . . vL

vi

37

slide-84
SLIDE 84

How to Identify Good Vertices?

Define a graph with

G = (V, E)

E = {x1y1z1t1x′

1y′ 1z′ 1t′ 1, x2y2z2t2x′ 2y′ 2z′ 2t′ 2|y′ 1 = y2}

Property: If is a cycle with all in , then

Vgood

L

  • i=1

label(vi) = 0

v1v2 . . . vL

vi

x1 − x′

1

v1

x2 − x′

2

v2

x3 − x′

3

v3

x4 − x′

4

v4

37

slide-85
SLIDE 85

How to Identify Good Vertices?

Define a graph with

G = (V, E)

E = {x1y1z1t1x′

1y′ 1z′ 1t′ 1, x2y2z2t2x′ 2y′ 2z′ 2t′ 2|y′ 1 = y2}

Property: If is a cycle with all in , then

Vgood

L

  • i=1

label(vi) = 0

v1v2 . . . vL

vi

v1 v2 v3 v4

F0(y′

1) − F0(y1)

F0(y′

2) − F0(y2)

F0(y′

3) − F0(y3)

F0(y′

4) − F0(y4)

37

slide-86
SLIDE 86

Lemma 1: For random and F0,F1,F2,F3,

Pr[v ∈ Vgood|v ∈ V ] = 1 − 1

N

2 − 1

N

≈ 1 2

v = xyztx′y′z′t′

Lemma 2: trivial cycle: v1 and v2 are permutation of each other Conjecture: acceptable cycle: with 2L non-repeating plaintexts.

How to Identify Good Vertices?

38

slide-87
SLIDE 87

Chosen Plaintext Attack on FF3

  • We derive and .

B = 2M

A = N √ 2M

  • Let be the cycle spanned by with .
  • Let be the cycle spanned by with .

Ci

C

i′

xyi′ xyi

T

T ⊕ (4, 4)

  • E (length( ) | and in the same cycle ) ≈ .

2N 2 3

xyi′

Ci

xyi

  • Pr ( and in the same cycle (of any length)) ≈ .

1 2

xyi xyi′

  • Pr ( two segments of length defined with and
  • verlap on at least points) ≈ .

M

xyi xyi′

2(B − M) N 2

B

  • Pr (no such and exist) ≈ when .

i

i′

e

−2MA2 N2

B = 2M

39

slide-88
SLIDE 88

input:

T

Chosen Plaintext Attack on FF3

40

slide-89
SLIDE 89

input:

T

Chosen Plaintext Attack on FF3

T ′ = T ⊕ (4, 4)

40

slide-90
SLIDE 90

input:

T

Chosen Plaintext Attack on FF3

T ′ = T ⊕ (4, 4)

for do pick and set for pick and set for end for

i = 1 to A

j = 1, . . . , B j = 1, . . . , B

xyi

xyi

j = FF3.ET K(xyi j−1)

xyi

j = FF3.ET ′ K (xyi j−1)

xyi

40

slide-91
SLIDE 91

input:

T

Chosen Plaintext Attack on FF3

T ′ = T ⊕ (4, 4)

for do for do assume run 4-round attack on with for k=0,…,B-j if successful, do the same with and conclude. end for for do assume …same… end for end for

i, i′ = 1, . . . A

j = 0 to B − M − 1

H G

j = 0 to B − M − 1

G(xyi

j) = xyi′

G(xyi

j+k) = xyi′ k

G(xyi

0) = xyi′ j′

for do pick and set for pick and set for end for

i = 1 to A

j = 1, . . . , B j = 1, . . . , B

xyi

xyi

j = FF3.ET K(xyi j−1)

xyi

j = FF3.ET ′ K (xyi j−1)

xyi

40