Statistics in Cryptanalysis
Subhabrata Samajder
Indian Statistical Institute, Kolkata 24th May, 2017
0/35
Statistics in Cryptanalysis Subhabrata Samajder Indian Statistical - - PowerPoint PPT Presentation
Statistics in Cryptanalysis Subhabrata Samajder Indian Statistical Institute, Kolkata 24 th May, 2017 0/35 Cryptanalysis of Affine Cipher Outline Cryptanalysis of Affine Cipher 1 Hypothesis Testing 2 Linear Cryptanalysis 3 0/35
0/35
Cryptanalysis of Affine Cipher
0/35
Cryptanalysis of Affine Cipher
1/35
Cryptanalysis of Affine Cipher
2/35
Cryptanalysis of Affine Cipher
3/35
Cryptanalysis of Affine Cipher
3/35
Cryptanalysis of Affine Cipher
3/35
Cryptanalysis of Affine Cipher
Letter Probability Letter Probability A 0.082 N 0.067 B 0.015 O 0.075 C 0.028 P 0.019 D 0.043 Q 0.001 E 0.127 R 0.060 F 0.022 S 0.063 G 0.020 T 0.091 H 0.061 U 0.028 I 0.070 V 0.010 J 0.002 W 0.023 K 0.008 X 0.001 L 0.040 Y 0.020 M 0.024 Z 0.001
4/35
Cryptanalysis of Affine Cipher
5/35
Cryptanalysis of Affine Cipher
6/35
Cryptanalysis of Affine Cipher
7/35
Cryptanalysis of Affine Cipher
7/35
Cryptanalysis of Affine Cipher
Letter Frequency Letter Frequency A 2 N 1 B 1 O 1 C P 2 D 7 Q E 5 R 8 F 4 S 3 G T H 5 U 2 I V 4 J W K 5 X 2 L 2 Y 1 M 2 Z
8/35
Cryptanalysis of Affine Cipher
9/35
Cryptanalysis of Affine Cipher
10/35
Cryptanalysis of Affine Cipher
10/35
Cryptanalysis of Affine Cipher
10/35
Cryptanalysis of Affine Cipher
11/35
Cryptanalysis of Affine Cipher
11/35
Cryptanalysis of Affine Cipher
11/35
Cryptanalysis of Affine Cipher
11/35
Cryptanalysis of Affine Cipher
11/35
Cryptanalysis of Affine Cipher
11/35
Cryptanalysis of Affine Cipher
12/35
Cryptanalysis of Affine Cipher
12/35
Cryptanalysis of Affine Cipher
12/35
Cryptanalysis of Affine Cipher
13/35
Cryptanalysis of Affine Cipher
13/35
Cryptanalysis of Affine Cipher
13/35
Cryptanalysis of Affine Cipher
14/35
Hypothesis Testing
14/35
Hypothesis Testing
15/35
Hypothesis Testing
16/35
Hypothesis Testing
16/35
Hypothesis Testing
16/35
Hypothesis Testing
16/35
Hypothesis Testing
16/35
Hypothesis Testing
17/35
Hypothesis Testing
i.i.d
17/35
Hypothesis Testing
i.i.d
17/35
Hypothesis Testing
i.i.d
17/35
Hypothesis Testing
i.i.d
17/35
Hypothesis Testing
18/35
Hypothesis Testing
18/35
Hypothesis Testing
H
18/35
Hypothesis Testing
H
18/35
Hypothesis Testing
H
18/35
Hypothesis Testing
19/35
Hypothesis Testing
19/35
Hypothesis Testing
H
H
H
H
H
19/35
Hypothesis Testing
20/35
Hypothesis Testing
20/35
Hypothesis Testing
20/35
Hypothesis Testing
21/35
Hypothesis Testing
21/35
Hypothesis Testing
21/35
Hypothesis Testing
Type-I Error Accept
Reject Type-II Error
22/35
Linear Cryptanalysis
22/35
Linear Cryptanalysis
23/35
Linear Cryptanalysis
Sub-key k(1) Mixing S11 S12 S13 S14 Sub-key k(2) Mixing S21 S22 S23 S24 Sub-key k(3) Mixing S31 S32 S33 S34 Sub-key k(4) Mixing S41 S42 S43 S44 Sub-key k(5) Mixing P1 . . . Plaintext P16 . . . C1 . . . Ciphertext C16 . . . Round 1 Round 2 Round 3 Round 4
24/35
Linear Cryptanalysis
25/35
Linear Cryptanalysis
25/35
Linear Cryptanalysis
25/35
Linear Cryptanalysis
25/35
Linear Cryptanalysis
25/35
Linear Cryptanalysis
25/35
Linear Cryptanalysis
25/35
Linear Cryptanalysis
26/35
Linear Cryptanalysis
26/35
Linear Cryptanalysis
26/35
Linear Cryptanalysis
26/35
Linear Cryptanalysis
26/35
Linear Cryptanalysis
27/35
Linear Cryptanalysis
27/35
Linear Cryptanalysis
27/35
Linear Cryptanalysis
27/35
Linear Cryptanalysis
27/35
Linear Cryptanalysis
Round 1 k(0) n P ΓP Round 2 k(1) K (r) = k(0)||k(1)|| · · · ||k(r−1) ΓK Round r k(r−1) Round (r + 1) B ΓB n C m κ k(r)
28/35
Linear Cryptanalysis
Round 1 k(0) n P ΓP Round 2 k(1) K (r) = k(0)||k(1)|| · · · ||k(r−1) ΓK Round r k(r−1) Round (r + 1) B ΓB n C m κ k(r)
28/35
Linear Cryptanalysis
Round 1 k(0) n P ΓP Round 2 k(1) K (r) = k(0)||k(1)|| · · · ||k(r−1) ΓK Round r k(r−1) Round (r + 1) B ΓB n C m κ k(r)
28/35
Linear Cryptanalysis
Round 1 k(0) n P ΓP Round 2 k(1) K (r) = k(0)||k(1)|| · · · ||k(r−1) ΓK Round r k(r−1) Round (r + 1) B ΓB n C m κ k(r)
28/35
Linear Cryptanalysis
Round 1 k(0) n P ΓP Round 2 k(1) K (r) = k(0)||k(1)|| · · · ||k(r−1) ΓK Round r k(r−1) Round (r + 1) B ΓB n C m κ k(r)
28/35
Linear Cryptanalysis
Round 1 k(0) n P ΓP Round 2 k(1) K (r) = k(0)||k(1)|| · · · ||k(r−1) ΓK Round r k(r−1) Round (r + 1) B ΓB n C m κ k(r)
28/35
Linear Cryptanalysis
29/35
Linear Cryptanalysis
29/35
Linear Cryptanalysis
29/35
Linear Cryptanalysis
29/35
Linear Cryptanalysis
29/35
Linear Cryptanalysis
30/35
Linear Cryptanalysis
30/35
Linear Cryptanalysis
30/35
Linear Cryptanalysis
30/35
Linear Cryptanalysis
31/35
Linear Cryptanalysis
31/35
Linear Cryptanalysis
31/35
Linear Cryptanalysis
31/35
Linear Cryptanalysis
31/35
Linear Cryptanalysis
32/35
Linear Cryptanalysis
33/35
Linear Cryptanalysis
33/35
Linear Cryptanalysis
Pr[Type-I Error] = Pr [Tκ ≤ t |H0 holds ] = Pr
√ N(µ0 − µ1) σ0
σ1t − √ N(µ0 − µ1) σ0
Pr
σ1t − √ N | µ0 − µ1 | σ0
Φ
√ N | µ0 − µ1 | σ0
33/35
Linear Cryptanalysis
Pr[Type-I Error] = Pr [Tκ ≤ t |H0 holds ] = Pr
√ N(µ0 − µ1) σ0
σ1t − √ N(µ0 − µ1) σ0
Pr
σ1t − √ N | µ0 − µ1 | σ0
Φ
√ N | µ0 − µ1 | σ0
33/35
Linear Cryptanalysis
34/35
Linear Cryptanalysis
34/35
Linear Cryptanalysis
34/35
Linear Cryptanalysis
34/35
Linear Cryptanalysis
34/35
Linear Cryptanalysis
35/35
Linear Cryptanalysis
35/35
Linear Cryptanalysis
35/35