+ All Categories

3XRC4

Date post: 08-Jul-2015
Category:
Upload: samir-crypticus
View: 82 times
Download: 0 times
Share this document with a friend
Description:
a stream cipher based on the mathematical structure underlying the 3 body problem
23
Stream ciphers based on the mathematical structure underlying the 3 body problem.
Transcript
Page 1: 3XRC4

Stream ciphers based on the mathematical structure underlying the 3 body problem.

Page 2: 3XRC4

Author : Samir Bouftass , Independant crypto researcher

E-mail : [email protected]

Page 3: 3XRC4

Stream cipher ?

Page 4: 3XRC4

1 - Key Stream Generation :

Page 5: 3XRC4

2 - Encryption :

Page 6: 3XRC4

3 – Decryption :

Page 7: 3XRC4

A KeyStream K should fulfill this condition :

Page 8: 3XRC4

The three body problem :

Page 9: 3XRC4

If we perform measurements after a time intervall T :

Page 10: 3XRC4

A modélisation of three body problem could be useful to crypto algorithmes design.

Page 11: 3XRC4

A General Stream cipher algorithm :

Input Data :

Secret Key : Sk.

Plain Text : M = [ m_0….m_n] .

Intermediate Data :

Internal State : S = [s_0…..s_n] .

KeyStream : K = [k_0….k_n].

Output Data :

Cipher Text : C = [c_0…..c_n] .

Page 12: 3XRC4

State Initialization :

s_0 = Initialize( Sk ).

Encryption/Decryption loop :

For i = 0 to n do

s_(i+1) = F ( s_i )

k_i = G ( s_(i+1) )

c_i = k_i xor p_i

Page 13: 3XRC4

The mathematical structure underlying the three body problem.

Page 14: 3XRC4

The mathematical structure :

Set S ={ [(p1_0,f1_0),(p2_0,f2_0),(p3_0,f3_0)] …

[(p1_i,f1_i),(p2_i,f2_i),(p3_i,f3_i)] …

[(p1_n,f1_n),(p2_n,f2_n),(pi_n,fi_n)] }

Caracterized by following rules :

f1_i+1 = F1(p2_i , p3_i )

f2_i+1 = F2(p3_i , p1_i )

f3_i+1 = F3(p1_i , p2_i )

p1_i+1 = G1(f1_i+1 )

p2_i+1 = G2(f2_i+1 )

p3_i+1 = G3(f3_i+1 )

Page 15: 3XRC4

A General Stream cipher algorithm based on the mathematical

structure underlying the three body problem :

Input Data :

Secret Key : Sk.

Plain Text : M = [ m_0….m_n] .

Intermediate Data :

Internal State : S = { [(p1_0,f1_0),(p2_0,f2_0),(p3_0,f3_0)] …..

[(p1_n,f1_n),(p2_n,f2_n),(p3_n,f3_n)] }

Key Stream : K = [k_0….k_n].

Output Data :

Cipher Text: C = [c_0…..c_n].

1 / 2

Page 16: 3XRC4

State Initialization :

s_0 =[(p1_0,f1_0),(p2_0,f2_0),(p3_0,f3_0)] = Initialize(Cs ).

Encryption/Decryption loop :

For i = 0 to n do

f1_i+1 = F1(p2_i , p3_i )

f2_i+1 = F2(p3_i , p1_i )

f3_i+1 = F3(p1_i , p2_i )

p1_i+1 = G1(f1_i+1 )

p2_i+1 = G2(f2_i+1 )

p3_i+1 = G3(f3_i+1 )

k_i = p1_i+1

c_i = k_i xor m_i

Page 17: 3XRC4

3XRC4 : A RC4 variant based on the mathematical structure underlying The 3 body problème .

Page 18: 3XRC4

RC4 Algorithm:

Secret key Sk, a componed of L bytes : K[0], …, K[L-1].

Initialization :

for i : 0 to 255

S[i] : i.

j : 0

for i : 0 to 255

j : ( j + S[i] + K[i mod L ] ) mod 256

swap S[i] and S[j]

Page 19: 3XRC4

Encryption / Decryption Loop :

i : 0 , j : 0

for i : 0 to n

i : ( i+1 ) mod 256

j : ( j+S[i] ) mod 256

swap S[i] and S[j].

k_i+1 = S[( S[i] + S[j] ) mod 256 ]

c_i = k_i+1 xor m_i.

Page 20: 3XRC4
Page 21: 3XRC4

L’algorithme 3XRC4 :

Page 22: 3XRC4

Secret Key Sk =[K1, K2, K3] , Ki=1..3 a componed of L bytes : ki[0], …, ki[L-1].

Initialization :

for i : 0 to 255

S1[i] : S2[i] : S3[i] : i .

u : v : w : 0

for i : 0 to 255

u : ( u + S2[S3[i]] + K1[ i mod L ] ) mod 256

swap S1[i] and S1[u]

v : ( v + S3[S1[i]] + K2[ i mod L ] ) mod 256

swap S2[i] and S2[v]

w : ( w + S3[S1[i]] + K3[ i mod L ] ) mod 256

swap S3[i] and S3[v]

Page 23: 3XRC4

Encryption / Decryption Loop :

i : u : v : w :0

for i = 0 to n

i : ( i+1 ) mod 256

u : ( u+S2[S3[i]] ) mod 256

swap S1[i] and S1[u]

v : ( v+S3[S1[i]] ) mod 256

swap S2[i] and S2[v]

w : ( w+S1[S2[i]] ) mod 256

swap S3[i] and S3[w]

k_i+1 = S2[S3[( S1[i] + S1[u] ) mod 256 ]]

c_i = k_i+1 xor m_i.