SlideShare a Scribd company logo
1 of 25
block ciphers
23rd June, 2021
topics
1. Boolean functions
2. S-box
3. Block cipher
https://olpctuva.wordpress.com/2011/06/05/serendipity/
What does cipher need
Mapping : Input bits => Output bits
1. cannot be determined easily
2. must change based on the user-defined key
3. must be reversible for decryption
Crypto attacks
1. Should not guess cipher for any given plaintext :
(Small change in plaintext should cause large output change)
2. Should not guess cipher for any given key :
(Small change in key should cause large output change)
3. Strict avalanche criterion : Change in one input bit should change half the
output bits !
4. Bit independence criterion : no correlation between two output bits
Shannon
1. Confusion : hide relation between cipher and key
2. Diffusion : hide relation between cipher and plaintext
Boolean
functions
Boolean function
Two representations
1. Truth table
2. ANF (algebraic normal form)
Classifying boolean functions
Nonlinear
Boolean
Affine
Linear
Bent
Bent and
Balanced
block ciphers need
Linear, affine and non-linear functions
Linear function = linear combination of input bits
Affine = Linear + some constant
Non linear has combinations of terms
f(x, y) = x + y
f(x, y) = x + y + 1
f(x, y) = x.y
measure non-linearity
1. Find Hamming distance from affine : number of bits different in truth table
2. Use Walsh-Hadamard transform - (Like the Fourier transform)
Say boolean f(x, y) = (x & ~y)
Truth table = [0, 0, 1, 0]
import sympy
sympy.fwht([0, 0, 1, 0]) = [1, 1, -1, -1]
Truth table of f(x,y) = [0, 1, 1, 0]
Truth table of g(x,y) = [1, 0, 1, 0]
Hamming distance = 2
Bent function
Is a maximal non-linear function
Farthest Hamming distance from *ALL* linear and affine functions (to ensure
nonlinearity)
(hamming distance = differ in number of bits in truth table)
Walsh-Hadamard spectrum is flat (i.e. all coefficients equal = like white noise)
Balanced function
Balanced function has truth table with same number of zeroes and ones
This is useful to prevent differential cryptanalysis (i.e. relative changes)
differential => plaintext pairs which have constant difference
f(x,y) = x ^ y has truth table = [0, 1, 1, 0]
Finding bent and balanced
It’s hard to find good bent functions as number of bits increases.
Heuristic/iterative constructions to find them (e.g. Maiorana-McFarland)
Butler, J.T., Sasao, T.: Logic functions for cryptography - a tutorial
Another way to obtain bent functions
Galois field
In a limited set of elements, it is
possible to define addition and
multiplication
e.g. 011 x 100 = 111
Multiplicative inverse
Multiplicative inverses occur in pairs
This defines a non-linear invertible mapping
(29, OA) is a pair on your right
row=0, column=A has 29
0A => 29
row=2, column=9 has 0A
29 => OA
S-box
Substitution (S-box)
Creates confusion using nonlinearity
Like a giant lookup table indexed by the key
In practice, S-boxes are combinations of smaller boxes
● Hard to find perfect nonlinear functions in higher dimensions
● Easier to manage smaller boxes in hardware
e.g. AES S-box operates on 8-bit; DES on 4-bit
DES S-box
DES has 8 S-boxes,
each doing 6-bit to 4-bit mapping
AES
Uses SubBytes (multiplicative inverse) for confusion
https://en.wikipedia.org/wiki/Rijndael_S-box
https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
block cipher
high level
three functions
1. S-box provides confusion
2. Byte shuffle and mixing provides diffusion (E-Box and P-box in DES,
MixColumns in AES)
3. Always XOR the key and data
high level
Operate on an even number of bits (if odd, some bit
can expose correlation)
Use multiple rounds to strengthen cipher
Rounds and key schedule
In each round, you create a “derived” key from main key to lookup the table
https://www.researchgate.net/figure/Figure-Structure-of-AES-III-Implementation-The-AES-algorithm-is-based-on-Key-Expansion_fig1_318486461
DES AES
Conclusion
1. S-Box is built from Non-linear boolean functions
2. Non-linearity : heuristic + iterative constructions, Galois field
3. Have to mix the key and data (XOR)
4. Use multiple rounds
5. Choice of permutations depend on the specific cipher
misc
Bent functions = strongly regular graph with e=d
Online database http://www.selmer.uib.no/odbf/search.html

More Related Content

What's hot

Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsShubham Sharma
 
The Ring programming language version 1.5.2 book - Part 18 of 181
The Ring programming language version 1.5.2 book - Part 18 of 181The Ring programming language version 1.5.2 book - Part 18 of 181
The Ring programming language version 1.5.2 book - Part 18 of 181Mahmoud Samir Fayed
 
Introduction to Dependently Types: Idris
Introduction to Dependently Types: IdrisIntroduction to Dependently Types: Idris
Introduction to Dependently Types: IdrisAbdulsattar Mohammed
 
Matlab cheatsheet
Matlab cheatsheetMatlab cheatsheet
Matlab cheatsheetlokeshkumer
 
C++ Course - Lesson 3
C++ Course - Lesson 3C++ Course - Lesson 3
C++ Course - Lesson 3Mohamed Ahmed
 
What is Binary (Computer Science)
What is Binary (Computer Science)What is Binary (Computer Science)
What is Binary (Computer Science)Mansoor Bahramand
 
Python Datatypes by SujithKumar
Python Datatypes by SujithKumarPython Datatypes by SujithKumar
Python Datatypes by SujithKumarSujith Kumar
 
The Ring programming language version 1.3 book - Part 11 of 88
The Ring programming language version 1.3 book - Part 11 of 88The Ring programming language version 1.3 book - Part 11 of 88
The Ring programming language version 1.3 book - Part 11 of 88Mahmoud Samir Fayed
 
Datastructures in python
Datastructures in pythonDatastructures in python
Datastructures in pythonhydpy
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional arrayRajendran
 

What's hot (20)

Doubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || AlgorithmsDoubly Linked List || Operations || Algorithms
Doubly Linked List || Operations || Algorithms
 
The Ring programming language version 1.5.2 book - Part 18 of 181
The Ring programming language version 1.5.2 book - Part 18 of 181The Ring programming language version 1.5.2 book - Part 18 of 181
The Ring programming language version 1.5.2 book - Part 18 of 181
 
Matlab cheatsheet
Matlab cheatsheetMatlab cheatsheet
Matlab cheatsheet
 
Introduction to Dependently Types: Idris
Introduction to Dependently Types: IdrisIntroduction to Dependently Types: Idris
Introduction to Dependently Types: Idris
 
Matlab cheatsheet
Matlab cheatsheetMatlab cheatsheet
Matlab cheatsheet
 
C++ Course - Lesson 3
C++ Course - Lesson 3C++ Course - Lesson 3
C++ Course - Lesson 3
 
What is Binary (Computer Science)
What is Binary (Computer Science)What is Binary (Computer Science)
What is Binary (Computer Science)
 
Python Datatypes by SujithKumar
Python Datatypes by SujithKumarPython Datatypes by SujithKumar
Python Datatypes by SujithKumar
 
Iteration
IterationIteration
Iteration
 
Dictionary
DictionaryDictionary
Dictionary
 
1.2 matlab numerical data
1.2  matlab numerical data1.2  matlab numerical data
1.2 matlab numerical data
 
Matlab Sample Assignment Solution
Matlab Sample Assignment SolutionMatlab Sample Assignment Solution
Matlab Sample Assignment Solution
 
The Ring programming language version 1.3 book - Part 11 of 88
The Ring programming language version 1.3 book - Part 11 of 88The Ring programming language version 1.3 book - Part 11 of 88
The Ring programming language version 1.3 book - Part 11 of 88
 
Datastructures in python
Datastructures in pythonDatastructures in python
Datastructures in python
 
1. python
1. python1. python
1. python
 
Tutorial 2
Tutorial     2Tutorial     2
Tutorial 2
 
Two dimensional array
Two dimensional arrayTwo dimensional array
Two dimensional array
 
Dependent Types with Idris
Dependent Types with IdrisDependent Types with Idris
Dependent Types with Idris
 
Welcome vibrant-technology-navimumbai
Welcome vibrant-technology-navimumbaiWelcome vibrant-technology-navimumbai
Welcome vibrant-technology-navimumbai
 
Welcome vibrant-technology-navimumbai
Welcome vibrant-technology-navimumbaiWelcome vibrant-technology-navimumbai
Welcome vibrant-technology-navimumbai
 

Similar to Block ciphers

Beyond Floating Point – Next Generation Computer Arithmetic
Beyond Floating Point – Next Generation Computer ArithmeticBeyond Floating Point – Next Generation Computer Arithmetic
Beyond Floating Point – Next Generation Computer Arithmeticinside-BigData.com
 
Modern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key CipherModern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key CipherMahbubur Rahman
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theoremsarunachalamr16
 
Block Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docxBlock Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docxUsamaAliLone3
 
Number System & Logic Gate
Number System & Logic GateNumber System & Logic Gate
Number System & Logic GateAshfakur Rahman
 
Aes128 bit project_report
Aes128 bit project_reportAes128 bit project_report
Aes128 bit project_reportNikhil Gupta
 
102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.pptSATHYARAJECE
 
(a) There are three ways to traverse a binary tree pre-order, in-or.docx
(a) There are three ways to traverse a binary tree pre-order, in-or.docx(a) There are three ways to traverse a binary tree pre-order, in-or.docx
(a) There are three ways to traverse a binary tree pre-order, in-or.docxajoy21
 
1) IntroductionThis practical work consists of developing
1) IntroductionThis practical work consists of developing1) IntroductionThis practical work consists of developing
1) IntroductionThis practical work consists of developingAbbyWhyte974
 
1) IntroductionThis practical work consists of developing
1) IntroductionThis practical work consists of developing1) IntroductionThis practical work consists of developing
1) IntroductionThis practical work consists of developingMartineMccracken314
 
101_2_digitalSystem_Chap_2_part_3.ppt
101_2_digitalSystem_Chap_2_part_3.ppt101_2_digitalSystem_Chap_2_part_3.ppt
101_2_digitalSystem_Chap_2_part_3.pptDavid Louie Bedia
 
AES by example
AES by exampleAES by example
AES by exampleShiraz316
 
Os Vanrossum
Os VanrossumOs Vanrossum
Os Vanrossumoscon2007
 
DS Unit 1.pptx
DS Unit 1.pptxDS Unit 1.pptx
DS Unit 1.pptxchin463670
 
Intro to Functions_Domain and Range.ppt
Intro to Functions_Domain and Range.pptIntro to Functions_Domain and Range.ppt
Intro to Functions_Domain and Range.pptArksJava2
 

Similar to Block ciphers (20)

DE notes
DE notesDE notes
DE notes
 
Bitwise
BitwiseBitwise
Bitwise
 
Beyond Floating Point – Next Generation Computer Arithmetic
Beyond Floating Point – Next Generation Computer ArithmeticBeyond Floating Point – Next Generation Computer Arithmetic
Beyond Floating Point – Next Generation Computer Arithmetic
 
Modern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key CipherModern Block Cipher- Modern Symmetric-Key Cipher
Modern Block Cipher- Modern Symmetric-Key Cipher
 
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
18 pc09 1.2_ digital logic gates _ boolean algebra_basic theorems
 
Block Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docxBlock Encryption Algorithm Project.docx
Block Encryption Algorithm Project.docx
 
DLD Chapter-2.pdf
DLD Chapter-2.pdfDLD Chapter-2.pdf
DLD Chapter-2.pdf
 
Number System & Logic Gate
Number System & Logic GateNumber System & Logic Gate
Number System & Logic Gate
 
Aes128 bit project_report
Aes128 bit project_reportAes128 bit project_report
Aes128 bit project_report
 
102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt102_2_digitalSystem_Chap_2_part_1.ppt
102_2_digitalSystem_Chap_2_part_1.ppt
 
Csc 2313 (lecture 4)
Csc 2313 (lecture 4)Csc 2313 (lecture 4)
Csc 2313 (lecture 4)
 
(a) There are three ways to traverse a binary tree pre-order, in-or.docx
(a) There are three ways to traverse a binary tree pre-order, in-or.docx(a) There are three ways to traverse a binary tree pre-order, in-or.docx
(a) There are three ways to traverse a binary tree pre-order, in-or.docx
 
1) IntroductionThis practical work consists of developing
1) IntroductionThis practical work consists of developing1) IntroductionThis practical work consists of developing
1) IntroductionThis practical work consists of developing
 
1) IntroductionThis practical work consists of developing
1) IntroductionThis practical work consists of developing1) IntroductionThis practical work consists of developing
1) IntroductionThis practical work consists of developing
 
101_2_digitalSystem_Chap_2_part_3.ppt
101_2_digitalSystem_Chap_2_part_3.ppt101_2_digitalSystem_Chap_2_part_3.ppt
101_2_digitalSystem_Chap_2_part_3.ppt
 
AES by example
AES by exampleAES by example
AES by example
 
Os Vanrossum
Os VanrossumOs Vanrossum
Os Vanrossum
 
DS Unit 1.pptx
DS Unit 1.pptxDS Unit 1.pptx
DS Unit 1.pptx
 
2dig circ
2dig circ2dig circ
2dig circ
 
Intro to Functions_Domain and Range.ppt
Intro to Functions_Domain and Range.pptIntro to Functions_Domain and Range.ppt
Intro to Functions_Domain and Range.ppt
 

More from Sandeep Joshi

Synthetic data generation
Synthetic data generationSynthetic data generation
Synthetic data generationSandeep Joshi
 
How to build a feedback loop in software
How to build a feedback loop in softwareHow to build a feedback loop in software
How to build a feedback loop in softwareSandeep Joshi
 
Programming workshop
Programming workshopProgramming workshop
Programming workshopSandeep Joshi
 
Hash function landscape
Hash function landscapeHash function landscape
Hash function landscapeSandeep Joshi
 
Android malware presentation
Android malware presentationAndroid malware presentation
Android malware presentationSandeep Joshi
 
Doveryai, no proveryai - Introduction to tla+
Doveryai, no proveryai - Introduction to tla+Doveryai, no proveryai - Introduction to tla+
Doveryai, no proveryai - Introduction to tla+Sandeep Joshi
 
Apache spark undocumented extensions
Apache spark undocumented extensionsApache spark undocumented extensions
Apache spark undocumented extensionsSandeep Joshi
 
Rate limiters in big data systems
Rate limiters in big data systemsRate limiters in big data systems
Rate limiters in big data systemsSandeep Joshi
 
Virtualization overheads
Virtualization overheadsVirtualization overheads
Virtualization overheadsSandeep Joshi
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithmsSandeep Joshi
 

More from Sandeep Joshi (11)

Synthetic data generation
Synthetic data generationSynthetic data generation
Synthetic data generation
 
How to build a feedback loop in software
How to build a feedback loop in softwareHow to build a feedback loop in software
How to build a feedback loop in software
 
Programming workshop
Programming workshopProgramming workshop
Programming workshop
 
Hash function landscape
Hash function landscapeHash function landscape
Hash function landscape
 
Android malware presentation
Android malware presentationAndroid malware presentation
Android malware presentation
 
Doveryai, no proveryai - Introduction to tla+
Doveryai, no proveryai - Introduction to tla+Doveryai, no proveryai - Introduction to tla+
Doveryai, no proveryai - Introduction to tla+
 
Apache spark undocumented extensions
Apache spark undocumented extensionsApache spark undocumented extensions
Apache spark undocumented extensions
 
Lockless
LocklessLockless
Lockless
 
Rate limiters in big data systems
Rate limiters in big data systemsRate limiters in big data systems
Rate limiters in big data systems
 
Virtualization overheads
Virtualization overheadsVirtualization overheads
Virtualization overheads
 
Data streaming algorithms
Data streaming algorithmsData streaming algorithms
Data streaming algorithms
 

Recently uploaded

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 

Recently uploaded (20)

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 

Block ciphers

  • 2. topics 1. Boolean functions 2. S-box 3. Block cipher https://olpctuva.wordpress.com/2011/06/05/serendipity/
  • 3. What does cipher need Mapping : Input bits => Output bits 1. cannot be determined easily 2. must change based on the user-defined key 3. must be reversible for decryption
  • 4. Crypto attacks 1. Should not guess cipher for any given plaintext : (Small change in plaintext should cause large output change) 2. Should not guess cipher for any given key : (Small change in key should cause large output change) 3. Strict avalanche criterion : Change in one input bit should change half the output bits ! 4. Bit independence criterion : no correlation between two output bits
  • 5. Shannon 1. Confusion : hide relation between cipher and key 2. Diffusion : hide relation between cipher and plaintext
  • 7. Boolean function Two representations 1. Truth table 2. ANF (algebraic normal form)
  • 9. Linear, affine and non-linear functions Linear function = linear combination of input bits Affine = Linear + some constant Non linear has combinations of terms f(x, y) = x + y f(x, y) = x + y + 1 f(x, y) = x.y
  • 10. measure non-linearity 1. Find Hamming distance from affine : number of bits different in truth table 2. Use Walsh-Hadamard transform - (Like the Fourier transform) Say boolean f(x, y) = (x & ~y) Truth table = [0, 0, 1, 0] import sympy sympy.fwht([0, 0, 1, 0]) = [1, 1, -1, -1] Truth table of f(x,y) = [0, 1, 1, 0] Truth table of g(x,y) = [1, 0, 1, 0] Hamming distance = 2
  • 11. Bent function Is a maximal non-linear function Farthest Hamming distance from *ALL* linear and affine functions (to ensure nonlinearity) (hamming distance = differ in number of bits in truth table) Walsh-Hadamard spectrum is flat (i.e. all coefficients equal = like white noise)
  • 12. Balanced function Balanced function has truth table with same number of zeroes and ones This is useful to prevent differential cryptanalysis (i.e. relative changes) differential => plaintext pairs which have constant difference f(x,y) = x ^ y has truth table = [0, 1, 1, 0]
  • 13. Finding bent and balanced It’s hard to find good bent functions as number of bits increases. Heuristic/iterative constructions to find them (e.g. Maiorana-McFarland) Butler, J.T., Sasao, T.: Logic functions for cryptography - a tutorial
  • 14. Another way to obtain bent functions Galois field In a limited set of elements, it is possible to define addition and multiplication e.g. 011 x 100 = 111
  • 15. Multiplicative inverse Multiplicative inverses occur in pairs This defines a non-linear invertible mapping (29, OA) is a pair on your right row=0, column=A has 29 0A => 29 row=2, column=9 has 0A 29 => OA
  • 16. S-box
  • 17. Substitution (S-box) Creates confusion using nonlinearity Like a giant lookup table indexed by the key In practice, S-boxes are combinations of smaller boxes ● Hard to find perfect nonlinear functions in higher dimensions ● Easier to manage smaller boxes in hardware e.g. AES S-box operates on 8-bit; DES on 4-bit
  • 18. DES S-box DES has 8 S-boxes, each doing 6-bit to 4-bit mapping
  • 19. AES Uses SubBytes (multiplicative inverse) for confusion https://en.wikipedia.org/wiki/Rijndael_S-box https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
  • 21. high level three functions 1. S-box provides confusion 2. Byte shuffle and mixing provides diffusion (E-Box and P-box in DES, MixColumns in AES) 3. Always XOR the key and data
  • 22. high level Operate on an even number of bits (if odd, some bit can expose correlation) Use multiple rounds to strengthen cipher
  • 23. Rounds and key schedule In each round, you create a “derived” key from main key to lookup the table https://www.researchgate.net/figure/Figure-Structure-of-AES-III-Implementation-The-AES-algorithm-is-based-on-Key-Expansion_fig1_318486461 DES AES
  • 24. Conclusion 1. S-Box is built from Non-linear boolean functions 2. Non-linearity : heuristic + iterative constructions, Galois field 3. Have to mix the key and data (XOR) 4. Use multiple rounds 5. Choice of permutations depend on the specific cipher
  • 25. misc Bent functions = strongly regular graph with e=d Online database http://www.selmer.uib.no/odbf/search.html