differential-linear attacks against the stream cipher phelix

28
Differential-Linear Attacks against the Stream Cipher Phelix Hongjun Wu and Bart Preneel Katholieke Universiteit Leuven ESAT/COSIC

Upload: others

Post on 04-Feb-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Differential-Linear Attacks against the Stream Cipher PhelixHongjun Wu and Bart Preneel

Katholieke Universiteit Leuven ESAT/COSIC

K.U. Leuven, ESAT/COSIC 2

Overview

1. Introduction to Helix and Phelix2. Description of Phelix3. Differential propagation of addition4. A basic attack on Phelix5. Improving the attack on Phelix6. Improving the security of Phelix7. Open problems8. Conclusion

K.U. Leuven, ESAT/COSIC 3

1 Background (1)

Stream Cipher Helix (FSE 2003)

stream cipher + message authenticationmessage is applied to update the internal stateencryption: message is XORed with the keystreamMAC: generated from internal state after finishing encryption

gain – no separate MAC cost – error propagation + security concern

K.U. Leuven, ESAT/COSIC 4

1 Background (2)

Attacks against Helix

Differential key recovery attack (Muller, 2004):nonce reuse;212 adaptively chosen plaintext words, 288 operations

Reducing the number of plaintext words (Paul-Preneel, 2005)about 210 adaptively chosen plaintext words;or 235.6 chosen plaintext words

K.U. Leuven, ESAT/COSIC 5

1. Background (3)

Stream Cipher Phelix (2005)

Phelix: the strengthened version of Helix1) message passing through more operations before affecting

the keystream: half block in Helix, one full block in Phelix2) more internal state words in generating a keystream word:

one internal state word in Helix, two in Phelix

Is Phelix secure? Still vulnerable to the differential key recovery attack, effective key size being reduced to 41.5 bits

K.U. Leuven, ESAT/COSIC 6

2. Stream Cipher Phelix (1)

Stream Cipher Phelix

stream cipher + message authentication code256-bit key, 128-bit IVeSTREAM Phase II software and hardware focus cipher

Fast in software: 6.6 cycles/byte on Pentium M processorHardware: twelve 32-bit additions are required for one 32-bit

keystream word: efficient ?

K.U. Leuven, ESAT/COSIC 7

2. Stream Cipher Phelix (2)

Stream Cipher Phelix

160-bit internal state: updated by message

512-bit internal state: simply related to the key and IVincremented during the encryption

K.U. Leuven, ESAT/COSIC 8

Phelix: one block

Z0, Z1, Z2, Z3, Z4 :160-bit internal stateupdated by message

Xi,0, Xi,1 : 512-bit internal state, determined by key, IV;

Encryption:

iii SPC ⊕=

K.U. Leuven, ESAT/COSIC 9

3. Differential Propagation of Addition

Observation:

addend bits strongly correlated with the difference of the sums

=> By observing the distribution of the difference of the sums, the value of addend bits can be determined with the linear attack technique

K.U. Leuven, ESAT/COSIC 10

3. Differential Propagation of Addition

The following theorem shows that the check sum of two adjacentaddend bits does affect significantly the distribution of the difference of the sums

K.U. Leuven, ESAT/COSIC 11

4. A Basic Attack on Phelix (1)

1) Introducing one bit difference in Pi

2) heavily biased)1(3

)1(3

++ ′⊕ ii BB

K.U. Leuven, ESAT/COSIC 12

4. A Basic Attack on Phelix (2)

3) Since and that is heavily biased, we can predict which bits of Xi+1,0 may have significant effect on the distribution of the difference of the keystream according to Theorem 2.

)( 0,1)1(

3)1(

0)1(

0 ++++ +⊕= i

iii XBAT )1(3

)1(3

++ ′⊕ ii BB

K.U. Leuven, ESAT/COSIC 13

4. A Basic Attack on Phelix (3)

4) When the one-bit difference is in the least significant bit of Pi , for , the 17th least significant bit of

is 0 with probability 0.50227; for , the probability is 0.50117

=> The value of is highly correlated to thedistribution of .

=> Recovering with 222.3 plaintext pairs

0140,1

150,1 =⊕ ++ ii XX

11 ++ ′⊕ ii SS 1140,1

150,1 =⊕ ++ ii XX

140,1

150,1 ++ ⊕ ii XX

171

171 ++ ′⊕ ii SS

140,1

150,1 ++ ⊕ ii XX

K.U. Leuven, ESAT/COSIC 14

4. A Basic Attack on Phelix (4)

Experiment 1. With 225 chosen plaintext pairs with difference inthe least significant bit of Pi, the values of of 192 keys among 200 keys are determined correctly.

The success rate is about 0.96. Lower than expected. Reason: the other bits of interfere with

Shifting the one-bit difference, 23 bits of are recovered.

140,1

150,1 ++ ⊕ ii XX

140,1

150,1 ++ ⊕ ii XX0,1+iX

0,1+iX

K.U. Leuven, ESAT/COSIC 15

5. Improving the Attack on Phelix (1)

Aims: Recovering more key bits and improving the success rateReducing the number of chosen plaintext pairs

Methods:Recovering before recoveringFine tuning of the threshold values in the attack

0,1+iX)3(4−iZ

K.U. Leuven, ESAT/COSIC 16

5. Improving the Attack on Phelix (2)

Recovering

1) Introducing difference in the least significant bit of Pi

2) is heavily biased

)3(4−iZ

)1(4

)1(4

++ ′⊕ ii YY

K.U. Leuven, ESAT/COSIC 17

5. Improving the Attack on Phelix (3)

3) Since is heavily biased and , the value of the bits of affects the distribution of

4) When , for , the 5th leastsignificant bit of is 0 with probability 0.5461;for , this probability is 0.5193=> Recovering requires 214 plaintext pairs

)1(4

)1(4

++ ′⊕ ii YY )3(4

)1(41

−++ ⊕= ii

i ZYS)3(

4−iZ

11 ++ ′⊕ ii SS

1=′⊕ ii PP 02),1(4

3),1(4 =⊕ ++ ii YY

33 −− ′⊕ ii SS12),1(

43),1(

4 =⊕ ++ ii YY2),1(

43),1(

4++ ⊕ ii YY

K.U. Leuven, ESAT/COSIC 18

5. Improving the Attack on Phelix (4)

5) In the attack, we determine the least significant bit of first, then proceed to determine the more significant

bits of by shifting the one-bit difference.

6) When is analyzed, issubtracted from and so thatdoes not interfere with . The success rate becomesvery close to 1 with small number of plaintext pairs.

)3(4−iZ

)3(4−iZ

jiZ ),3(4−

)3(4−iZ

0),3(4

2),3(4

1),3(4

−−−−− ijiji ZZZ L

iS iS′ 0),3(4

2),3(4

1),3(4

−−−−− ijiji ZZZ LjiZ ),3(

4−

K.U. Leuven, ESAT/COSIC 19

5. Improving the Attack on Phelix (5)

7) With 217 plaintext pairs, 30 bits of (except the twomost significant bits of ) can be determined with success rate about 0.999.

After recovering , we recover from the distribution of instead of .

)3(4−iZ

)3(4−iZ

)3(4−iZ 0,1+iX

)1(4

)1(4 ' ++ ⊕ ii YY 11 ++ ′⊕ ii SS

K.U. Leuven, ESAT/COSIC 20

5. Improving the Attack on Phelix (6)

Recovering from

Due to the interference between the bits of on the distribution of , we need the fine tuning of the threshold values in the attack.

For example, when , if and the value of is 00, 11, 01, 10, then with prob.

0.53033, 0.52334, 0.51946, 0.51864; if , the prob. becomes 0.52334, 0.53030, 0.51861, 0.51948. => affect the distribution of

0,1+iX )1(4

)1(4

++ ′⊕ ii YY

0,1+iX1

41

4++ ′⊕ ii YY

1=′⊕ ii PP 090,1 =+iX

100,1

110,1 || ++ ii XX 013,1

413,1

4 =′⊕ ++ ii YY

190,1 =+iX

100,1

110,1

90,1 || and +++ iii XXX 13,1

413,1

4++ ′⊕ ii YY

K.U. Leuven, ESAT/COSIC 21

5. Improving the Attack on Phelix (7)

Other bits of also affect the distribution of

In the attack, we need to tune the threshold value to 0.52035,so that the value of can be recovered with success rate 0.99 with 221 chosen plaintext pairs.

The values of can be determined in a similar way

0,1+iX 13,14

13,14

++ ′⊕ ii YY

100,1

110,1 ++ ⊕ ii XX

ji

ji XX 0,1

10,1 +

++ ⊕ )282( ≤≤ j

K.U. Leuven, ESAT/COSIC 22

5. Improving the Attack on Phelix (8)

The lsb is recovered in a different way:216 chosen plaintext pairs withobserving the distribution of

The second lsb can be recovered if216.4 chosen plaintext pairs withobserving the distribution of

The value of can be recovered if and

00,1+iX

212=′⊕ ii PP2),1(

42),1(

4++ ′⊕ ii YY

10,1+iX 00

0,1 =+iX222=′⊕ ii PP

3),1(4

3),1(4

++ ′⊕ ii YY

20,1+iX 00

0,1 =+iX 010,1 =+iX

K.U. Leuven, ESAT/COSIC 23

5. Improving the Attack on Phelix (9)

The above attack recovers 28.75 bits of

After recovering eight consecutive , 230 key bits are recovered.Considering the error rate of about 0.01, the effective key size is reduced to41.5 bits.

The attack requires 232.7 chosen plaintext pairs.

0,1+iX

0,1+iX

K.U. Leuven, ESAT/COSIC 24

6. Improving the Security of Phelix

Problem in Phelix: The plaintext affects the keystream beforepassing through enough confusion and diffusion operations

Solution 1: plaintext passing through more operations=> resulting in slow cipher

Solution 2: using strong one-way function to generate theinitial internal state from key and IV=> secure against key recovery attack

but the leaked internal state allows message forgery

K.U. Leuven, ESAT/COSIC 25

7. Open problems (1)

Open Problem 1.

How to design an efficient stream cipher with embedded MAC, secure against the key recovery attack in the applications where an attacker has the ability to control the nonce generation for a while?

Helix and Phelix are insecure in these applications

K.U. Leuven, ESAT/COSIC 26

7. Open problems (2)

Open Problem 2.

How to design an efficient stream cipher with embedded MAC, secure against the key recovery attack only in the applications where the nonce generation is secure

Helix and Phelix are secure in these applications.But there may be dedicated and more efficient designs

K.U. Leuven, ESAT/COSIC 27

8. Conclusion

1. The computational complexity of the attack against Phelix is241.5, less than the 288 operations required to break Helix

=> Phelix fails to strengthen Helix in this respect

2. Open problems: Efficient embedded MACs for stream cipher

K.U. Leuven, ESAT/COSIC 28

Thank you!

Q & A