SlideShare una empresa de Scribd logo
1 de 59
Modern Cryptography 
for Java Developers 
James McGivern
About This Talk 
• Not a treaty in mathematical theory 
• Rapid fire - please save questions until the 
end 
• Looking under the hood 
• Look at two popular algorithms 
• Hot cryptographic research
Definitions 
• Cryptography 
• Plaintext 
• Cyphertext 
• Code 
• Cypher vs Cipher 
• Encryption / Decryption 
• Key
“Secure Hashes” 
• A hash function takes an arbitrary length input and 
returns a fixed sized bit string 
• Cryptographic hash function obey 3 properties: 
• Given a hash h it should be hard to find a message m 
s.t. h = hash(m) 
• Given an input m1 it should be hard to find an m2 s.t. 
m1 != m2 and hash(m1) = hash(m2) 
• Should be hash collision resistant 
• MD5, SHA-1, SHA-3, RIPEMD-xxx
1,000,000 BC 
~WWII
A Challenge 
Gur Nafjre gb Yvsr, Gur Havirefr, naq 
Rirelguvat vf sbegl 42.
A Challenge 
The Answer to Life, The Universe, and 
Everything is 42.
The Enigma Machine 
Simon Singh
All Hail Turing 
©National Portrait Gallery 
and the others at Bletchley Park
Kerckhoff’s Principle 
“A cryptosystem should be secure even if 
everything about the system, except the key, 
is public knowledge”
Symmetric Encryption
Background 
• The only kind of encryption until 1973 
• The same cryptographic key for both 
encryption of plaintext and decryption of 
ciphertext 
• This is a “shared secret”
Cyphers
Cyphers 
3-Way Anubis CIPHERUNICORN-A 
Cobra COCONUT98 Crab 
Cryptomeria CRYPTON DFC 
FEAL FROG ICE M6 MARS 
Mercy MESH Nimbus Threefish 
Treyfer UES Xenon Zodiac
Cyphers 
3-Way Anubis CIPHERUNICORN-A 
Camellia Cobra CAST-COCONUT98 128 IDEA 
Crab 
Cryptomeria CRYPTON DFC 
FEAL FROG ICE M6 MARS 
RC2 RC5 SEED 
Skipjack TEA XTEA 
Mercy MESH Nimbus Threefish 
Treyfer UES Xenon Zodiac
Cyphers 
Serpent AES 
3-Way Anubis CIPHERUNICORN-A 
Cobra COCONUT98 Crab 
Cryptomeria CRYPTON DFC 
FEAL FROG ICE M6 MARS 
Blowfish 
DES 3DES 
Camellia CAST-128 IDEA 
RC2 RC5 SEED 
Skipjack TEA XTEA 
Mercy MESH Nimbus Threefish 
Twofish 
Treyfer UES Xenon Zodiac
Cypher Types 
• Block Cyphers 
• Stream Cyphers
All Hail Claude Shannon 
• Godfather of: 
• Information Theory 
• Digital Computing & Digital Circuit 
Design 
• Cryptographic Confusion 
• Cryptographic Diffusion 
• "the enemy knows the system"
S-Boxes 
• A function which maps an m bit input to an 
n bit output 
• Fixed lookup table vs dynamic based on key 
• Example: 6x4 S-Box:
AES 
• Based on the Rijndael cypher 
• Block size: 128 bits 
• Key size: 
• 128 bit - 10 rounds 
• 192 bit - 12 rounds 
• 256 bit - 14 rounds 
• Block represented as a 4×4 column-major 
order matrix of bytes called the state
AES Recipe 
• BEGIN 
• Key Expansion 
• LOOP (round) 
• Key XOR 
• Substitute 
• Transpose 
• Mix 
• END 
• Key XOR 
• Substitute 
• Transpose 
• Key XOR
Key Expansion 
• Each round of processing uses a round key 
• Round keys are derived from the primary 
key 
• AES uses the Rijndael Key Schedule 
• Round Keys are the same size as the state
Key XOR 
• Bit-wise XOR the round key with the state
Substitute 
• Replace each byte in the state using an S-box 
• This process is reversible but non-linear 
• The S-box is a derangement
Transpose
Mix 
• Apply an invertible linear transform to each 
cell (4 bytes) 
• This does not change the cell size 
• Together with Transpose provides 
cryptographic diffusion
AES Recipe 
• BEGIN 
• Key Expansion 
• LOOP (round) 
• Key XOR 
• Substitute 
• Transpose 
• Mix 
• END 
• Key XOR 
• Substitute 
• Transpose 
• Key XOR
Weaknesses 
• Direct Attacks 
• “Biclique Cryptanalysis of the Full AES” 
Cracks AES-128 with computational complexity 2126.1 
• Side channel attacks 
• 2005 cache-timing attack (requires root access) 
• 2009 some hardware implementations found to be 
susceptible to differential fault analysis allowing key 
recovery with complexity 232 
• 2010 access-driven cache attack, “near realtime” key 
recovery (requires root access)
Asymmetric Encryption
Background 
• 1973 - James H. Ellis, Clifford Cocks, and 
Malcolm Williamson @GCHQ 
• 1974/78 - Merkle’s Puzzles 
• 1976 - Whitfield Diffie and Martin Hellman 
• 1977/78 - Ron Rivest, Adi Shamir and 
Leonard Adleman @MIT
RSA 
• Based on the Integer Factorisation Problem 
• Believed to be in NP and co-NP 
• => not NP-complete 
• Is a fundamental part of HTTPS/SSL
Key generation 
• Choose two prime number p and q 
• Compute n = pq 
• Compute F(n) = F(p)F(q) = (p - 1)/(q - 1) 
• Chose an integer e s.t. 
• 1 < e < F(n) 
• gcd(e, F(n)) = 1 
• Compute d = 1 / e(mod F(n)) 
• Public Key = (e, n) 
• Private Key = (e, d)
Encryption 
• Given a message M 
• Convert M to an integer m s.t. 0 < m < 1 
• If necessary use a padding scheme 
• Computer the cypher text c: 
c = me (mod n)
Decryption 
• Given a cyphertext c 
• Compute m = cd (mod n) 
• Remove padding if present 
• Convert m in to M
Issues 
• Picking the numbers is hard 
• If p or q are too small or too close to each 
other it greatly decreases the security 
• If p-1 or q-1 only has small prime factors n 
can be factored in polynomial time 
• Side-channel attacks 
• Timing 
• Differential fault analysis (power)
Java Cryptography
Cryptographic Libraries 
• JCA 
• java.security 
• javax.security deprcated 
• JCE Providers 
• Oracle JCE + policies 
• The Legion of the Bouncy Castle
Useful Utils 
• Jasypt 
• Keytool IUI 
• Spring Crypto Utils 
• JCE taglib
Practical Tips 
• KISS 
• Choose the appropriate algorithm for the 
situation 
• Cost / benefit analysis 
• Key size 
• Hybrid encryption systems 
• Good quality RNG seeds
<Future> Cryptography
Quantum Computers 
@The Pub Explanation
The Basics 
• Binary vectors |0> and |1> 
• Qubit |q> = x|0> + y|1> 
where x2 + y2 = 1 
• Qubits 
|q> = a|00> + b|01> + c|11> + d|10>
Quantum Operations 
• An operation on n qubits can be 
represented by an nxn matrix 
• Also represented by quantum circuits 
• Always Reversible...
Measuring 
• Given |q> = -0.2|0> + 0.8|1> 
• Then the result of measuring q is: 
• 0 with probability 0.2 
• 1 with probability 0.8 
|q> = -0.1|00> + 0.4|01> + 0.4|11> + 0.1|10> 
|q> = -0.2|0> + 0.8|1> 
• Irreversible
Entanglement 
• Only a quantum effect 
• An entangled quantum system allows a higher 
correlation of states than classically possible 
• Given a qubit system in equal superposition 
Measuring the first qubit allows us to determine 
the state of the second without measuring
Grover’s Algorithm 
• Lov Grover 1996 
• Given some function f and an value y find x 
such that f(x) = y 
• O(N1/2) time complexity 
• O(log N) space complexity
Shor’s Algorithm 
Don’t leave this blank!
Shor’s Algorithm 
• Peter Shor 1994 
• Calculates the factors of a given integer 
• O((log N)3) 
• Belongs to BQP
Good News 
• The largest integer factored: 143 
• Largest quantum computer: 84 qubits
Quantum 
Cryptography
Post-Quantum 
Cryptography
Lattice-Based Cryptography 
• A lattice L in Rn is a discrete subgroup of 
Rn which spans the real vector space Rn 
• Each lattice has a set of bases 
• A basis is a set of vectors such that any 
vector is the lattice is a linear combination 
of the basis vectors 
• Can be viewed as a regular tiling of a space 
by a primitive cell
Graphical Representation 
Basis = { 
[0.5, 0], 
[0, 1] 
}
Shortest Vector Problem 
Given a lattice L in Rn find the shortest non-zero 
vector in L
Closest Vector Problem 
Given a lattice L in Rn and a vector v not in 
L, find the closest vector in L to v
NP-Hard 
• Non-deterministic polynomial time hard 
• For all problems in NP, any NP-hard 
problem is at least as hard as the hardest 
problem in NP 
• SVP & CVP are thought to be NP-hard 
• If we find a polynomial time algorithm for 
any NP-hard problem then P = NP!
Other Approaches 
• Multivariate Cryptography 
• Secure Hash Signatures 
• Lamport signatures 
• Merkle scheme 
• McEliece and Niedenrreiter Algorithms 
based on EEC
Summary 
• Modern cryptography really started ~1937 
• Symmetric cyhpers 
• Asymmetric cyphers 
• Non-classical cryptography 
• Post-quantum cryptography
Thank You

Más contenido relacionado

La actualidad más candente

Cryptography and Network Security
Cryptography and Network SecurityCryptography and Network Security
Cryptography and Network SecurityPa Van Tanku
 
Information Security Cryptography ( L02- Types Cryptography)
Information Security Cryptography ( L02- Types Cryptography)Information Security Cryptography ( L02- Types Cryptography)
Information Security Cryptography ( L02- Types Cryptography)Anas Rock
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.pptUday Meena
 
Message authentication
Message authenticationMessage authentication
Message authenticationCAS
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
 
Block Cipher and its Design Principles
Block Cipher and its Design PrinciplesBlock Cipher and its Design Principles
Block Cipher and its Design PrinciplesSHUBHA CHATURVEDI
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & SteganographyAnimesh Shaw
 
Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security Dr. Kapil Gupta
 
El Gamal Cryptosystem
El Gamal CryptosystemEl Gamal Cryptosystem
El Gamal CryptosystemAdri Jovin
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network securitypatisa
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 
Double DES & Triple DES
Double DES & Triple DESDouble DES & Triple DES
Double DES & Triple DESHemant Sharma
 

La actualidad más candente (20)

Transposition Cipher
Transposition CipherTransposition Cipher
Transposition Cipher
 
Cryptography and Network Security
Cryptography and Network SecurityCryptography and Network Security
Cryptography and Network Security
 
Information Security Cryptography ( L02- Types Cryptography)
Information Security Cryptography ( L02- Types Cryptography)Information Security Cryptography ( L02- Types Cryptography)
Information Security Cryptography ( L02- Types Cryptography)
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Message authentication
Message authenticationMessage authentication
Message authentication
 
Cryptography - 101
Cryptography - 101Cryptography - 101
Cryptography - 101
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 
Encryption algorithms
Encryption algorithmsEncryption algorithms
Encryption algorithms
 
Cryptography
CryptographyCryptography
Cryptography
 
Block Cipher and its Design Principles
Block Cipher and its Design PrinciplesBlock Cipher and its Design Principles
Block Cipher and its Design Principles
 
Cryptography & Steganography
Cryptography & SteganographyCryptography & Steganography
Cryptography & Steganography
 
Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security
 
Cryptography
CryptographyCryptography
Cryptography
 
El Gamal Cryptosystem
El Gamal CryptosystemEl Gamal Cryptosystem
El Gamal Cryptosystem
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Electronic mail security
Electronic mail securityElectronic mail security
Electronic mail security
 
Cryptography and network security
Cryptography and network securityCryptography and network security
Cryptography and network security
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 
Cryptography
CryptographyCryptography
Cryptography
 
Double DES & Triple DES
Double DES & Triple DESDouble DES & Triple DES
Double DES & Triple DES
 

Destacado

A study of cryptography for satellite applications
A study of cryptography for satellite applicationsA study of cryptography for satellite applications
A study of cryptography for satellite applicationsRajesh Ishida
 
Post quantum cryptography
Post quantum cryptographyPost quantum cryptography
Post quantum cryptographyMartins Okoi
 
Lattice Cryptography
Lattice CryptographyLattice Cryptography
Lattice CryptographyPriyanka Aash
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystemSamdish Arora
 
ECC vs RSA: Battle of the Crypto-Ninjas
ECC vs RSA: Battle of the Crypto-NinjasECC vs RSA: Battle of the Crypto-Ninjas
ECC vs RSA: Battle of the Crypto-NinjasJames McGivern
 
Apprenticeship artifact
Apprenticeship  artifactApprenticeship  artifact
Apprenticeship artifactShooter24
 
Data Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill CipherData Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill CipherAashirwad Kashyap
 
Cryptography by Epul
Cryptography by EpulCryptography by Epul
Cryptography by EpulAgate Studio
 
Rsa algorithm key generation
Rsa algorithm key generation Rsa algorithm key generation
Rsa algorithm key generation swarnapatil
 
Message digest & digital signature
Message digest & digital signatureMessage digest & digital signature
Message digest & digital signatureDinesh Kodam
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 

Destacado (20)

A study of cryptography for satellite applications
A study of cryptography for satellite applicationsA study of cryptography for satellite applications
A study of cryptography for satellite applications
 
Post quantum cryptography
Post quantum cryptographyPost quantum cryptography
Post quantum cryptography
 
CrypTool: Cryptography for the masses
CrypTool: Cryptography for the massesCrypTool: Cryptography for the masses
CrypTool: Cryptography for the masses
 
Lattice Cryptography
Lattice CryptographyLattice Cryptography
Lattice Cryptography
 
Ch31
Ch31Ch31
Ch31
 
Cryptography
Cryptography Cryptography
Cryptography
 
Cryptography using rsa cryptosystem
Cryptography using rsa cryptosystemCryptography using rsa cryptosystem
Cryptography using rsa cryptosystem
 
ECC vs RSA: Battle of the Crypto-Ninjas
ECC vs RSA: Battle of the Crypto-NinjasECC vs RSA: Battle of the Crypto-Ninjas
ECC vs RSA: Battle of the Crypto-Ninjas
 
Apprenticeship artifact
Apprenticeship  artifactApprenticeship  artifact
Apprenticeship artifact
 
Data Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill CipherData Encryption and Decryption using Hill Cipher
Data Encryption and Decryption using Hill Cipher
 
Cryptography by Epul
Cryptography by EpulCryptography by Epul
Cryptography by Epul
 
Rsa algorithm key generation
Rsa algorithm key generation Rsa algorithm key generation
Rsa algorithm key generation
 
Cryptography
Cryptography Cryptography
Cryptography
 
Message digest & digital signature
Message digest & digital signatureMessage digest & digital signature
Message digest & digital signature
 
Forouzan isdn
Forouzan isdnForouzan isdn
Forouzan isdn
 
PSTN
PSTNPSTN
PSTN
 
Basic ISDN
Basic ISDNBasic ISDN
Basic ISDN
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
 
ISDN & DSL
ISDN & DSLISDN & DSL
ISDN & DSL
 
Diffiehellman
DiffiehellmanDiffiehellman
Diffiehellman
 

Similar a Modern Cryptography

Oxford 05-oct-2012
Oxford 05-oct-2012Oxford 05-oct-2012
Oxford 05-oct-2012Ted Dunning
 
Fast Single-pass K-means Clusterting at Oxford
Fast Single-pass K-means Clusterting at Oxford Fast Single-pass K-means Clusterting at Oxford
Fast Single-pass K-means Clusterting at Oxford MapR Technologies
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers Sam Bowne
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic EncryptionGöktuğ Serez
 
Emily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum CryptographyEmily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum CryptographyCSNP
 
Quantum cryptography by Girisha Shankar, Sr. Manager, Cisco
Quantum cryptography by Girisha Shankar, Sr. Manager, CiscoQuantum cryptography by Girisha Shankar, Sr. Manager, Cisco
Quantum cryptography by Girisha Shankar, Sr. Manager, CiscoVishnu Pendyala
 
Cybersecurity cyberlab3
Cybersecurity cyberlab3Cybersecurity cyberlab3
Cybersecurity cyberlab3rayborg
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniquesbabak danyal
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Securitybabak danyal
 
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23Aritra Sarkar
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersSam Bowne
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxRobertCarreonBula
 

Similar a Modern Cryptography (20)

Cryptography-101
Cryptography-101Cryptography-101
Cryptography-101
 
Cryptography.ppt
Cryptography.pptCryptography.ppt
Cryptography.ppt
 
Oxford 05-oct-2012
Oxford 05-oct-2012Oxford 05-oct-2012
Oxford 05-oct-2012
 
Fast Single-pass K-means Clusterting at Oxford
Fast Single-pass K-means Clusterting at Oxford Fast Single-pass K-means Clusterting at Oxford
Fast Single-pass K-means Clusterting at Oxford
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
4. Block Ciphers
4. Block Ciphers 4. Block Ciphers
4. Block Ciphers
 
Homomorphic Encryption
Homomorphic EncryptionHomomorphic Encryption
Homomorphic Encryption
 
Clustering - ACM 2013 02-25
Clustering - ACM 2013 02-25Clustering - ACM 2013 02-25
Clustering - ACM 2013 02-25
 
Emily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum CryptographyEmily Stamm - Post-Quantum Cryptography
Emily Stamm - Post-Quantum Cryptography
 
Quantum cryptography by Girisha Shankar, Sr. Manager, Cisco
Quantum cryptography by Girisha Shankar, Sr. Manager, CiscoQuantum cryptography by Girisha Shankar, Sr. Manager, Cisco
Quantum cryptography by Girisha Shankar, Sr. Manager, Cisco
 
Class3
Class3Class3
Class3
 
Cybersecurity cyberlab3
Cybersecurity cyberlab3Cybersecurity cyberlab3
Cybersecurity cyberlab3
 
Cns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption TechniquesCns 13f-lec03- Classical Encryption Techniques
Cns 13f-lec03- Classical Encryption Techniques
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
HiPEAC'19 Tutorial on Quantum algorithms using QX - 2019-01-23
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
Cryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptxCryptography and steganography lesson and discription.pptx
Cryptography and steganography lesson and discription.pptx
 
module 1 (part A).pdf
module 1 (part A).pdfmodule 1 (part A).pdf
module 1 (part A).pdf
 

Último

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Modern Cryptography

  • 1. Modern Cryptography for Java Developers James McGivern
  • 2. About This Talk • Not a treaty in mathematical theory • Rapid fire - please save questions until the end • Looking under the hood • Look at two popular algorithms • Hot cryptographic research
  • 3. Definitions • Cryptography • Plaintext • Cyphertext • Code • Cypher vs Cipher • Encryption / Decryption • Key
  • 4. “Secure Hashes” • A hash function takes an arbitrary length input and returns a fixed sized bit string • Cryptographic hash function obey 3 properties: • Given a hash h it should be hard to find a message m s.t. h = hash(m) • Given an input m1 it should be hard to find an m2 s.t. m1 != m2 and hash(m1) = hash(m2) • Should be hash collision resistant • MD5, SHA-1, SHA-3, RIPEMD-xxx
  • 6. A Challenge Gur Nafjre gb Yvsr, Gur Havirefr, naq Rirelguvat vf sbegl 42.
  • 7. A Challenge The Answer to Life, The Universe, and Everything is 42.
  • 8. The Enigma Machine Simon Singh
  • 9. All Hail Turing ©National Portrait Gallery and the others at Bletchley Park
  • 10. Kerckhoff’s Principle “A cryptosystem should be secure even if everything about the system, except the key, is public knowledge”
  • 12. Background • The only kind of encryption until 1973 • The same cryptographic key for both encryption of plaintext and decryption of ciphertext • This is a “shared secret”
  • 14. Cyphers 3-Way Anubis CIPHERUNICORN-A Cobra COCONUT98 Crab Cryptomeria CRYPTON DFC FEAL FROG ICE M6 MARS Mercy MESH Nimbus Threefish Treyfer UES Xenon Zodiac
  • 15. Cyphers 3-Way Anubis CIPHERUNICORN-A Camellia Cobra CAST-COCONUT98 128 IDEA Crab Cryptomeria CRYPTON DFC FEAL FROG ICE M6 MARS RC2 RC5 SEED Skipjack TEA XTEA Mercy MESH Nimbus Threefish Treyfer UES Xenon Zodiac
  • 16. Cyphers Serpent AES 3-Way Anubis CIPHERUNICORN-A Cobra COCONUT98 Crab Cryptomeria CRYPTON DFC FEAL FROG ICE M6 MARS Blowfish DES 3DES Camellia CAST-128 IDEA RC2 RC5 SEED Skipjack TEA XTEA Mercy MESH Nimbus Threefish Twofish Treyfer UES Xenon Zodiac
  • 17. Cypher Types • Block Cyphers • Stream Cyphers
  • 18. All Hail Claude Shannon • Godfather of: • Information Theory • Digital Computing & Digital Circuit Design • Cryptographic Confusion • Cryptographic Diffusion • "the enemy knows the system"
  • 19. S-Boxes • A function which maps an m bit input to an n bit output • Fixed lookup table vs dynamic based on key • Example: 6x4 S-Box:
  • 20. AES • Based on the Rijndael cypher • Block size: 128 bits • Key size: • 128 bit - 10 rounds • 192 bit - 12 rounds • 256 bit - 14 rounds • Block represented as a 4×4 column-major order matrix of bytes called the state
  • 21. AES Recipe • BEGIN • Key Expansion • LOOP (round) • Key XOR • Substitute • Transpose • Mix • END • Key XOR • Substitute • Transpose • Key XOR
  • 22. Key Expansion • Each round of processing uses a round key • Round keys are derived from the primary key • AES uses the Rijndael Key Schedule • Round Keys are the same size as the state
  • 23. Key XOR • Bit-wise XOR the round key with the state
  • 24. Substitute • Replace each byte in the state using an S-box • This process is reversible but non-linear • The S-box is a derangement
  • 26. Mix • Apply an invertible linear transform to each cell (4 bytes) • This does not change the cell size • Together with Transpose provides cryptographic diffusion
  • 27. AES Recipe • BEGIN • Key Expansion • LOOP (round) • Key XOR • Substitute • Transpose • Mix • END • Key XOR • Substitute • Transpose • Key XOR
  • 28. Weaknesses • Direct Attacks • “Biclique Cryptanalysis of the Full AES” Cracks AES-128 with computational complexity 2126.1 • Side channel attacks • 2005 cache-timing attack (requires root access) • 2009 some hardware implementations found to be susceptible to differential fault analysis allowing key recovery with complexity 232 • 2010 access-driven cache attack, “near realtime” key recovery (requires root access)
  • 30. Background • 1973 - James H. Ellis, Clifford Cocks, and Malcolm Williamson @GCHQ • 1974/78 - Merkle’s Puzzles • 1976 - Whitfield Diffie and Martin Hellman • 1977/78 - Ron Rivest, Adi Shamir and Leonard Adleman @MIT
  • 31. RSA • Based on the Integer Factorisation Problem • Believed to be in NP and co-NP • => not NP-complete • Is a fundamental part of HTTPS/SSL
  • 32. Key generation • Choose two prime number p and q • Compute n = pq • Compute F(n) = F(p)F(q) = (p - 1)/(q - 1) • Chose an integer e s.t. • 1 < e < F(n) • gcd(e, F(n)) = 1 • Compute d = 1 / e(mod F(n)) • Public Key = (e, n) • Private Key = (e, d)
  • 33. Encryption • Given a message M • Convert M to an integer m s.t. 0 < m < 1 • If necessary use a padding scheme • Computer the cypher text c: c = me (mod n)
  • 34. Decryption • Given a cyphertext c • Compute m = cd (mod n) • Remove padding if present • Convert m in to M
  • 35. Issues • Picking the numbers is hard • If p or q are too small or too close to each other it greatly decreases the security • If p-1 or q-1 only has small prime factors n can be factored in polynomial time • Side-channel attacks • Timing • Differential fault analysis (power)
  • 37. Cryptographic Libraries • JCA • java.security • javax.security deprcated • JCE Providers • Oracle JCE + policies • The Legion of the Bouncy Castle
  • 38. Useful Utils • Jasypt • Keytool IUI • Spring Crypto Utils • JCE taglib
  • 39. Practical Tips • KISS • Choose the appropriate algorithm for the situation • Cost / benefit analysis • Key size • Hybrid encryption systems • Good quality RNG seeds
  • 41. Quantum Computers @The Pub Explanation
  • 42. The Basics • Binary vectors |0> and |1> • Qubit |q> = x|0> + y|1> where x2 + y2 = 1 • Qubits |q> = a|00> + b|01> + c|11> + d|10>
  • 43. Quantum Operations • An operation on n qubits can be represented by an nxn matrix • Also represented by quantum circuits • Always Reversible...
  • 44. Measuring • Given |q> = -0.2|0> + 0.8|1> • Then the result of measuring q is: • 0 with probability 0.2 • 1 with probability 0.8 |q> = -0.1|00> + 0.4|01> + 0.4|11> + 0.1|10> |q> = -0.2|0> + 0.8|1> • Irreversible
  • 45. Entanglement • Only a quantum effect • An entangled quantum system allows a higher correlation of states than classically possible • Given a qubit system in equal superposition Measuring the first qubit allows us to determine the state of the second without measuring
  • 46. Grover’s Algorithm • Lov Grover 1996 • Given some function f and an value y find x such that f(x) = y • O(N1/2) time complexity • O(log N) space complexity
  • 47. Shor’s Algorithm Don’t leave this blank!
  • 48. Shor’s Algorithm • Peter Shor 1994 • Calculates the factors of a given integer • O((log N)3) • Belongs to BQP
  • 49. Good News • The largest integer factored: 143 • Largest quantum computer: 84 qubits
  • 52. Lattice-Based Cryptography • A lattice L in Rn is a discrete subgroup of Rn which spans the real vector space Rn • Each lattice has a set of bases • A basis is a set of vectors such that any vector is the lattice is a linear combination of the basis vectors • Can be viewed as a regular tiling of a space by a primitive cell
  • 53. Graphical Representation Basis = { [0.5, 0], [0, 1] }
  • 54. Shortest Vector Problem Given a lattice L in Rn find the shortest non-zero vector in L
  • 55. Closest Vector Problem Given a lattice L in Rn and a vector v not in L, find the closest vector in L to v
  • 56. NP-Hard • Non-deterministic polynomial time hard • For all problems in NP, any NP-hard problem is at least as hard as the hardest problem in NP • SVP & CVP are thought to be NP-hard • If we find a polynomial time algorithm for any NP-hard problem then P = NP!
  • 57. Other Approaches • Multivariate Cryptography • Secure Hash Signatures • Lamport signatures • Merkle scheme • McEliece and Niedenrreiter Algorithms based on EEC
  • 58. Summary • Modern cryptography really started ~1937 • Symmetric cyhpers • Asymmetric cyphers • Non-classical cryptography • Post-quantum cryptography