SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Kürzlich hochgeladen (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.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
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
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
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

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