SlideShare a Scribd company logo
Cryptography 101
What is Cryptography?
Encryption is the process of:
1.Transforming data (x)
2.Using an algorithm (e)
3.To make it unreadable to anyone (y)
4.except those possessing the key. (k)
K={k1,…,kn}
The Quick Brown Fox
Me (mod N) where M=The Quick Brown Fox
Uif Rvjdl Cspxo Gpy
Kerchhoffs’ principle: A cryptosystem should be secure even if the
Attacker knows all the details about the system, with the exception of
The key.
We shall extend the empire of Persia such that its boundaries
will be God's own sky, so the sun will not look down upon
any land beyond the boundaries of what is our own
-Xerxes (Ahasuerus) ~450 B.C.
(Spartan) Scytale
Rail Fence Cipher
Route Cipher
Transposition Ciphers
The Quick Brown Fox
GSV JFRXP YILDM ULC
Substitution Ciphers
The Quick Brown Fox
ZIT JXOEA WKGVF YGB
Shift Cipher (Caesar)
The Quick Brown Fox
SGD PTHBJ AQNVM ENW
At-Bash
Modular ciphers
a = r mod m
42 = 9*4 + 6
r = a – m*q
42 = 6 mod 9
42 = q*9 + 6
6 = 42 – q*9
q = 0, r = 42
q = 1, r = 33
q = 2, r = 24
q = 3, r = 15
q = 4, r = 6 (0<q<m-1)
q = 5, r = -3
q = 6, r = -12
12 + 7 = 19 => 1 mod 9
14 – 2 = 12 => 3 mod 9
11 * 8 = 88 => 7 mod 9
15/5 = 3 !=> 3 mod 9
If the multiplicative inverse exists for a number
then we can divide by that number
5*2=10 => 1 mod 9
2 is the multiplicative inverse of 5 (and vice versa)
15*2 = 30 => 3 mod 9
If x is coprime with modulus then it has an inverse.
Caesar Cipher
Encryption: ek (x) = x + k mod 26
Decryption: ek (y) = y – k mod 26
The quick brown fox
k=3
t=20, 20 + 3 = 23 mod 26
h=8, 8 + 3 = 11 mod 26
e=5, 5 + 3 = 8 mod 26
Affine Cipher k=(a,b)
Encryption: ek (x) = a*x + b mod 26
Decryption: ek (y) = a-1 * (y – b) mod 26
The quick brown fox
k=(5, 3)
t=20, 5*20 + 3 = 103 = 25 mod 26
h=8, 5*8 + 3 = 43 = 17 mod 26
e=5, 5*5 + 3 = 28 = 2 mod 26
21 * 5 = 105 = 1 mod 26
21 * 25-3 = 462 = 20 mod 26
21 * 17-3 = 294 = 8 mod 26
21 * 2-3 = -21 = 5 mod 26
Brute-Force Attacks
Given: y = SGD PTHBJ AQNVM ENW
Keyspace = {1,…,25}
Decryption : ki(y) =? x
Abu Yūsuf Yaʻqūb ibn ʼIsḥāq
aṣ-Ṣabbāḥ al-Kindī 850 C.E.
Cryptanalysis
Letter Frequency Short word and letter combinations
the
be
to
of
and
that
have
for
not
http://www.richkni.co.uk/php/crypta/
Normal English letter frequency
Ciphertext letter frequency
Vigenère cipher
A polyalphabetic cipher
Key = KING
The sun and the man in the moon
Dpr yev ntn buk wia ox buk wwbt
4 possible ways to spell the word “the”
K – DPR I - BUK
N – GNO G - ZRM
http://www.simonsingh.net/The_Black_Chamber/vigenere_cracking_tool.html
http://sharkysoft.com/vigenere/
Enigma
http://cryptoclub.math.uic.edu/shiftcipher/shiftcipher.php
http://enigma.louisedade.co.uk/enigma.html
AXP AVC .. IOV NKZ .. HSA PYT .. PPZ LEX
FZD YQO .. IZL NQL .. NNQ CMA .. GUH BIS
FGT YHD .. KDY GNV .. NBJ COQ .. GOI BKK
MIW MRI .. VWG EZG .. SYX SJB .. TVB KFM
DJG UDG .. OJN QDE .. SNH SMS .. TLI KPK
LNK TMF .. ZAO RXJ .. SXV SVZ .. TYO KJJ
XKN JAE .. CTL OUL .. ERS XWU .. WHJ WBQ
BHG DBG .. CMM OTY .. EAA XXT .. JQR ISH
RZU ZQN .. UKM HAY .. YCE FGR .. JEY ICV
RTC ZUW .. QFF VLP .. PII LRK .. JCE IGP
Loops(1,4) (LTKGBDUHP) (XJINCOQVE) (FY) (RZ) (A) (M) (S) (W)
Loops(2,5) (XVFLPECGHBOKA) (ZQSYJDNMTUIRW)
Loops(3,6) (PCWIKF) (DOJQAT) (NERHSU) (VZXBMY) (L) (G)
Loops(1,4) 8, 9, 9, 2, 2, 1, 1, 1, 1
Loops(2,5) 2, 13, 13
Loops(3,6) 6, 6, 6, 6, 6, 1, 1
By the end of WWII enigma
had a key space of
159 sextillion (159*1021)
Confusion and Diffusion
Claude Shannon
Confusion
The relationship between the key and the ciphertext as complex and as
involved as possible.
e.g. Enigma & complex substitution (S-boxes)
011011
Diffusion
Statistics of the plaintext is "dissipated" in the
statistics of the ciphertext. If we change a
character of the plaintext, then several
characters of the ciphertext should change.
http://en.wikipedia.org/wiki/Permutation_box
P-Box
Left Right
ABCDEF GHIJKL
ABCDEF F() = HJLGIK
Xor = JIHGKL
JIHGKL ABCDEF
DES
Data Encryption Standard (1973)
56 bit (Lucifer cipher)
Key Length Security Estimation
56-64 bits A few hours or days
112-128 bits Several decades (w/o QC)
256 bits Several decades (w QC)
AES
Advance Encryption Standard (2001)
Currently accepted industry standard
Supports 128, 192 and 256 bit keys.
In 1997 National Institute of Standards and Technology (NIST)
Called for proposals for AES
• Rijandel
• Mars
• RC6
• Serpent
• Twofish
In 2001 Rijandel was adopted and renamed AES.
Diffie-Hellman Key Exchange (DHKE)
Discrete Logarithm Problem
Used in:
SSH
TLS
IPSec
Diffie-Hellman Key Exchange (DHKE)
Discrete Logarithm Problem
1. Choose a prime modulus P. 17
2. Choose an integer A that will be known as the generator. 3
3. Alice and Bob both choose a private number
Ax mod P
Alice a – 15 Bob b – 13
315 mod 17 = 6 313 mod 17 = 12
6
<- 12
12 15 mod 17 = 10 6 13 mod 17 = 10
Hacker knows:
Alice - Ax mod P = 6
Bob - Ax mod P = 12
A is specially chosen to induce the discrete logarithm problem and ensure
a one way function.
Exponentiation is commutative: k = (Ax)y = (Ay)x
RSA
Rivest, Shamir, Adleman
Discrete logarithm and integer factorization
Set up
1. Choose two large primes: p=3 and q=11
2. n = p*q = 33
3. Θ(n) = (p-1)(q-1)=(3-1)(11-1)=20
4. Find a number e where gcd(e, Θ(n)) = 1 e=3
5. Find the number d where e*d = 1 mod Θ(n) d=7
Public key (n, e) = (33, 3)
Private key(d)
c = me mod n
m = cd mod n
Alice Bob
m=4
43 mod 33 = 31
31->
317 mod 20 = 4

More Related Content

What's hot

Coq for ML users
Coq for ML usersCoq for ML users
Coq for ML users
tmiya
 
Introduction to SPI and PMIC with SPI interface (chinese)
Introduction to SPI and PMIC with SPI interface (chinese)Introduction to SPI and PMIC with SPI interface (chinese)
Introduction to SPI and PMIC with SPI interface (chinese)
Sneeker Yeh
 
Engineering fast indexes
Engineering fast indexesEngineering fast indexes
Engineering fast indexes
Daniel Lemire
 
IoT Chess 16th April Berlin
IoT Chess 16th April BerlinIoT Chess 16th April Berlin
IoT Chess 16th April Berlin
Lars Gregori
 
Next Generation Indexes For Big Data Engineering (ODSC East 2018)
Next Generation Indexes For Big Data Engineering (ODSC East 2018)Next Generation Indexes For Big Data Engineering (ODSC East 2018)
Next Generation Indexes For Big Data Engineering (ODSC East 2018)
Daniel Lemire
 
El
ElEl
2021 Quantum Challenge ex.1
2021 Quantum Challenge ex.12021 Quantum Challenge ex.1
2021 Quantum Challenge ex.1
RikuyaKubota
 
Why Systolic Architectures
Why Systolic ArchitecturesWhy Systolic Architectures
Why Systolic Architectures
Mindos Cheng
 
Use the following data definitions until notified otherwise Byte1 BYTE ...
Use the following data definitions until notified otherwise  Byte1    BYTE   ...Use the following data definitions until notified otherwise  Byte1    BYTE   ...
Use the following data definitions until notified otherwise Byte1 BYTE ...
hwbloom138
 
Tower of Hanoi using AI technique - means ends analysis
Tower of Hanoi using AI technique - means ends analysisTower of Hanoi using AI technique - means ends analysis
Tower of Hanoi using AI technique - means ends analysis
Shubham Nimiwal
 
C coroutine
C coroutineC coroutine
C coroutine
Chien-Wei Huang
 
Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
Iffat Anjum
 
Quantum challenge2021 Ex1
Quantum challenge2021 Ex1Quantum challenge2021 Ex1
Quantum challenge2021 Ex1
UkyoKimura
 
Implementation of Bitcoin Miner on SW and HW
Implementation of Bitcoin Miner on SW and HWImplementation of Bitcoin Miner on SW and HW
Implementation of Bitcoin Miner on SW and HW
Joe Jiang
 
Gate level minimization (2nd update)
Gate level minimization (2nd update)Gate level minimization (2nd update)
Gate level minimization (2nd update)
Aravir Rose
 
Quantum challenge 2021 exercise1
Quantum challenge 2021 exercise1Quantum challenge 2021 exercise1
Quantum challenge 2021 exercise1
takumitano
 
Cloud flare jgc bigo meetup rolling hashes
Cloud flare jgc   bigo meetup rolling hashesCloud flare jgc   bigo meetup rolling hashes
Cloud flare jgc bigo meetup rolling hashes
Cloudflare
 
Concurrency in Go by Denys Goldiner.pdf
Concurrency in Go by Denys Goldiner.pdfConcurrency in Go by Denys Goldiner.pdf
Concurrency in Go by Denys Goldiner.pdf
Denys Goldiner
 
Strongly Connected Components
Strongly Connected Components Strongly Connected Components
Strongly Connected Components
Md. Shafiuzzaman Hira
 
Fast Wavelet Tree Construction in Practice
Fast Wavelet Tree Construction in PracticeFast Wavelet Tree Construction in Practice
Fast Wavelet Tree Construction in Practice
Rakuten Group, Inc.
 

What's hot (20)

Coq for ML users
Coq for ML usersCoq for ML users
Coq for ML users
 
Introduction to SPI and PMIC with SPI interface (chinese)
Introduction to SPI and PMIC with SPI interface (chinese)Introduction to SPI and PMIC with SPI interface (chinese)
Introduction to SPI and PMIC with SPI interface (chinese)
 
Engineering fast indexes
Engineering fast indexesEngineering fast indexes
Engineering fast indexes
 
IoT Chess 16th April Berlin
IoT Chess 16th April BerlinIoT Chess 16th April Berlin
IoT Chess 16th April Berlin
 
Next Generation Indexes For Big Data Engineering (ODSC East 2018)
Next Generation Indexes For Big Data Engineering (ODSC East 2018)Next Generation Indexes For Big Data Engineering (ODSC East 2018)
Next Generation Indexes For Big Data Engineering (ODSC East 2018)
 
El
ElEl
El
 
2021 Quantum Challenge ex.1
2021 Quantum Challenge ex.12021 Quantum Challenge ex.1
2021 Quantum Challenge ex.1
 
Why Systolic Architectures
Why Systolic ArchitecturesWhy Systolic Architectures
Why Systolic Architectures
 
Use the following data definitions until notified otherwise Byte1 BYTE ...
Use the following data definitions until notified otherwise  Byte1    BYTE   ...Use the following data definitions until notified otherwise  Byte1    BYTE   ...
Use the following data definitions until notified otherwise Byte1 BYTE ...
 
Tower of Hanoi using AI technique - means ends analysis
Tower of Hanoi using AI technique - means ends analysisTower of Hanoi using AI technique - means ends analysis
Tower of Hanoi using AI technique - means ends analysis
 
C coroutine
C coroutineC coroutine
C coroutine
 
Tower of hanoi
Tower of hanoiTower of hanoi
Tower of hanoi
 
Quantum challenge2021 Ex1
Quantum challenge2021 Ex1Quantum challenge2021 Ex1
Quantum challenge2021 Ex1
 
Implementation of Bitcoin Miner on SW and HW
Implementation of Bitcoin Miner on SW and HWImplementation of Bitcoin Miner on SW and HW
Implementation of Bitcoin Miner on SW and HW
 
Gate level minimization (2nd update)
Gate level minimization (2nd update)Gate level minimization (2nd update)
Gate level minimization (2nd update)
 
Quantum challenge 2021 exercise1
Quantum challenge 2021 exercise1Quantum challenge 2021 exercise1
Quantum challenge 2021 exercise1
 
Cloud flare jgc bigo meetup rolling hashes
Cloud flare jgc   bigo meetup rolling hashesCloud flare jgc   bigo meetup rolling hashes
Cloud flare jgc bigo meetup rolling hashes
 
Concurrency in Go by Denys Goldiner.pdf
Concurrency in Go by Denys Goldiner.pdfConcurrency in Go by Denys Goldiner.pdf
Concurrency in Go by Denys Goldiner.pdf
 
Strongly Connected Components
Strongly Connected Components Strongly Connected Components
Strongly Connected Components
 
Fast Wavelet Tree Construction in Practice
Fast Wavelet Tree Construction in PracticeFast Wavelet Tree Construction in Practice
Fast Wavelet Tree Construction in Practice
 

Similar to Cryptography : From Demaratus to RSA

Demystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptxDemystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptx
RedWhite12
 
Cs262 2006 lecture6
Cs262 2006 lecture6Cs262 2006 lecture6
Cs262 2006 lecture6
BioinformaticsInstitute
 
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Mozaic Works
 
Cryptography
CryptographyCryptography
Cryptography
David Evans
 
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Svetlin Nakov
 
Introductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityIntroductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information Security
Bikramjit Sarkar, Ph.D.
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
Alex Pruden
 
Joel Spencer – Finding Needles in Exponential Haystacks
Joel Spencer – Finding Needles in Exponential Haystacks Joel Spencer – Finding Needles in Exponential Haystacks
Joel Spencer – Finding Needles in Exponential Haystacks
Yandex
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
David Evans
 
Response Surface in Tensor Train format for Uncertainty Quantification
Response Surface in Tensor Train format for Uncertainty QuantificationResponse Surface in Tensor Train format for Uncertainty Quantification
Response Surface in Tensor Train format for Uncertainty Quantification
Alexander Litvinenko
 
Compilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMCompilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVM
Linaro
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...
Codemotion
 
DES Block Cipher Hao Qi
DES Block Cipher Hao QiDES Block Cipher Hao Qi
DES Block Cipher Hao Qi
Information Security Awareness Group
 
20141105 asfws-norx-slides
20141105 asfws-norx-slides20141105 asfws-norx-slides
20141105 asfws-norx-slides
Cyber Security Alliance
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
Kelly Bresnahan
 
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Codemotion
 
A study on number theory and its applications
A study on number theory and its applicationsA study on number theory and its applications
A study on number theory and its applications
Itishree Dash
 
Cryptography: way to Arkham - Andriy Savchenko
Cryptography: way to Arkham - Andriy SavchenkoCryptography: way to Arkham - Andriy Savchenko
Cryptography: way to Arkham - Andriy Savchenko
Ruby Meditation
 
Codes and Isogenies
Codes and IsogeniesCodes and Isogenies
Codes and Isogenies
Priyanka Aash
 
Block Cipher vs. Stream Cipher
Block Cipher vs. Stream CipherBlock Cipher vs. Stream Cipher
Block Cipher vs. Stream Cipher
Amirul Wiramuda
 

Similar to Cryptography : From Demaratus to RSA (20)

Demystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptxDemystifying Zero Knowledge Proofs [FINAL].pptx
Demystifying Zero Knowledge Proofs [FINAL].pptx
 
Cs262 2006 lecture6
Cs262 2006 lecture6Cs262 2006 lecture6
Cs262 2006 lecture6
 
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
Stefan Kanev: Clojure, ClojureScript and Why They're Awesome at I T.A.K.E. Un...
 
Cryptography
CryptographyCryptography
Cryptography
 
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
 
Introductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information SecurityIntroductory Lecture on Cryptography and Information Security
Introductory Lecture on Cryptography and Information Security
 
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
zkStudyClub: PLONKUP & Reinforced Concrete [Luke Pearson, Joshua Fitzgerald, ...
 
Joel Spencer – Finding Needles in Exponential Haystacks
Joel Spencer – Finding Needles in Exponential Haystacks Joel Spencer – Finding Needles in Exponential Haystacks
Joel Spencer – Finding Needles in Exponential Haystacks
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Response Surface in Tensor Train format for Uncertainty Quantification
Response Surface in Tensor Train format for Uncertainty QuantificationResponse Surface in Tensor Train format for Uncertainty Quantification
Response Surface in Tensor Train format for Uncertainty Quantification
 
Compilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVMCompilation of COSMO for GPU using LLVM
Compilation of COSMO for GPU using LLVM
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...
 
DES Block Cipher Hao Qi
DES Block Cipher Hao QiDES Block Cipher Hao Qi
DES Block Cipher Hao Qi
 
20141105 asfws-norx-slides
20141105 asfws-norx-slides20141105 asfws-norx-slides
20141105 asfws-norx-slides
 
Elliptic Curve Cryptography
Elliptic Curve CryptographyElliptic Curve Cryptography
Elliptic Curve Cryptography
 
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
Sasha Romijn - Everything I always wanted to know about crypto, but never tho...
 
A study on number theory and its applications
A study on number theory and its applicationsA study on number theory and its applications
A study on number theory and its applications
 
Cryptography: way to Arkham - Andriy Savchenko
Cryptography: way to Arkham - Andriy SavchenkoCryptography: way to Arkham - Andriy Savchenko
Cryptography: way to Arkham - Andriy Savchenko
 
Codes and Isogenies
Codes and IsogeniesCodes and Isogenies
Codes and Isogenies
 
Block Cipher vs. Stream Cipher
Block Cipher vs. Stream CipherBlock Cipher vs. Stream Cipher
Block Cipher vs. Stream Cipher
 

Recently uploaded

Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
flufftailshop
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
alexjohnson7307
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 

Recently uploaded (20)

Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdfNunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
Nunit vs XUnit vs MSTest Differences Between These Unit Testing Frameworks.pdf
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
leewayhertz.com-AI in predictive maintenance Use cases technologies benefits ...
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 

Cryptography : From Demaratus to RSA

  • 2. What is Cryptography? Encryption is the process of: 1.Transforming data (x) 2.Using an algorithm (e) 3.To make it unreadable to anyone (y) 4.except those possessing the key. (k) K={k1,…,kn} The Quick Brown Fox Me (mod N) where M=The Quick Brown Fox Uif Rvjdl Cspxo Gpy Kerchhoffs’ principle: A cryptosystem should be secure even if the Attacker knows all the details about the system, with the exception of The key.
  • 3. We shall extend the empire of Persia such that its boundaries will be God's own sky, so the sun will not look down upon any land beyond the boundaries of what is our own -Xerxes (Ahasuerus) ~450 B.C.
  • 4. (Spartan) Scytale Rail Fence Cipher Route Cipher Transposition Ciphers
  • 5. The Quick Brown Fox GSV JFRXP YILDM ULC Substitution Ciphers The Quick Brown Fox ZIT JXOEA WKGVF YGB Shift Cipher (Caesar) The Quick Brown Fox SGD PTHBJ AQNVM ENW At-Bash
  • 6. Modular ciphers a = r mod m 42 = 9*4 + 6 r = a – m*q 42 = 6 mod 9 42 = q*9 + 6 6 = 42 – q*9 q = 0, r = 42 q = 1, r = 33 q = 2, r = 24 q = 3, r = 15 q = 4, r = 6 (0<q<m-1) q = 5, r = -3 q = 6, r = -12 12 + 7 = 19 => 1 mod 9 14 – 2 = 12 => 3 mod 9 11 * 8 = 88 => 7 mod 9 15/5 = 3 !=> 3 mod 9 If the multiplicative inverse exists for a number then we can divide by that number 5*2=10 => 1 mod 9 2 is the multiplicative inverse of 5 (and vice versa) 15*2 = 30 => 3 mod 9 If x is coprime with modulus then it has an inverse.
  • 7. Caesar Cipher Encryption: ek (x) = x + k mod 26 Decryption: ek (y) = y – k mod 26 The quick brown fox k=3 t=20, 20 + 3 = 23 mod 26 h=8, 8 + 3 = 11 mod 26 e=5, 5 + 3 = 8 mod 26 Affine Cipher k=(a,b) Encryption: ek (x) = a*x + b mod 26 Decryption: ek (y) = a-1 * (y – b) mod 26 The quick brown fox k=(5, 3) t=20, 5*20 + 3 = 103 = 25 mod 26 h=8, 5*8 + 3 = 43 = 17 mod 26 e=5, 5*5 + 3 = 28 = 2 mod 26 21 * 5 = 105 = 1 mod 26 21 * 25-3 = 462 = 20 mod 26 21 * 17-3 = 294 = 8 mod 26 21 * 2-3 = -21 = 5 mod 26
  • 8. Brute-Force Attacks Given: y = SGD PTHBJ AQNVM ENW Keyspace = {1,…,25} Decryption : ki(y) =? x
  • 9. Abu Yūsuf Yaʻqūb ibn ʼIsḥāq aṣ-Ṣabbāḥ al-Kindī 850 C.E. Cryptanalysis Letter Frequency Short word and letter combinations the be to of and that have for not http://www.richkni.co.uk/php/crypta/
  • 10. Normal English letter frequency Ciphertext letter frequency
  • 11. Vigenère cipher A polyalphabetic cipher Key = KING The sun and the man in the moon Dpr yev ntn buk wia ox buk wwbt 4 possible ways to spell the word “the” K – DPR I - BUK N – GNO G - ZRM http://www.simonsingh.net/The_Black_Chamber/vigenere_cracking_tool.html http://sharkysoft.com/vigenere/
  • 13. AXP AVC .. IOV NKZ .. HSA PYT .. PPZ LEX FZD YQO .. IZL NQL .. NNQ CMA .. GUH BIS FGT YHD .. KDY GNV .. NBJ COQ .. GOI BKK MIW MRI .. VWG EZG .. SYX SJB .. TVB KFM DJG UDG .. OJN QDE .. SNH SMS .. TLI KPK LNK TMF .. ZAO RXJ .. SXV SVZ .. TYO KJJ XKN JAE .. CTL OUL .. ERS XWU .. WHJ WBQ BHG DBG .. CMM OTY .. EAA XXT .. JQR ISH RZU ZQN .. UKM HAY .. YCE FGR .. JEY ICV RTC ZUW .. QFF VLP .. PII LRK .. JCE IGP Loops(1,4) (LTKGBDUHP) (XJINCOQVE) (FY) (RZ) (A) (M) (S) (W) Loops(2,5) (XVFLPECGHBOKA) (ZQSYJDNMTUIRW) Loops(3,6) (PCWIKF) (DOJQAT) (NERHSU) (VZXBMY) (L) (G) Loops(1,4) 8, 9, 9, 2, 2, 1, 1, 1, 1 Loops(2,5) 2, 13, 13 Loops(3,6) 6, 6, 6, 6, 6, 1, 1 By the end of WWII enigma had a key space of 159 sextillion (159*1021)
  • 14. Confusion and Diffusion Claude Shannon Confusion The relationship between the key and the ciphertext as complex and as involved as possible. e.g. Enigma & complex substitution (S-boxes) 011011 Diffusion Statistics of the plaintext is "dissipated" in the statistics of the ciphertext. If we change a character of the plaintext, then several characters of the ciphertext should change. http://en.wikipedia.org/wiki/Permutation_box P-Box
  • 15. Left Right ABCDEF GHIJKL ABCDEF F() = HJLGIK Xor = JIHGKL JIHGKL ABCDEF DES Data Encryption Standard (1973) 56 bit (Lucifer cipher) Key Length Security Estimation 56-64 bits A few hours or days 112-128 bits Several decades (w/o QC) 256 bits Several decades (w QC)
  • 16. AES Advance Encryption Standard (2001) Currently accepted industry standard Supports 128, 192 and 256 bit keys. In 1997 National Institute of Standards and Technology (NIST) Called for proposals for AES • Rijandel • Mars • RC6 • Serpent • Twofish In 2001 Rijandel was adopted and renamed AES.
  • 17. Diffie-Hellman Key Exchange (DHKE) Discrete Logarithm Problem Used in: SSH TLS IPSec
  • 18. Diffie-Hellman Key Exchange (DHKE) Discrete Logarithm Problem 1. Choose a prime modulus P. 17 2. Choose an integer A that will be known as the generator. 3 3. Alice and Bob both choose a private number Ax mod P Alice a – 15 Bob b – 13 315 mod 17 = 6 313 mod 17 = 12 6 <- 12 12 15 mod 17 = 10 6 13 mod 17 = 10 Hacker knows: Alice - Ax mod P = 6 Bob - Ax mod P = 12 A is specially chosen to induce the discrete logarithm problem and ensure a one way function. Exponentiation is commutative: k = (Ax)y = (Ay)x
  • 19. RSA Rivest, Shamir, Adleman Discrete logarithm and integer factorization Set up 1. Choose two large primes: p=3 and q=11 2. n = p*q = 33 3. Θ(n) = (p-1)(q-1)=(3-1)(11-1)=20 4. Find a number e where gcd(e, Θ(n)) = 1 e=3 5. Find the number d where e*d = 1 mod Θ(n) d=7 Public key (n, e) = (33, 3) Private key(d) c = me mod n m = cd mod n Alice Bob m=4 43 mod 33 = 31 31-> 317 mod 20 = 4