Some Cryptanalytic Results on TRIAD Abhishek Kesarwani IIT Madras, - - PowerPoint PPT Presentation

some cryptanalytic results on triad
SMART_READER_LITE
LIVE PREVIEW

Some Cryptanalytic Results on TRIAD Abhishek Kesarwani IIT Madras, - - PowerPoint PPT Presentation

Some Cryptanalytic Results on TRIAD Abhishek Kesarwani IIT Madras, India INDOCRYPT 2019 16 December 2019 (Joint work Santanu Sarkar and Ayineedi Venkateswarlu) Outline 2 Introduction TRIAD adopts Trivium -like Structure Attacks on Trivium


slide-1
SLIDE 1

Some Cryptanalytic Results on TRIAD

Abhishek Kesarwani

IIT Madras, India

INDOCRYPT 2019 16 December 2019

(Joint work Santanu Sarkar and Ayineedi Venkateswarlu)

slide-2
SLIDE 2

Outline

2

Introduction TRIAD adopts Trivium-like Structure Attacks on Trivium-like ciphers Our Contribution Conclusion

slide-3
SLIDE 3
slide-4
SLIDE 4

◮ Call for Lightweight Cryptographic Algorithms

slide-5
SLIDE 5

◮ Call for Lightweight Cryptographic Algorithms ◮ Total 56 candidates selected for Round 1

slide-6
SLIDE 6

◮ Call for Lightweight Cryptographic Algorithms ◮ Total 56 candidates selected for Round 1 ◮ TRIAD [2] is one of them

slide-7
SLIDE 7

TRIAD Family

4

TRIAD TRIAD-AE Triad-SC Triad-MAC TRIAD-HASH ◮ TRIAD-AE provides authenticated encryption with associated data

slide-8
SLIDE 8

TRIAD Family

4

TRIAD TRIAD-AE Triad-SC Triad-MAC TRIAD-HASH ◮ TRIAD-AE provides authenticated encryption with associated data ◮ TRIAD-HASH follows the extended sponge based construction

slide-9
SLIDE 9

TRIAD Family

5

TRIAD TRIAD-AE Triad-SC Triad-MAC TRIAD-HASH ◮ TRIAD-AE provides authenticated encryption with associated data ◮ TRIAD-HASH follows the extended sponge based construction

slide-10
SLIDE 10

TRIAD adopts Trivium-like Structure

slide-11
SLIDE 11

TRIAD-AE Vs Trivium

slide-12
SLIDE 12

TRIAD-AE Vs Trivium State size 256 bits 288 bits

slide-13
SLIDE 13

TRIAD-AE Vs Trivium State size 256 bits 288 bits Key size 128 bits 80 bits

slide-14
SLIDE 14

TRIAD-AE Vs Trivium State size 256 bits 288 bits Key size 128 bits 80 bits Nonce/IV size 96 bits 80 bits

slide-15
SLIDE 15

TRIAD-AE Vs Trivium State size 256 bits 288 bits Key size 128 bits 80 bits Nonce/IV size 96 bits 80 bits Initialization 1024 round 1152 round

slide-16
SLIDE 16

TRIAD-AE Vs Trivium State size 256 bits 288 bits Key size 128 bits 80 bits Nonce/IV size 96 bits 80 bits Initialization 1024 round 1152 round Type AEAD

  • AEAD - Authenticated encryption with associated data
slide-17
SLIDE 17

Attacks on Trivium-like ciphers

slide-18
SLIDE 18

Cube Attack

9

◮ Introduced by Dinur and Shamir [3] in 2009

slide-19
SLIDE 19

Cube Attack

9

◮ Introduced by Dinur and Shamir [3] in 2009 ◮ Attempts to guess atleast one bit of secret key

slide-20
SLIDE 20

Cube Attack

9

◮ Introduced by Dinur and Shamir [3] in 2009 ◮ Attempts to guess atleast one bit of secret key ◮ With complexity less than the brute-force attack

slide-21
SLIDE 21

Cube Attack

9

◮ Introduced by Dinur and Shamir [3] in 2009 ◮ Attempts to guess atleast one bit of secret key ◮ With complexity less than the brute-force attack ◮ Cube attacks are closely related to higher order differential attacks

slide-22
SLIDE 22

Cube Attack

9

◮ Introduced by Dinur and Shamir [3] in 2009 ◮ Attempts to guess atleast one bit of secret key ◮ With complexity less than the brute-force attack ◮ Cube attacks are closely related to higher order differential attacks ◮ Cube attacks use algebraic rather than statistical techniques to find the secret key

slide-23
SLIDE 23

Cube Tester

10

◮ Introduced by Aumasson et. al [1] in 2009

slide-24
SLIDE 24

Cube Tester

10

◮ Introduced by Aumasson et. al [1] in 2009 ◮ Cube testers detect non-random behavior rather than performing key extraction

slide-25
SLIDE 25

Cube Tester

10

◮ Introduced by Aumasson et. al [1] in 2009 ◮ Cube testers detect non-random behavior rather than performing key extraction ◮ Cube tester distinguishes a given cipher from a truly random scenario

slide-26
SLIDE 26

Cube Tester

10

◮ Introduced by Aumasson et. al [1] in 2009 ◮ Cube testers detect non-random behavior rather than performing key extraction ◮ Cube tester distinguishes a given cipher from a truly random scenario ◮ Cube testers are based on efficient testing properties

slide-27
SLIDE 27

Cube Tester

10

◮ Introduced by Aumasson et. al [1] in 2009 ◮ Cube testers detect non-random behavior rather than performing key extraction ◮ Cube tester distinguishes a given cipher from a truly random scenario ◮ Cube testers are based on efficient testing properties Distinguisher

(control over the public variables only)

Non-randomness

(control over the public and private variables both)

slide-28
SLIDE 28

Structure of TRIAD-AE

11

zt = f(K, IV ), where f is a Boolean function

slide-29
SLIDE 29

Cube and Superpoly

12

Example ◮ f(k1, k2, k3, n1, n2, n3) = k1 + k1k2n1 + k3n1n2 + n1n2

slide-30
SLIDE 30

Cube and Superpoly

12

Example ◮ f(k1, k2, k3, n1, n2, n3) = k1 + k1k2n1 + k3n1n2 + n1n2 ◮ Rewrite f as f(k1, k2, k3, n1, n2, n3) = (k3 + 1)

  • superpoly

term

  • n1n2 +(k1 + k1k2n1)
slide-31
SLIDE 31

Cube and Superpoly

12

Example ◮ f(k1, k2, k3, n1, n2, n3) = k1 + k1k2n1 + k3n1n2 + n1n2 ◮ Rewrite f as f(k1, k2, k3, n1, n2, n3) = (k3 + 1)

  • superpoly

term

  • n1n2 +(k1 + k1k2n1)

◮ {n1, n2} involved in term are referred as cube variables

slide-32
SLIDE 32

Cube and Superpoly

12

Example ◮ f(k1, k2, k3, n1, n2, n3) = k1 + k1k2n1 + k3n1n2 + n1n2 ◮ Rewrite f as f(k1, k2, k3, n1, n2, n3) = (k3 + 1)

  • superpoly

term

  • n1n2 +(k1 + k1k2n1)

◮ {n1, n2} involved in term are referred as cube variables ◮ Observe

  • {n1,n2}∈F2

2

f(·) = k3 + 1 = superpoly

slide-33
SLIDE 33

Algebraic Degree

13

◮ The no. of variables in the highest order monomial with non-zero coefficient

slide-34
SLIDE 34

Algebraic Degree

13

◮ The no. of variables in the highest order monomial with non-zero coefficient

  • Ex. The algebraic degree of f w.r.t. IV as variable is 2
slide-35
SLIDE 35

Algebraic Degree

13

◮ The no. of variables in the highest order monomial with non-zero coefficient

  • Ex. The algebraic degree of f w.r.t. IV as variable is 2

◮ Cryptographic primitives with low algebraic degree are vulnerable to many attacks

slide-36
SLIDE 36

Algebraic Degree

13

◮ The no. of variables in the highest order monomial with non-zero coefficient

  • Ex. The algebraic degree of f w.r.t. IV as variable is 2

◮ Cryptographic primitives with low algebraic degree are vulnerable to many attacks Question: Can we do the algebraic calculation?

slide-37
SLIDE 37

Algebraic Degree

13

◮ The no. of variables in the highest order monomial with non-zero coefficient

  • Ex. The algebraic degree of f w.r.t. IV as variable is 2

◮ Cryptographic primitives with low algebraic degree are vulnerable to many attacks Question: Can we do the algebraic calculation? Answer: It is a hard problem.

slide-38
SLIDE 38

Algebraic Degree

13

◮ The no. of variables in the highest order monomial with non-zero coefficient

  • Ex. The algebraic degree of f w.r.t. IV as variable is 2

◮ Cryptographic primitives with low algebraic degree are vulnerable to many attacks Question: Can we do the algebraic calculation? Answer: It is a hard problem. Since after sufficient no. of rounds, a well-designed stream cipher has complicated expression

slide-39
SLIDE 39

Our Contribution

slide-40
SLIDE 40

Our Contribution

15

◮ We give an algorithm which iteratively approximates the algebraic degree of TRIAD-AE

slide-41
SLIDE 41

Our Contribution

15

◮ We give an algorithm which iteratively approximates the algebraic degree of TRIAD-AE ◮ We provide a method to search good cube

slide-42
SLIDE 42

Our Contribution

15

◮ We give an algorithm which iteratively approximates the algebraic degree of TRIAD-AE ◮ We provide a method to search good cube ◮ We observe some cubes in the reduced version of the cipher

slide-43
SLIDE 43

Approximation of Algebraic Degree of TRIAD-AE

16

Let At, Bt and Ct be the corresponding states of NFSRs1 A, B and C (resp. of length nA, nB and nC) at clock t given by

1Non-linear feedback shift registers

slide-44
SLIDE 44

Approximation of Algebraic Degree of TRIAD-AE

16

Let At, Bt and Ct be the corresponding states of NFSRs1 A, B and C (resp. of length nA, nB and nC) at clock t given by At = (at, at−1, . . . , at−nA+1), Bt = (bt, bt−1, . . . , bt−nB+1), Ct = (ct, ct−1, . . . , ct−nC+1). And the corresponding feedback functions are given by at = ct−i1 · ct−i2 ⊕ lA(s(t−1)), bt = at−j1 · at−j2 ⊕ bt−j3 · ct−j3 ⊕ lB(s(t−1)), ct = bt−k1 · bt−k2 ⊕ lC(s(t−1)),

1Non-linear feedback shift registers

slide-45
SLIDE 45

Approximation of Algebraic Degree of TRIAD-AE

16

Let At, Bt and Ct be the corresponding states of NFSRs1 A, B and C (resp. of length nA, nB and nC) at clock t given by At = (at, at−1, . . . , at−nA+1), Bt = (bt, bt−1, . . . , bt−nB+1), Ct = (ct, ct−1, . . . , ct−nC+1). And the corresponding feedback functions are given by at = ct−i1 · ct−i2 ⊕ lA(s(t−1)), bt = at−j1 · at−j2 ⊕ bt−j3 · ct−j3 ⊕ lB(s(t−1)), ct = bt−k1 · bt−k2 ⊕ lC(s(t−1)), where 1 ≤ j1 < j2 < nA and j2 < j3 < nB = nC.

1Non-linear feedback shift registers

slide-46
SLIDE 46

Algorithm 1

17

◮ To estimate the degree of bt, calculate the degree of quadratic and linear part separately and take their max

slide-47
SLIDE 47

Algorithm 1

17

◮ To estimate the degree of bt, calculate the degree of quadratic and linear part separately and take their max ◮ Handle 4 different cases for clock t

◮ (t − j1) ≤ 0

slide-48
SLIDE 48

Algorithm 1

17

◮ To estimate the degree of bt, calculate the degree of quadratic and linear part separately and take their max ◮ Handle 4 different cases for clock t

◮ (t − j1) ≤ 0 ◮ 1 + j1 ≤ t ≤ j2

slide-49
SLIDE 49

Algorithm 1

17

◮ To estimate the degree of bt, calculate the degree of quadratic and linear part separately and take their max ◮ Handle 4 different cases for clock t

◮ (t − j1) ≤ 0 ◮ 1 + j1 ≤ t ≤ j2 ◮ 1 + j2 ≤ t ≤ j3

slide-50
SLIDE 50

Algorithm 1

17

◮ To estimate the degree of bt, calculate the degree of quadratic and linear part separately and take their max ◮ Handle 4 different cases for clock t

◮ (t − j1) ≤ 0 ◮ 1 + j1 ≤ t ≤ j2 ◮ 1 + j2 ≤ t ≤ j3 ◮ (t − j3) ≥ 1

slide-51
SLIDE 51

Algorithm 1

17

◮ To estimate the degree of bt, calculate the degree of quadratic and linear part separately and take their max ◮ Handle 4 different cases for clock t

◮ (t − j1) ≤ 0 ◮ 1 + j1 ≤ t ≤ j2 ◮ 1 + j2 ≤ t ≤ j3 ◮ (t − j3) ≥ 1

◮ In each case, if the state variables are the initial variables then simply calculate its degree

slide-52
SLIDE 52

Algorithm 1

17

◮ To estimate the degree of bt, calculate the degree of quadratic and linear part separately and take their max ◮ Handle 4 different cases for clock t

◮ (t − j1) ≤ 0 ◮ 1 + j1 ≤ t ≤ j2 ◮ 1 + j2 ≤ t ≤ j3 ◮ (t − j3) ≥ 1

◮ In each case, if the state variables are the initial variables then simply calculate its degree ◮ Otherwise, use recurrence relation to get an expression for the state variable in terms of the previous round and then estimate its degree

slide-53
SLIDE 53

Algorithm 1

17

◮ To estimate the degree of bt, calculate the degree of quadratic and linear part separately and take their max ◮ Handle 4 different cases for clock t

◮ (t − j1) ≤ 0 ◮ 1 + j1 ≤ t ≤ j2 ◮ 1 + j2 ≤ t ≤ j3 ◮ (t − j3) ≥ 1

◮ In each case, if the state variables are the initial variables then simply calculate its degree ◮ Otherwise, use recurrence relation to get an expression for the state variable in terms of the previous round and then estimate its degree ◮ In approximating the algebraic degree, we follow the approach of Liu [4]

slide-54
SLIDE 54

Discovering the Good Cubes

18

◮ The backbone of cube tester is to obtain a (as minimal as possible) set of public variables i.e., cube

slide-55
SLIDE 55

Discovering the Good Cubes

18

◮ The backbone of cube tester is to obtain a (as minimal as possible) set of public variables i.e., cube ◮ Then experimentally check for the presence of bias for this set, if any, at some round over certain number of iterations

slide-56
SLIDE 56

Discovering the Good Cubes

18

◮ The backbone of cube tester is to obtain a (as minimal as possible) set of public variables i.e., cube ◮ Then experimentally check for the presence of bias for this set, if any, at some round over certain number of iterations ◮ Existing work: GreedyBitSet [5]

slide-57
SLIDE 57

Discovering the Good Cubes

18

◮ The backbone of cube tester is to obtain a (as minimal as possible) set of public variables i.e., cube ◮ Then experimentally check for the presence of bias for this set, if any, at some round over certain number of iterations ◮ Existing work: GreedyBitSet [5]

◮ Limitation: Not useful in finding a bigger size cube

slide-58
SLIDE 58

Our Idea

19

◮ We combined a greedy approach with the degree evaluation to find good cubes

slide-59
SLIDE 59

Our Idea

19

◮ We combined a greedy approach with the degree evaluation to find good cubes

◮ Calculate an upper bound of the degree of keystream bit

  • ver cube variables (C) i.e., deg(zp, C) at round p
slide-60
SLIDE 60

Our Idea

19

◮ We combined a greedy approach with the degree evaluation to find good cubes

◮ Calculate an upper bound of the degree of keystream bit

  • ver cube variables (C) i.e., deg(zp, C) at round p

◮ Calculate the last round LR at which the superpoly of C is zero

slide-61
SLIDE 61

Our Idea

19

◮ We combined a greedy approach with the degree evaluation to find good cubes

◮ Calculate an upper bound of the degree of keystream bit

  • ver cube variables (C) i.e., deg(zp, C) at round p

◮ Calculate the last round LR at which the superpoly of C is zero

◮ We look for a cube whose approximate degree of the keystream bit is strictly less than the size of a cube ◮ Hence the superpoly corresponding to this cube will be zero

slide-62
SLIDE 62

Algorithm 2

20

◮ Start with an empty cube set and keep adding only one nonce bit

slide-63
SLIDE 63

Algorithm 2

20

◮ Start with an empty cube set and keep adding only one nonce bit ◮ Repeat till you get a cube of the desired size

slide-64
SLIDE 64

Algorithm 2

20

◮ Start with an empty cube set and keep adding only one nonce bit ◮ Repeat till you get a cube of the desired size ◮ Select the nonce bit as a cube variable whose

slide-65
SLIDE 65

Algorithm 2

20

◮ Start with an empty cube set and keep adding only one nonce bit ◮ Repeat till you get a cube of the desired size ◮ Select the nonce bit as a cube variable whose

1: deg(zp, C) is minimum

slide-66
SLIDE 66

Algorithm 2

20

◮ Start with an empty cube set and keep adding only one nonce bit ◮ Repeat till you get a cube of the desired size ◮ Select the nonce bit as a cube variable whose

1: deg(zp, C) is minimum 2: If tie in the 1 then choose bit whose LR is maximum

slide-67
SLIDE 67

Algorithm 2

20

◮ Start with an empty cube set and keep adding only one nonce bit ◮ Repeat till you get a cube of the desired size ◮ Select the nonce bit as a cube variable whose

1: deg(zp, C) is minimum 2: If tie in the 1 then choose bit whose LR is maximum

◮ If again a clash in LR then choose the first variable by fixing some ordering for the variables

slide-68
SLIDE 68

Algorithm 2

20

◮ Start with an empty cube set and keep adding only one nonce bit ◮ Repeat till you get a cube of the desired size ◮ Select the nonce bit as a cube variable whose

1: deg(zp, C) is minimum 2: If tie in the 1 then choose bit whose LR is maximum

◮ If again a clash in LR then choose the first variable by fixing some ordering for the variables ◮ Repeat this by varying p from 1 to R and generate many such cube sets

slide-69
SLIDE 69

Algorithm 2

20

◮ Start with an empty cube set and keep adding only one nonce bit ◮ Repeat till you get a cube of the desired size ◮ Select the nonce bit as a cube variable whose

1: deg(zp, C) is minimum 2: If tie in the 1 then choose bit whose LR is maximum

◮ If again a clash in LR then choose the first variable by fixing some ordering for the variables ◮ Repeat this by varying p from 1 to R and generate many such cube sets ◮ Select the one which gives superpoly zero for maximum number of rounds

slide-70
SLIDE 70

Results

21 Table: Some good cubes of different size for TRIAD-AE

Cube distinguisher round # key Confi. Cube Variable Indices size exact (round, level zero-sum bias) 10 501 (501, 0.00) 10000 ≈ 100% 2, 3, 4, 5, 6, 7, 10, 88, 89, 93 2, 3, 6, 7, 8, 9, 21, 22, 23, 24, 20 519 (520, 0.464) 6400 ≈ 97.9% 27, 28, 32, 47, 51, 75, 83, 89, 92, 94 2, 6, 7, 8, 12, 13, 17, 18, 22, 30 533 (534, 0.213) 1856 ≈ 99.7% 23, 24, 25, 26, 31, 36, 37, 49, 54, 55, 60, 61, 72, 73, 74, 78, 79, 84, 90, 91, 92 1, 5, 6, 9, 10, 11, 15, 19, 22, 23, 32 540 (546, 0.473) 4800 ≈ 90.1% 24, 28, 29, 30, 34, 35, 39, 43, 47, 48, 53, 54, 58, 66, 67, 71, 72, 77, 81, 90, 91, 95 1, 4, 5, 6, 9, 10, 11, 15, 19, 22, 23, 34 540 (550, 0.423) 896 ≈ 94.8% 24, 28, 29, 30, 34, 39, 43, 47, 48, 53, 57, 58, 63, 66, 67, 71, 72, 76, 77, 81, 90, 91, 95 0, 2, 3, 4, 7, 8, 9, 10, 17, 19, 20, 36 536 (542, 0.333) 1074 ≈ 100% 21, 24, 25, 28, 29, 33, 44, 48, 52, 59, 61, 62, 63, 67, 71, 75, 76, 79, 86, 87, 90, 91, 93, 94, 95 In fact for 90% confidence level, one requires 6.6/pq2 random samples to distinguish A and B

slide-71
SLIDE 71

Conclusion

22

◮ We obtained several cubes which distinguish TRIAD-AE up to 550 initialization rounds

slide-72
SLIDE 72

Conclusion

22

◮ We obtained several cubes which distinguish TRIAD-AE up to 550 initialization rounds ◮ Note that cube testers are useful not only in distinguishing attacks but also in key recovery attacks

slide-73
SLIDE 73

Conclusion

22

◮ We obtained several cubes which distinguish TRIAD-AE up to 550 initialization rounds ◮ Note that cube testers are useful not only in distinguishing attacks but also in key recovery attacks ◮ One can use this idea of finding cubes for stream ciphers relying on NFSRs

slide-74
SLIDE 74

References

23

  • J. Aumasson, I. Dinur, W. Meier, and A. Shamir.

Cube testers and key recovery attacks on reduced-round MD6 and Trivium. In Fast Software Encryption, volume 5665 of LNCS, pages 1–22. Springer, 2009.

  • S. Banik, T. Isobe, W. Meier, Y. Todo, and B. Zhang.

TRIAD v1- A lightweight AEAD and hash function based on stream cipher, 2018.

  • I. Dinur and A. Shamir.

Cube attacks on tweakable black box polynomials. In EUROCRYPT, volume 5479 of LNCS, pages 278–299. Springer, 2009.

  • M. Liu.

Degree evaluation of NFSR-based cryptosystems. In CRYPTO, volume 10403 of LNCS, pages 227–249. Springer, 2017.

  • P. Stankovski.

Greedy distinguishers and nonrandomness detectors. In INDOCRYPT, volume 6498 of LNCS, pages 210–226. Springer, 2010.

slide-75
SLIDE 75

Thank You