SlideShare a Scribd company logo
1 of 23
Stream ciphers based on the mathematical
structure underlying the 3 body problem.
Author : Samir Bouftass , Independant crypto researcher
E-mail : crypticator@gmail.com
Stream cipher ?
1 - Key Stream Generation :
2 - Encryption :
3 – Decryption :
A KeyStream K should fulfill this condition :
The three body problem :
If we perform measurements after a time intervall T :
A modélisation of three body problem could be useful to crypto
algorithmes design.
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] .
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
The mathematical structure underlying the three body problem.
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 )
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].
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
3XRC4 : A RC4 variant based on the mathematical structure
underlying The 3 body problème .
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]
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.
L’algorithme 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]
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.

More Related Content

What's hot

Presentation - MA181 - Final
Presentation - MA181 - FinalPresentation - MA181 - Final
Presentation - MA181 - Final
Abraham Bedada
 
4 2 lesson - Graphing in Standard Form
4 2 lesson - Graphing in Standard Form4 2 lesson - Graphing in Standard Form
4 2 lesson - Graphing in Standard Form
sahutchins74
 
CoqでGCの証明をしてみたよ(LT)
CoqでGCの証明をしてみたよ(LT)CoqでGCの証明をしてみたよ(LT)
CoqでGCの証明をしてみたよ(LT)
Hiroki Mizuno
 

What's hot (20)

Report Qsn 8 CA asn 3
Report Qsn 8 CA asn 3Report Qsn 8 CA asn 3
Report Qsn 8 CA asn 3
 
Special factor patterns
Special factor patternsSpecial factor patterns
Special factor patterns
 
Presentation - MA181 - Final
Presentation - MA181 - FinalPresentation - MA181 - Final
Presentation - MA181 - Final
 
Calculus 1
Calculus 1Calculus 1
Calculus 1
 
Implementation of RSA Algorithm for Speech Data Encryption and Decryption
Implementation of RSA Algorithm for Speech Data Encryption and DecryptionImplementation of RSA Algorithm for Speech Data Encryption and Decryption
Implementation of RSA Algorithm for Speech Data Encryption and Decryption
 
Ellipse
EllipseEllipse
Ellipse
 
Slides to RSA Presentation
Slides to RSA PresentationSlides to RSA Presentation
Slides to RSA Presentation
 
Review version 4
Review version 4Review version 4
Review version 4
 
Sol71
Sol71Sol71
Sol71
 
Review version 2
Review version 2Review version 2
Review version 2
 
Cohen-sutherland & liang-basky line clipping algorithm
Cohen-sutherland & liang-basky line clipping algorithmCohen-sutherland & liang-basky line clipping algorithm
Cohen-sutherland & liang-basky line clipping algorithm
 
Review
ReviewReview
Review
 
Cyrus beck line clipping algorithm
Cyrus beck line clipping algorithmCyrus beck line clipping algorithm
Cyrus beck line clipping algorithm
 
4 2 lesson - Graphing in Standard Form
4 2 lesson - Graphing in Standard Form4 2 lesson - Graphing in Standard Form
4 2 lesson - Graphing in Standard Form
 
Fast and Easy Subnetting
Fast and Easy SubnettingFast and Easy Subnetting
Fast and Easy Subnetting
 
what engineers don't know (but probably mathematicians do)
what engineers don't know (but probably mathematicians do)what engineers don't know (but probably mathematicians do)
what engineers don't know (but probably mathematicians do)
 
Review version 3
Review version 3Review version 3
Review version 3
 
CoqでGCの証明をしてみたよ(LT)
CoqでGCの証明をしてみたよ(LT)CoqでGCの証明をしてみたよ(LT)
CoqでGCの証明をしてみたよ(LT)
 
Application of bases
Application of basesApplication of bases
Application of bases
 
C++ Certified Associate Programmer CPA
C++ Certified Associate Programmer CPAC++ Certified Associate Programmer CPA
C++ Certified Associate Programmer CPA
 

Similar to 3XRC4

Cn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshanCn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshan
riturajj
 
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docxHW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
wellesleyterresa
 
Chapter Eight(2)
Chapter Eight(2)Chapter Eight(2)
Chapter Eight(2)
bolovv
 
i need help fixing my program so that the user can input both uper and.pdf
i need help fixing my program so that the user can input both uper and.pdfi need help fixing my program so that the user can input both uper and.pdf
i need help fixing my program so that the user can input both uper and.pdf
shreeaadithyaacellso
 

Similar to 3XRC4 (20)

WiFi Security Explained
WiFi Security ExplainedWiFi Security Explained
WiFi Security Explained
 
Rsa Signature: Behind The Scenes
Rsa Signature: Behind The Scenes Rsa Signature: Behind The Scenes
Rsa Signature: Behind The Scenes
 
Cn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshanCn os-lp lab manual k.roshan
Cn os-lp lab manual k.roshan
 
Data Protection Techniques and Cryptography
Data Protection Techniques and CryptographyData Protection Techniques and Cryptography
Data Protection Techniques and Cryptography
 
Blockchain Technology - Week 6 - Role of Cryptography in Blockchain
Blockchain Technology - Week 6 - Role of Cryptography in BlockchainBlockchain Technology - Week 6 - Role of Cryptography in Blockchain
Blockchain Technology - Week 6 - Role of Cryptography in Blockchain
 
Convolution presentation
Convolution presentationConvolution presentation
Convolution presentation
 
RSA SIGNATURE: BEHIND THE SCENES
RSA SIGNATURE: BEHIND THE SCENESRSA SIGNATURE: BEHIND THE SCENES
RSA SIGNATURE: BEHIND THE SCENES
 
1508.07756v1
1508.07756v11508.07756v1
1508.07756v1
 
Novel encryption algorithm and software development ecc and rsa
Novel encryption algorithm and software development ecc and rsaNovel encryption algorithm and software development ecc and rsa
Novel encryption algorithm and software development ecc and rsa
 
Wepwhacker !
Wepwhacker !Wepwhacker !
Wepwhacker !
 
Asssignment2
Asssignment2 Asssignment2
Asssignment2
 
15
1515
15
 
15
1515
15
 
Computer Security (Cryptography) Ch02
Computer Security (Cryptography) Ch02Computer Security (Cryptography) Ch02
Computer Security (Cryptography) Ch02
 
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docxHW 5-RSAascii2str.mfunction str = ascii2str(ascii)        .docx
HW 5-RSAascii2str.mfunction str = ascii2str(ascii) .docx
 
Image Encryption and Compression
Image Encryption and Compression Image Encryption and Compression
Image Encryption and Compression
 
Basics of Cryptography
Basics of CryptographyBasics of Cryptography
Basics of Cryptography
 
Chapter Eight(2)
Chapter Eight(2)Chapter Eight(2)
Chapter Eight(2)
 
NCCU CPDA Lecture 12 Attribute Based Encryption
NCCU CPDA Lecture 12 Attribute Based EncryptionNCCU CPDA Lecture 12 Attribute Based Encryption
NCCU CPDA Lecture 12 Attribute Based Encryption
 
i need help fixing my program so that the user can input both uper and.pdf
i need help fixing my program so that the user can input both uper and.pdfi need help fixing my program so that the user can input both uper and.pdf
i need help fixing my program so that the user can input both uper and.pdf
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Strategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering TeamsStrategic AI Integration in Engineering Teams
Strategic AI Integration in Engineering Teams
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi IbrahimzadeFree and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
Free and Effective: Making Flows Publicly Accessible, Yumi Ibrahimzade
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 

3XRC4

  • 1. Stream ciphers based on the mathematical structure underlying the 3 body problem.
  • 2. Author : Samir Bouftass , Independant crypto researcher E-mail : crypticator@gmail.com
  • 4. 1 - Key Stream Generation :
  • 7. A KeyStream K should fulfill this condition :
  • 8. The three body problem :
  • 9. If we perform measurements after a time intervall T :
  • 10. A modélisation of three body problem could be useful to crypto algorithmes design.
  • 11. 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] .
  • 12. 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
  • 13. The mathematical structure underlying the three body problem.
  • 14. 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 )
  • 15. 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].
  • 16. 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
  • 17. 3XRC4 : A RC4 variant based on the mathematical structure underlying The 3 body problème .
  • 18. 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]
  • 19. 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.
  • 20.
  • 22. 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]
  • 23. 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.