Block Ciphers (part 2)

Modern Private Key Ciphers (part 2)

FEAL

A Shimizu, S Miyaguchi, "Fast Data Encipherment Algorithm FEAL", in Advances in Cryptology - Eurocrypt'87, Lecture Notes in Computer Science, No 307, D Chaum, W Price (eds), Springer-Verlag 1988, pp 267-279
S Miyaguchi, "The FEAL Cipher Family", in Advances in Cryptology - Crypto'90, Lecture Notes in Computer Science, No 537, A J Menezes, S A Vanstone (eds), Springer-Verlag 1991, pp 627-638
S_(d)(x,y) = ROT2((x+y+d) mod 256)

where x, y are 8-bit input values

d is 0 or 1

ROT2 is a 2-bit left rotation of an 8-bit value

E Biham, A Shamir, "Differential Cryptanalysis of FEAL and N-Hash", in Advances in Cryptology - Eurocrypt '91, Lecture Notes in Computer Science, vol 547, pp 1-16, D Davies (ed), Springer-Verlag, Berlin, 1991.

LOKI

L P Brown, "Analysis of the DES and the Design of the LOKI Encryption Scheme", for Doctor of Philosophy, Department of Computer Science, University College, University of New South Wales, Australia. Supervised by Professor J.R. Seberry, April 1991.
L P Brown, J Pieprzyk and J R Seberry, "LOKI - A Cryptographic Primitive for Authentication and Secrecy Applications," in Advances in Cryptology - Auscrypt '90, Lecture Notes in Computer Science, vol 453, pp 229-236, J. Seberry, J. Pieprzyk (eds), Springer-Verlag, Berlin, 1990.
L P Brown, M Kwan, J Pieprzyk, J Seberry, "Improving Resistance to Differential Cryptanalysis and the Redesign of LOKI", Advances in Cryptology - Asiacrypt '91, Springer-Verlag, 1992, to appear.

LOKI89 Design

LOKI Expansion Function E
LOKI Permutation P
LOKI Key Schedule

Overall LOKI89 Structure

LOKI Function f

LOKI Keys

hihihihijkjkjkjk_(16)

a total of 2^(16) out of a possible 2^(64)

LOKI S-Box Design
LOKI89 S-Boxes
Sfn_(r) = (c + r) ^(er) mod gen_(r)

LOKI89 Cryptanalysis

A.(00000510,0)->(0,00000510) always

B.(0,00000510)->(00000510,0) Pr(118/2^20)

found independently by Biham, Knudsen

A.(00400000,0)->(0,00400000) always

B.(0,00400000)->(00400000,00400000) Pr(28/4096)

C.(00400000,00400000)->(00400000,0) Pr(28/4096)

found independently by Kwan, Knudsen

LOKI(P, K)(+)pppppppppppppppp =

LOKI(P(+)pppppppppppppppp,K(+)mmmmmmmmnnnnnnnn)

where p=m(+)n, m,n arbitrary hex values

found independently by Biham, Knudsen, and Kwan

LOKI91 Design

LOKI91 Specification
1
change the key schedule so the halves were swapped after every second round
2
change the key rotation schedule to alternate between ROT12 (odd rounds) and ROT13 (even rounds)
3
remove the initial and final XORs of key with plaintext and ciphertext respectively
4
alter S-box function to:
Sfn(r,c)=(c+((r*17)(+)ff_(16) )&ff_(16) )^(31 ) mod gen_(r)

generator polynomials gen_(r) as in LOKI89

Overall LOKI91 Structure

LOKI91 Cryptanalysis

Encrypt Key                        Decrypt key                                  
0000000000000000                   0000000000000000  *                          
00000000aaaaaaaa                   aaaaaaaa00000000                             
0000000055555555                   5555555500000000                             
00000000ffffffff                   ffffffff00000000                             
aaaaaaaa00000000                   00000000aaaaaaaa                             
aaaaaaaaaaaaaaaa                   aaaaaaaaaaaaaaaa  *                          
aaaaaaaa55555555                   55555555aaaaaaaa                             
aaaaaaaaffffffff                   ffffffffaaaaaaaa                             
5555555500000000                   0000000055555555                             
55555555aaaaaaaa                   aaaaaaaa55555555                             
5555555555555555                   5555555555555555  *                          
55555555ffffffff                   ffffffff55555555                             
ffffffff00000000                   00000000ffffffff                             
ffffffffaaaaaaaa                   aaaaaaaaffffffff                             
ffffffff55555555                   55555555ffffffff                             
ffffffffffffffff                   ffffffffffffffff  *                          

			_________       _ _
			LOKI(P,K)= LOKI(P,K)

Latest Analysis of LOKI91

Khufu, Khafre and Snefru

R C Merkle, "Fast Software Encryption Functions", in Advances in Cryptology - Crypto'90, Lecture Notes in Computer Science, No 537, A J Menezes, S A Vanstone (eds), Springer-Verlag 1991, pp 476-501

Khufu

Khafre

Snefru

IDEA (IPES)

X Lai, J L Massey, "A Proposal for a New Block Encryption Standard" in Advances in Cryptology - Eurocrypt '90, Lecture Notes in Computer Science, vol 473, pp 389-404, I B Damgard (ed), Springer-Verlag, Berlin, 1991.
X Lai, J L Massey, S Murphy, "Markov Ciphers and Differential Cryptanalysis" in Advances in Cryptology - Eurocrypt '91, Lecture Notes in Computer Science, vol 547, pp 17-38, D W Davies (ed), Springer-Verlag, Berlin, 1991.
Overview of IDEA
Round       Encryption Keys                   Decryption Keys                        
1           K1.1 K1.2 K1.3 K1.4 K1.5 K1.6     K9.1-1 -K9.2  -K9.3  K9.4-1  K8.5      
                                              K8.6                                   
2           K2.1 K2.2 K2.3 K2.4 K2.5 K2.6     K8.1-1 -K8.3  -K8.2  K8.4-1  K7.5      
                                              K7.6                                   
3           K3.1 K3.2 K3.3 K3.4 K3.5 K3.6     K7.1-1 -K7.3  -K7.2  K7.4-1  K6.5      
                                              K6.6                                   
4           K4.1 K4.2 K4.3 K4.4 K4.5 K4.6     K6.1-1 -K6.3  -K6.2  K6.4-1  K5.5      
                                              K5.6                                   
5           K5.1 K5.2 K5.3 K5.4 K5.5 K5.6     K5.1-1 -K5.3  -K5.2  K5.4-1  K4.5      
                                              K4.6                                   
6           K6.1 K6.2 K6.3 K6.4 K6.5 K6.6     K4.1-1 -K4.3  -K4.2  K4.4-1  K3.5      
                                              K3.6                                   
7           K7.1 K7.2 K7.3 K7.4 K7.5 K7.6     K3.1-1 -K3.3  -K3.2  K3.4-1  K2.5      
                                              K2.6                                   
8           K8.1 K8.2 K8.3 K8.4 K8.5 K8.6     K2.1-1 -K2.3  -K2.2  K2.4-1  K1.5      
                                              K1.6                                   
Output      K9.1 K9.2 K9.3 K9.4               K1.1-1 -K1.2  -K1.3  K1.4-1            

where:

K1.1^(-1 ) is the multiplicative inverse mod 2^(16) +1

-K1.2 is the additive inverse mod 2^(16)

and the original operations are:

(+) bit-by-bit XOR

+ additional mod 2^(16) of 16-bit integers

* multiplication mod 2^(16) +1 (where 0 means 2^(16) )

IDEA Example Encryption

#            Key (128-bits)       Plain (64-bit)   Cipher (64-bit)
7ca110454a1a6e5701a1d6d039776742 690f5b0d9a26939b 1bddb24214237ec7
idea(X=690f 5b0d 9a26 939b)
  r=1, X=690f 5b0d 9a26 939b, SK=7ca1 1045 4a1a 6e57 01a1 d6d0
    steps=234a 6b52 e440 840f c70a ef5d 3606 2563 0311 3917 205b e751 5245 bd18
  r=2, X=205b e751 5245 bd18, SK=3977 6742 8a94 34dc ae03 43ad
    steps=460a 4e93 dcd9 3995 9ad3 7706 d13d 4843 4b2d 1c6a 0d27 97f4 52f9 25ff
  r=3, X=0d27 97f4 52f9 25ff, SK=a072 eece 84f9 4220 b95c 0687
    steps=3320 86c2 d7f2 7410 e4d2 f2d2 57cb 4a9d 04e4 5caf 37c4 d316 da6d 28bf
  r=4, X=37c4 d316 da6d 28bf, SK=5b40 e5dd 9d09 f284 4115 2869
    steps=8920 b8f3 7776 69e3 fe56 d110 7266 4376 10c0 8326 99e0 67b6 3bd5 eac5
  r=5, X=99e0 67b6 3bd5 eac5, SK=0eb6 81cb bb3a 13e5 0882 2a50
    steps=9c69 e981 f70f 8efb 6b66 677a b63b 1db5 f5a8 abe3 69c1 02a7 4262 2518
  r=6, X=69c1 02a7 4262 2518, SK=d372 b80d 9776 7427 ca11 0454
    steps=d39a bab4 d9d8 75d4 0a42 cf60 ba4a 89aa d175 8bbf 02ef 08ad 310b fe6b
  r=7, X=02ef 08ad 310b fe6b, SK=a1a6 e570 1a1d 6d03 4f94 2208
    steps=3420 ee1d 4b28 1deb 7f08 f3f6 c124 b51a 04bd c5e1 309d 4f95 2bfc d80a
  r=8, X=309d 4f95 2bfc d80a, SK=a943 4dca e034 3ada 072e ece8
    steps=3df3 9d5f 0c30 0ada 31c3 9785 44a5 dc2a 7253 b6f8 4fa0 7e63 2ba7 bc22
  out, X=4fa0 2ba7 7e63 bc22, SK=1152 869b 95c0 6875 
			= 1bdd b242 1423 7ec7

Skipjack and Clipper

Seneca

Other Block Ciphers

Bruce Schneier, "Applied Cryptography - Protocols, Algorithms and Source Code in C", Wiley, 1994, ISBN 0-471-59756-2

Differential Cryptanalysis of Block Ciphers

E Biham & A Shamir, "Differential Cryptanalysis of DES-like Cryptosystems", Journal of Cryptology, Vol 4(1), 1991, pp3-72 Springer-Verlag. Extended Abstract presented in Abstracts of Crypto'90

E Biham, A Shamir, "Differential Cryptanalysis of FEAL and N-Hash", in Advances in Cryptology - Eurocrypt '91, Lecture Notes in Computer Science, vol 547, pp 1-16, D Davies (ed), Springer-Verlag, Berlin, 1991.

E Biham, A Shamir, "Differential Cryptanalysis of Snefru, Khafre, REDOC-II, LOKI, and Lucifer", in Advances in Cryptology - Crypto '91, Lecture Notes in Computer Science, vol 576, pp 156-171, J Feigenbaum (ed), Springer-Verlag, Berlin, 1992.

E Biham, A Shamir, "Differential Cryptanalysis of the Full 16-round DES", in Advances in Cryptology - Eurocrypt '92, Lecture Notes in Computer Science, Springer-Verlag, to appear. Also as Techical Report #708, Technion - Israel Institute of Technology, Computer Science Department, Dec 1991.

Overview of Differential Cryptanalysis

R(i)=L(i-1) (+) f(K(i)(+)R(i-1)) Ra(i)=f(K(i)(+)Ra(i-1))

Rb(i)=f(K(i)(+)Rb(i-1))

hence

Y(i)= Ra(i)(+)Rb(i)

= f(K(i)(+)Ra(i-1)(+)K(i)(+)Rb(i-1))

= f(Ra(i-1)(+)Rb(i-1)) = f(X(i))

and this is independent of the key being used

XOR Profiles and Characteristics
[4] f(x')->y', Pr(p)

(a',b')->(b',a'(+)f(b')) with prob p

i) f(0')->0', Pr(1) ie always

A.(x,0)->(0,x) always

  ii) f(x')->0', Pr(p_(0) )

B.(0,x)->(x,0) with probability p_(0)

2-Round Iterative Characteristic * a 2-round characteristic:

A.(x,0)->(0,x) always

B.(0,x)->(x,0) with probability p

* a 3-round characteristic:

A.(x,0)->(0,x) always

B.(0,x)->(x,x) with probability p1

C.(x,x)->(x,0) with probability p2

follow with Biham & Shamir TR Dec 91, Fig 1 p5, Table 2 p9
Some Sample Characteristics
DES A.(19600000,0)->(0,19600000) always

B.(0,19600000)->(19600000,0) Pr(1/234)

LOKI89

A.(00000510,0)->(0,00000510) always

B.(0,00000510)->(00000510,0) Pr(118/2^20)

LOKI91

A.(x,0)->(0,x) always

B.(0,x)->(x,0) Pr(122/2^20)

A.(x,0)->(0,x) always

B.(0,x)->(x,x) Pr(16/4096)

C.(x,x)->(x,0) Pr(16/4096)

Why Flat XOR Profiles Dont Work

Flat XOR Profile

Linear Cryptanalysis of Block Ciphers

Matsui M, "Linear Cryptanalysis Method for DES Cipher", in Advances in Cryptology - Eurocrypt '93, Lecture Notes in Computer Science, vol 765, pp 386-397, T Helleseth (ed), Springer-Verlag, Berlin, 1994.

Tokita T, Sorimachi T, Matsui M "Linear Cryptanalysis of LOKI and s^(2) DES", in Advances in Cryptology - Asiacrypt '94, Lecture Notes in Computer Science, vol 917, pp 293-303, J Pieprzyk, R Safavi-Naini (eds), Springer-Verlag, Berlin, 1995.

Ohta K, Moriai S, Aoki K, "Improving the Search Algorithm for the Best Linear Expression", in Advances in Cryptology - Crypto '95, Lecture Notes in Computer Science, vol 963, pp 157-170, D Coppersmith (ed), Springer-Verlag, Berlin, 1995.

P[i1,i2,...,ia](+)C[j1,j2,...,jb]=K[k1,k2,...,kc]
	where ia,jb,kc are bit locations in P,C,K
	|p - 1/2|
PL[7,18,24](+) PR[12,16](+) CL[15](+) CR[7,18,24,29](+) F16(CR,K16)[15] = K1[19,23](+)K3[22](+) K4[44](+) K5[22](+)K7[22](+) K8[44](+) K9[22](+) K11[22](+) K12[44](+) K13[22](+) K15[22]

Stream Ciphers and the Vernam cipher

Stream Ciphers and Pseudo-Random Generators

Linear Feedback Shift Registers

Stream Ciphers Based on LFSRs

Other Stream Ciphers

RC4

ftp:///ftp.dsi.unimi.it/pub/security/crypt/code/
	rc4.revealed.gz
ftp:///ftp.dsi.unimi.it/pub/security/crypt/code/
	rc4.schneier.test.gz

Public Key Based Schemes

x_(i+1) = x_(i) ^(2 ) mod n and use b_(i) the LSB of x_(i)

where n=p.q, primes p,q=3 mod 4


[4] Biham & Shamir JC 4(1) 91 Table 2 p12, Table 3 p13
[5] Biham & Shamir JC 4(1) 91 DES characterisitcs p18; Table 11 p37, Table 12 p41
[CSC Info]
Lawrie.Brown@adfa.oz.au / 15-Apr-96