observations on the simon block cipher family Stefan Klbl 1 - - PowerPoint PPT Presentation

observations on the simon block cipher family
SMART_READER_LITE
LIVE PREVIEW

observations on the simon block cipher family Stefan Klbl 1 - - PowerPoint PPT Presentation

Gregor Leander 2 Tyge Tiessen 1 August 17, 2015 1 DTU Compute, Technical University of Denmark, Denmark 2 Horst Grtz Institute for IT Security, Ruhr-Universitt Bochum, Germany observations on the simon block cipher family Stefan Klbl 1


slide-1
SLIDE 1
  • bservations on the simon block cipher family

Stefan Kölbl1 Gregor Leander2 Tyge Tiessen1 August 17, 2015

1DTU Compute, Technical University of Denmark, Denmark 2Horst Görtz Institute for IT Security, Ruhr-Universität Bochum, Germany

slide-2
SLIDE 2

lightweight cryptography

slide-3
SLIDE 3

Lightweight Cryptography

What is Lightweight Cryptography? ∙ Design primitives for resource-constraint environments like RFID tags. ∙ Lot of attention over the last few years. ∙ NIST started to investigate the possibility to standardize primitives. Design Criteria ∙ Chip-area ∙ Latency ∙ Code-size ∙ ...

2

slide-4
SLIDE 4

SIMON

Simon is a family of block ciphers designed by NSA. ∙ “Published” in 2013 on the ePrint archive. ∙ Lightweight design for hardware. block size key sizes 32 64 48 72, 96 64 96, 128 96 96, 144 128 128, 192, 256

3

slide-5
SLIDE 5

SIMON

Feistel Network ∙ Simple round function ∙ Between 32 and 72 rounds S8 S1 S2 ∧ Ki

4

slide-6
SLIDE 6

SIMON

Cryptanalysis of Simon ∙ No (public) cryptanalysis or security arguments from the designers. ∙ Many contributions by the cryptographic community. ∙ Attacks cover up to 74% of the rounds.

5

slide-7
SLIDE 7

properties of simon

slide-8
SLIDE 8

Differential and Linear

Any cipher should have reasonable security margin against differential and linear cryptanalysis. ∙ For SPN designs easier to show bounds. ∙ Difficult for ARX, Simon. ∙ Best attacks on Simon are based on differential and linear cryptanalysis.

7

slide-9
SLIDE 9

Differential Cryptanalysis

Differential Cryptanalysis: ∙ Observe how difference propagate through the round function. ∙ Find correlations between input and output difference. x

f

y x′

f

y′ α = x ⊕ x′ β = y ⊕ y′

8

slide-10
SLIDE 10

Differential Cryptanalysis

We are interested in: ∙ Probability for one round: Pr(α

f

− → β) ∙ Differential characteristics: Pr(α

f

− → β

f

− → γ) ∙ Differentials: ∑

x

Pr(α

f

− → x

f

− → γ) x

f

y x′

f

y′ α β

9

slide-11
SLIDE 11

Differential Cryptanalysis

We are interested in: ∙ Probability for one round: Pr(α

f

− → β) ∙ Differential characteristics: Pr(α

f

− → β

f

− → γ) ∙ Differentials: ∑

x

Pr(α

f

− → x

f

− → γ) x f y f z x′ f y′ f z′ α β γ

9

slide-12
SLIDE 12

Differential Cryptanalysis

We are interested in: ∙ Probability for one round: Pr(α

f

− → β) ∙ Differential characteristics: Pr(α

f

− → β

f

− → γ) ∙ Differentials: ∑

x

Pr(α

f

− → x

f

− → γ) x f f z x′ f f z′ α γ

9

slide-13
SLIDE 13

Differential and Linear

For the analysis we use an equivalent representation for Simon S8 S1 S2 ∧ Ki

10

slide-14
SLIDE 14

Differential and Linear

For the analysis we use an equivalent representation for Simon S1 ∧ Ki

10

slide-15
SLIDE 15

Differential and Linear

We look at a message m = (mn−1, . . . , m1, m0) and an input difference d = (dn−1, . . . , d1, d0). The output difference f(m) ⊕ f(m ⊕ d) is then given by: Di(m, d) =              0, if di = 0 and di−1 = 0 mi if di 0 and di

1

1 mi

1

if di 1 and di

1

mi mi

1

if di 1 and di

1

1 (1)

11

slide-16
SLIDE 16

Differential and Linear

We look at a message m = (mn−1, . . . , m1, m0) and an input difference d = (dn−1, . . . , d1, d0). The output difference f(m) ⊕ f(m ⊕ d) is then given by: Di(m, d) =              0, if di = 0 and di−1 = 0 mi, if di = 0 and di−1 = 1 mi

1

if di 1 and di

1

mi mi

1

if di 1 and di

1

1 (1)

11

slide-17
SLIDE 17

Differential and Linear

We look at a message m = (mn−1, . . . , m1, m0) and an input difference d = (dn−1, . . . , d1, d0). The output difference f(m) ⊕ f(m ⊕ d) is then given by: Di(m, d) =              0, if di = 0 and di−1 = 0 mi, if di = 0 and di−1 = 1 mi−1, if di = 1 and di−1 = 0 mi mi

1

if di 1 and di

1

1 (1)

11

slide-18
SLIDE 18

Differential and Linear

We look at a message m = (mn−1, . . . , m1, m0) and an input difference d = (dn−1, . . . , d1, d0). The output difference f(m) ⊕ f(m ⊕ d) is then given by: Di(m, d) =              0, if di = 0 and di−1 = 0 mi, if di = 0 and di−1 = 1 mi−1, if di = 1 and di−1 = 0 mi ⊕ mi−1, if di = 1 and di−1 = 1 . (1)

11

slide-19
SLIDE 19

Differential and Linear

Let us now look at a first example. Let n = 6, and d = 001010. We then calculate D(m, d) using the above bitwise definition of D: i 5 4 3 2 1 d 1 1 S1(d) 1 1 D(m, d) m4 m2 m2 m0 . (2) Resulting difference only depends on m0 m2 m4. Therefore we have 8 possible output differences.

12

slide-20
SLIDE 20

Differential and Linear

Let us now look at a first example. Let n = 6, and d = 001010. We then calculate D(m, d) using the above bitwise definition of D: i 5 4 3 2 1 d 1 1 S1(d) 1 1 D(m, d) m4 m2 m2 m0 . (2) Resulting difference only depends on m0 m2 m4. Therefore we have 8 possible output differences.

12

slide-21
SLIDE 21

Differential and Linear

Let us now look at a first example. Let n = 6, and d = 001010. We then calculate D(m, d) using the above bitwise definition of D: i 5 4 3 2 1 d 1 1 S1(d) 1 1 D(m, d) m4 m2 m2 m0 . (2) Resulting difference only depends on m0 m2 m4. Therefore we have 8 possible output differences.

12

slide-22
SLIDE 22

Differential and Linear

Let us now look at a first example. Let n = 6, and d = 001010. We then calculate D(m, d) using the above bitwise definition of D: i 5 4 3 2 1 d 1 1 S1(d) 1 1 D(m, d) m4 m2 m2 m0 . (2) Resulting difference only depends on m0 m2 m4. Therefore we have 8 possible output differences.

12

slide-23
SLIDE 23

Differential and Linear

Let us now look at a first example. Let n = 6, and d = 001010. We then calculate D(m, d) using the above bitwise definition of D: i 5 4 3 2 1 d 1 1 S1(d) 1 1 D(m, d) m4 m2 m2 m0 . (2) Resulting difference only depends on m0 m2 m4. Therefore we have 8 possible output differences.

12

slide-24
SLIDE 24

Differential and Linear

Let us now look at a first example. Let n = 6, and d = 001010. We then calculate D(m, d) using the above bitwise definition of D: i 5 4 3 2 1 d 1 1 S1(d) 1 1 D(m, d) m4 m2 m2 m0 . (2) Resulting difference only depends on m0 m2 m4. Therefore we have 8 possible output differences.

12

slide-25
SLIDE 25

Differential and Linear

Let us now look at a first example. Let n = 6, and d = 001010. We then calculate D(m, d) using the above bitwise definition of D: i 5 4 3 2 1 d 1 1 S1(d) 1 1 D(m, d) m4 m2 m2 m0 . (2) Resulting difference only depends on m0, m2, m4. Therefore we have 8 possible output differences.

12

slide-26
SLIDE 26

Differential and Linear

Can compute the differential probability with simple bit operations. The bits which can be non-zero at the output: varibits = α ∨ S1(α) (3) The bits which have to be equal to their right neighbour: doublebits = α ∧ S1(α) ∧ S2(α) (4)

13

slide-27
SLIDE 27

Differential and Linear

For our previous example: varibits = 011110 doublebits = 001000 Possible output differences: 000000 000010 001100 001110 010000 010010 011100 011110

14

slide-28
SLIDE 28

Differential and Linear

For our previous example: varibits = 011110 doublebits = 001000 Possible output differences: 000000 000010 001100 001110 010000 010010 011100 011110

15

slide-29
SLIDE 29

Differential and Linear

For our previous example: varibits = 011110 doublebits = 001000 Possible output differences: 000000 000010 001100 001110 010000 010010 011100 011110

16

slide-30
SLIDE 30

Differential and Linear

A valid differential (α → β) has to satisfy: ∙ There can only be a difference at βi, if varibitsi is equal to 1. ∙ If doublebitsi is 1, then βi = βi−1. The probability is then given by: Pr(α → β) = 2− wt(varibits⊕doublebits) (5)

17

slide-31
SLIDE 31

Differential and Linear

A valid differential (α → β) has to satisfy: ∙ There can only be a difference at βi, if varibitsi is equal to 1. ∙ If doublebitsi is 1, then βi = βi−1. The probability is then given by: Pr(α → β) = 2− wt(varibits⊕doublebits) (5)

17

slide-32
SLIDE 32

Differential and Linear

Apply affine transformation for Simon round function. ∙ Proofs in the paper. ∙ Similar approach for linear cryptanalysis.

18

slide-33
SLIDE 33

finding optimal differential and linear characteristics

slide-34
SLIDE 34

Optimal Characteristics

We are interested in differential and linear characteristics with high probability. ∙ We use an approach based on SAT/SMT solvers, similar to results

  • n Salsa20 [MP13] or NORX [AJN15].

∙ Gives upper bounds on the probability. ∙ Estimate probability of the differentials. ∙ Open Source1

1https://github.com/kste/cryptosmt

20

slide-35
SLIDE 35

Optimal Characteristics

xi yi S8 S1 S2 xi+1 yi+1 zi Constraints: ∙ Use our previous observations on varibits and doublebits. ∙ Probability for one round is wi = wt(varibits ⊕ doublebits).

21

slide-36
SLIDE 36

Lower Bounds

Use this to find characteristic with probability 2−w: ∙ Add constraints for each round. ∙ Check if w =

r−1

i=0

wi. ∙ Increase w if no solution was found. We ran experiments for Simon32, Simon48 and Simon64.

22

slide-37
SLIDE 37

Lower Bounds

2−15 2−20 2−25 2−30 2−35 2−40 2−45 2−50 7 8 9 10 11 12 13 14 15 16 Probability of best characteristic Number of Rounds Simon32 Simon48 Simon64

23

slide-38
SLIDE 38

Lower Bounds

2−15 2−20 2−25 2−30 2−35 2−40 2−45 2−50 7 8 9 10 11 12 13 14 15 16 Probability of best characteristic Number of Rounds Simon32 Simon48 Simon64

23

slide-39
SLIDE 39

Lower Bounds

2−15 2−20 2−25 2−30 2−35 2−40 2−45 2−50 7 8 9 10 11 12 13 14 15 16 Probability of best characteristic Number of Rounds Simon32 Simon48 Simon64

23

slide-40
SLIDE 40

Differentials

What about differentials? ∙ Often assumed that probability of the best characteristics can be used to estimate probability of the best differential. ∙ Only inaccurate estimate for Simon. We estimate the probability of a differential ∙ Add constraints for each round. ∙ Set (x0, y0) = ∆in and (xr, yr) = ∆out. ∙ Find all solutions for increasing values of w.

24

slide-41
SLIDE 41

Differentials

We can determine the interval for the characteristics contributing to a differential [wmin, wmax]. ∙ Covering the whole interval is computationally expensive. ∙ Gives better estimate than previous results. Cipher Rounds wmin wmax log2(p) Simon32 13 36 91 (91) −28.79 Simon48 16 50 256 (68) −44.33 Simon64 21 68 453 (89) −57.57

25

slide-42
SLIDE 42

Differentials

20 25 210 215 220 2−40 2−50 2−60 2−70 2−80 2−90 #Characteristics Probability of one characteristic

26

slide-43
SLIDE 43

Differentials

2−36 2−35 2−34 2−33 2−32 2−31 2−30 2−29 2−28 2−40 2−50 2−60 2−70 2−80 2−90 Differential Probability Probability of one characteristic

Probability Measured DP

90 Seconds 3 Hours 1 Month

27

slide-44
SLIDE 44

Differentials

2−36 2−35 2−34 2−33 2−32 2−31 2−30 2−29 2−28 2−40 2−50 2−60 2−70 2−80 2−90 Differential Probability Probability of one characteristic

Probability Measured DP

90 Seconds 3 Hours 1 Month

27

slide-45
SLIDE 45

Differentials

2−36 2−35 2−34 2−33 2−32 2−31 2−30 2−29 2−28 2−40 2−50 2−60 2−70 2−80 2−90 Differential Probability Probability of one characteristic

Probability Measured DP

90 Seconds 3 Hours 1 Month

27

slide-46
SLIDE 46

Differentials

2−36 2−35 2−34 2−33 2−32 2−31 2−30 2−29 2−28 2−40 2−50 2−60 2−70 2−80 2−90 Differential Probability Probability of one characteristic

Probability Measured DP

90 Seconds 3 Hours 1 Month

27

slide-47
SLIDE 47

Differentials

2−36 2−35 2−34 2−33 2−32 2−31 2−30 2−29 2−28 2−40 2−50 2−60 2−70 2−80 2−90 Differential Probability Probability of one characteristic

Probability Measured DP

90 Seconds 3 Hours 1 Month

27

slide-48
SLIDE 48

rotation constants

slide-49
SLIDE 49

Rotation Constants

Possible Criteria: ∙ Simplicity ∙ Implementation costs ∙ Security? Are there parameters which are better with regard to some metrics?

29

slide-50
SLIDE 50

Rotation Constants

Basic test for diffusion: Block size 32 48 64 96 128 Standard parameters 7 8 9 11 13 Best possible 6 7 8 9 10 Rank 2nd 2nd 2nd 3rd 4th

30

slide-51
SLIDE 51

Rotation Constants

Bounds for differential and linear characteristics give us some interesting candidates: ∙ The bounds are as good as the original parameters or slightly better. ∙ Simon[12, 5, 3] offers best diffusion. ∙ Simon[7, 0, 2] offers best diffusion, when b = 0. ∙ Simon[1, 0, 2] has bad diffusion, but good bounds. What effect do the rotations constants have on differentials?

31

slide-52
SLIDE 52

Rotation Constants

Bounds for differential and linear characteristics give us some interesting candidates: ∙ The bounds are as good as the original parameters or slightly better. ∙ Simon[12, 5, 3] offers best diffusion. ∙ Simon[7, 0, 2] offers best diffusion, when b = 0. ∙ Simon[1, 0, 2] has bad diffusion, but good bounds. What effect do the rotations constants have on differentials?

31

slide-53
SLIDE 53

Rotation Constants

20 22 24 26 28 210 212 214 216 218 220 2−36 2−38 2−40 2−42 2−44 2−46 2−48 Number of Characteristics Probability of one characteristic Simon32[8, 1, 2] Simon32[7, 0, 2] Simon32[1, 0, 2] Simon32[12, 5, 3]

32

slide-54
SLIDE 54

Rotation Constants

20 22 24 26 28 210 212 214 216 218 220 2−36 2−38 2−40 2−42 2−44 2−46 2−48 Number of Characteristics Probability of one characteristic Simon32[8, 1, 2] Simon32[7, 0, 2] Simon32[1, 0, 2] Simon32[12, 5, 3]

32

slide-55
SLIDE 55

Rotation Constants

20 22 24 26 28 210 212 214 216 218 220 2−36 2−38 2−40 2−42 2−44 2−46 2−48 Number of Characteristics Probability of one characteristic Simon32[8, 1, 2] Simon32[7, 0, 2] Simon32[1, 0, 2] Simon32[12, 5, 3]

32

slide-56
SLIDE 56

Rotation Constants

20 22 24 26 28 210 212 214 216 218 220 2−36 2−38 2−40 2−42 2−44 2−46 2−48 Number of Characteristics Probability of one characteristic Simon32[8, 1, 2] Simon32[7, 0, 2] Simon32[1, 0, 2] Simon32[12, 5, 3]

32

slide-57
SLIDE 57

Conclusion

Contributions: ∙ Constant time algorithm for differential probability. ∙ Bounds on the probability of differential/linear characteristics. ∙ Compared quality of rotation constants. Open Problems: ∙ More refined analysis of the parameter space. ∙ Find efficient method to determine differential effect for different constants.

33

slide-58
SLIDE 58

questions?

34

slide-59
SLIDE 59

References I

Jean-Philippe Aumasson, Philipp Jovanovic, and Samuel Neves, Analysis of NORX: investigating differential and rotational properties, Progress in Cryptology - LATINCRYPT 2014 (Diego F. Aranha and Alfred Menezes, eds.), Lecture Notes in Computer Science, vol. 8895, Springer, 2015, pp. 306–324. Farzaneh Abed, Eik List, Stefan Lucks, and Jakob Wenzel, Differential cryptanalysis of round-reduced SIMON and SPECK, Fast Software Encryption, FSE 2014 (Carlos Cid and Christian Rechberger, eds.), Lecture Notes in Computer Science, vol. 8540, Springer, 2015, pp. 525–545.

35

slide-60
SLIDE 60

References II

Alex Biryukov, Arnab Roy, and Vesselin Velichkov, Differential analysis of block ciphers SIMON and SPECK, Fast Software Encryption, FSE 2014 (Carlos Cid and Christian Rechberger, eds.), Lecture Notes in Computer Science, vol. 8540, Springer, 2015,

  • pp. 546–570.

Ray Beaulieu, Douglas Shors, Jason Smith, Stefan Treatman-Clark, Bryan Weeks, and Louis Wingers, The SIMON and SPECK families of lightweight block ciphers, Cryptology ePrint Archive, Report 2013/404, 2013, http://eprint.iacr.org/. Nicky Mouha and Bart Preneel, Towards finding optimal differential characteristics for ARX: Application to Salsa20, Cryptology ePrint Archive, Report 2013/328, 2013, http://eprint.iacr.org/.

36