SlideShare a Scribd company logo
1 of 59
Download to read offline
The University of Texas at Dallas
Introduction to
Cryptography
Jeremiah Shipman
Kyle Tillotson
Raman
Outline
❖ Classical Ciphers
❖ Hash Functions
❖ Modern Cryptography
❖ Symmetric
❖ Asymmetric
❖ Hands-On
Cryptography
❖ Cryptography is the process of writing or reading secret
messages or codes. – Merriam Webster
❖ Midway story
Basic Terminology
❖ Plaintext/Message - the original message to encrypt.
❖ Ciphertext - an encrypted message.
❖ Cipher - an algorithm to convert plaintext to cipher text
and vice/versa.
❖ Key - a word/phrase or string of bits that modifies the
enciphering/deciphering process
Caesar Cipher
❖ Shift/Caesar Cipher - rotate each
letter of the plaintext by a fixed
amount
❖ Example:
❖ Plaintext - SEND HELP
❖ Key - rotate up by 13
❖ Ciphertext - FRAQ URYC
Caesar Cipher
❖ Shift/Caesar Cipher - rotate each
letter of the plaintext by a fixed
amount
❖ Example:
❖ Plaintext - SEND HELP
❖ Key - rotate up by 13
❖ Ciphertext - FRAQ URYC
Caesar Cipher
❖ Shift/Caesar Cipher - rotate each
letter of the plaintext by a fixed
amount
❖ Example:
❖ Plaintext - SEND HELP
❖ Key - rotate up by 13
❖ Ciphertext - FRAQ URYC
Caesar Cipher
❖ Shift/Caesar Cipher - rotate each
letter of the plaintext by a fixed
amount
❖ Example:
❖ Plaintext - SEND HELP
❖ Key - rotate up by 13
❖ Ciphertext - FRAQ URYC
Caesar Cipher
❖ Shift/Caesar Cipher - rotate each
letter of the plaintext by a fixed
amount
❖ Example:
❖ Plaintext - SEND HELP
❖ Key - rotate up by 13
❖ Ciphertext - FRAQ URYC
Substitution Cipher
❖ Create a mapping of the alphabet:
Substitution Cipher
❖ Create a mapping of the alphabet:
Substitution Cipher
❖ Create a mapping of the alphabet:
Substitution Cipher
❖ Create a mapping of the alphabet:
Substitution Cipher
❖ Create a mapping of the alphabet:
Substitution Cipher
❖ Create a mapping of the alphabet:
Substitution Cipher
❖ Create a mapping of the alphabet:
Substitution Cipher
❖ Substitute each letter of the plaintext.
❖ Example:
❖ Plaintext - send reinforcements
❖ Key - knowledge of the mapping of the alphabet
❖ Ciphertext - ktdp jtfdoejytbtdlk
Substitution Cipher
❖ Substitute each letter of the plaintext.
❖ Example:
❖ Plaintext - send reinforcements
❖ Key - knowledge of the mapping of the alphabet
❖ Ciphertext - ktdp jtfdoejytbtdlk
Substitution Cipher
❖ Substitute each letter of the plaintext.
❖ Example:
❖ Plaintext - send reinforcements
❖ Key - knowledge of the mapping of the alphabet
❖ Ciphertext - ktdp jtfdoejytbtdlk
Substitution Cipher
❖ Substitute each letter of the plaintext.
❖ Example:
❖ Plaintext - send reinforcements
❖ Key - knowledge of the mapping of the alphabet
❖ Ciphertext - ktdp jtfdoejytbtdlk
Substitution Cipher
❖ Substitute each letter of the plaintext.
❖ Example:
❖ Plaintext - send reinforcements
❖ Key - knowledge of the mapping of the alphabet
❖ Ciphertext - ktdp jtfdoejytbtdlk
Frequency Analysis
Vigenere Cipher
❖ Extend the key to be the length of the
plaintext.
❖ Plaintext P=P1P2P3.. Ciphertext C=C1C2C3..
❖ Encryption: Ci = (Pi + ki) mod 26
❖ Decryption: Pi = (Ci - ki) mod 26
Vigenere Cipher
❖ To encrypt:
❖ Extend the key to be the length of the plaintext.
❖ Use the Vigenere Table to get the ciphertext.
❖ Example:
❖ Plaintext: NINE ONE ONE AND ONE ONE TWO
❖ Key: FOUR FOU RFO URF OUR FOU RFO
❖ Ciphertext: SWHV TBY FSS UEI CHV TBY KBC
Vigenere Cipher
Vigenere Cipher
❖ To encrypt:
❖ Extend the key to be the length of the plaintext.
❖ Use the Vigenere Table to get the ciphertext.
❖ Example:
❖ Plaintext: NINE ONE ONE AND ONE ONE TWO
❖ Key: FOUR FOU RFO URF OUR FOU RFO
❖ Ciphertext: SWHV TBY FSS UEI CHV TBY KBC
Vigenere Cipher
Vigenere Cipher
❖ To encrypt:
❖ Extend the key to be the length of the plaintext.
❖ Use the Vigenere Table to get the ciphertext.
❖ Example:
❖ Plaintext: NINE ONE ONE AND ONE ONE TWO
❖ Key: FOUR FOU RFO URF OUR FOU RFO
❖ Ciphertext: SWHV TBY FSS UEI CHV TBY KBC
Vigenere Cipher
Vigenere Cipher
❖ To encrypt:
❖ Extend the key to be the length of the plaintext.
❖ Use the Vigenere Table to get the ciphertext.
❖ Example:
❖ Plaintext: NINE ONE ONE AND ONE ONE TWO
❖ Key: FOUR FOU RFO URF OUR FOU RFO
❖ Ciphertext: SWHV TBY FSS UEI CHV TBY KBC
Vigenere Cipher
Vigenere Cipher
Vigenere Cipher
❖ To break:
❖ Look for group(s) of three characters that regularly repeat.
❖ Find a common factor for the distance(s) between repeating groups.
❖ Do frequency analysis of subsets of the characters.
Transposition Ciphers
❖ Transposition Cipher - a cipher that shifts the original
position of each plaintext character. The ciphertext is a
permutation of the plaintext.
❖ Rail Fence Cipher
❖ Route Cipher
Rail Fence Cipher
❖ Plaintext is written downwards on “rails” of an imaginary
fence, then written upwards when the bottom is
reached.
❖ Plaintext: We are discovered. Flee at once.
❖ Ciphertext: WECRLTEERDSOEEFEAOCAIVDEN
Route Cipher
❖ The plaintext is written on a grid of given dimensions
and padded with low-frequency characters.
❖ The key is how you make the ciphertext: “Spiral counter-
clockwise, starting from the top right.”
❖ Ciphertext: EOEFROIRWEADCEDETCXJNALEVSE
Route Cipher
❖ The plaintext is written on a grid of given dimensions
and padded with low-frequency characters.
❖ The key is how you make the ciphertext: “Spiral counter-
clockwise, starting from the top right.”
❖ Ciphertext: EOEFROIRWEADCEDETCXJNALEVSE
Route Cipher
❖ The plaintext is written on a grid of given dimensions
and padded with low-frequency characters.
❖ The key is how you make the ciphertext: “Spiral counter-
clockwise, starting from the top right.”
❖ Ciphertext: EOEFROIRWEADCEDETCXJNALEVSE
Hash Functions
❖ Used for integrity, signatures, and password storage.
❖ Given a bit string of any length, produces a bit string of
length n.
❖ Properties of a good hash function:
❖ It is impossible to reverse.
❖ It gives a fixed-sized output.
❖ Changing one bit of the message changes the hash completely.
❖ Hard to find collisions.
Hash Functions
❖ md5
❖ extremely vulnerable to collisions
❖ vulnerable to rainbow tables
❖ fast (bad)
❖ sha1
❖ less vulnerable to collisions, but still vulnerable
❖ also vulnerable to rainbow tables
Hash Functions
❖ Password Storage - need slow hashing algorithm
❖ bcrypt, PBKDF2
❖ bcrypt - 156 guesses per second (from security.stackexchange)
❖ md5 - over 1 billion guesses per second (from security.stackexchange)
Encodings
❖ Simple encodings of text
❖ ASCII - hello
❖ Binary - 01101000 01100101 01101100 01101100
01101111
❖ Hex - x68x65x6cx6cx6f
❖ Base64 - aGVsbG8=
ASCII
Base64
❖ Used to safely encode ASCII characters such as 10 and
13 (return and newline characters)
❖ Uses character set {A..Z, a..z, 1-9, +, /} and = for
padding
❖ 26 = 64
❖ To encode, ASCII is converted to hex, and every 6 bits
of hex is converted to its Base64 character
Base64
Base64
XOR
❖ XOR = exclusive-OR
❖ A xor B = C <=> B xor C = A
❖ Plaintext xor Key = Ciphertext <=>
Ciphertext xor Key = Plaintext <=>
Plaintext xor Ciphertext = Key
One-Time Pad
❖ Used with a random secret key.
❖ Both parties must have the key.
❖ The key must be the same length as the plaintext.
❖ Used by the NSA and KGB.
One-Time Pad
One-Time Pad
One-Time Pad Complications
❖ The key must be completely random.
❖ The key must be known by both parties.
❖ The key can only be used once, so if you want to send a
message to n people, you will need n keys.
❖ The key must be kept secret.
Modern Ciphers
❖ Symmetric Key Encryption
❖ Uses the same key to encrypt and decrypt
❖ Alice and Bob share the same key.
❖ Asymmetric Key Encryption
❖ Uses two keys: one to encrypt and one to decrypt.
❖ Alice has a public key and a private key.
❖ Bob has a public key and a private key.
Symmetric Key Encryption
❖ Share a secret key among two or more parties
❖ DES (Data Encryption Standard)
❖ Uses a 56-bit key
❖ Standard from 1979 to 1990s
❖ AES (Advanced Encryption Standard)
❖ Uses 128, 192, or 256-bit key
❖ Standardized in 2001
Asymmetric Key Encryption
❖ Asymmetric Public Key Cryptography
❖ Used today to encrypt or sign messages
❖ Uses a private key and a public key
RSA Algorithm
❖ Relies on the complexity of factoring large numbers
❖ Take two primes, p, q, and find N = pq.
❖ Find Phi(N) = (p-1)(q-1).
❖ Choose e such that 1 < e < Phi(N) and e and N share no common
factors.
❖ Find d such that (de) mod Phi(N) = 1.
❖ Public Key is (e, N).
❖ Private Key is (d, N).
RSA Encryption
❖ To encrypt, convert message M into hex/binary and
calculate C = Me mod N, where C is the ciphertext.
❖ To decrypt C: M = Cd mod N.
❖ Difficulty to crack depends on the key length.
Uses of RSA
❖ Encrypt email with the receiver’s public key
❖ Sign email by encrypting with the sender’s private key
❖ Bloat NSA servers
❖ Dependent upon the infeasibility of factor large
numbers.
❖ Make sure you keep your private key a secret.
Classic Cryptography

More Related Content

Similar to Classic Cryptography

CryptX '22 W1 Release (1).pptx
CryptX '22 W1 Release (1).pptxCryptX '22 W1 Release (1).pptx
CryptX '22 W1 Release (1).pptxBhavikaGianey
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherMona Rajput
 
Cryptography - Overview
Cryptography - OverviewCryptography - Overview
Cryptography - OverviewMohammed Adam
 
basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryptionRashmi Burugupalli
 
Elementary cryptography
Elementary cryptographyElementary cryptography
Elementary cryptographyG Prachi
 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher SystemAsad Ali
 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques Dr. Kapil Gupta
 
Substitution cipher and Its Cryptanalysis
Substitution cipher and Its CryptanalysisSubstitution cipher and Its Cryptanalysis
Substitution cipher and Its CryptanalysisSunil Meena
 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.pptutsavkakkad1
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2AfiqEfendy Zaen
 
Symmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptographySymmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptographyMONIRUL ISLAM
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniquesDr.Florence Dayana
 

Similar to Classic Cryptography (20)

CryptX '22 W1 Release (1).pptx
CryptX '22 W1 Release (1).pptxCryptX '22 W1 Release (1).pptx
CryptX '22 W1 Release (1).pptx
 
UNIT 2.ppt
UNIT 2.pptUNIT 2.ppt
UNIT 2.ppt
 
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere CipherCaesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
Caesar Cipher , Substitution Cipher, PlayFair and Vigenere Cipher
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
Cryptography - Overview
Cryptography - OverviewCryptography - Overview
Cryptography - Overview
 
basic encryption and decryption
 basic encryption and decryption basic encryption and decryption
basic encryption and decryption
 
Elementary cryptography
Elementary cryptographyElementary cryptography
Elementary cryptography
 
History of Cipher System
History of Cipher SystemHistory of Cipher System
History of Cipher System
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
 
ch02.ppt
ch02.pptch02.ppt
ch02.ppt
 
Symmetric Encryption Techniques
Symmetric Encryption Techniques Symmetric Encryption Techniques
Symmetric Encryption Techniques
 
Substitution cipher and Its Cryptanalysis
Substitution cipher and Its CryptanalysisSubstitution cipher and Its Cryptanalysis
Substitution cipher and Its Cryptanalysis
 
Ch02
Ch02Ch02
Ch02
 
Ch02
Ch02Ch02
Ch02
 
cryptography.ppt
cryptography.pptcryptography.ppt
cryptography.ppt
 
classicalencryptiontechniques.ppt
classicalencryptiontechniques.pptclassicalencryptiontechniques.ppt
classicalencryptiontechniques.ppt
 
Cryptography and Network security # Lecture 4
Cryptography and Network security # Lecture 4Cryptography and Network security # Lecture 4
Cryptography and Network security # Lecture 4
 
Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2Basic Encryption Decryption Chapter 2
Basic Encryption Decryption Chapter 2
 
Symmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptographySymmetric and asymmetric key cryptography
Symmetric and asymmetric key cryptography
 
Classical encryption techniques
Classical encryption techniquesClassical encryption techniques
Classical encryption techniques
 

More from UTD Computer Security Group

UTD Computer Security Group - Cracking the domain
UTD Computer Security Group - Cracking the domainUTD Computer Security Group - Cracking the domain
UTD Computer Security Group - Cracking the domainUTD Computer Security Group
 

More from UTD Computer Security Group (20)

Py jail talk
Py jail talkPy jail talk
Py jail talk
 
22S kickoff 2.0 (kickoff + anonymity talk)
22S kickoff 2.0 (kickoff + anonymity talk)22S kickoff 2.0 (kickoff + anonymity talk)
22S kickoff 2.0 (kickoff + anonymity talk)
 
Cloud talk
Cloud talkCloud talk
Cloud talk
 
UTD Computer Security Group - Cracking the domain
UTD Computer Security Group - Cracking the domainUTD Computer Security Group - Cracking the domain
UTD Computer Security Group - Cracking the domain
 
Forensics audio and video
Forensics   audio and videoForensics   audio and video
Forensics audio and video
 
Computer networks and network security
Computer networks and network securityComputer networks and network security
Computer networks and network security
 
Intro to python
Intro to pythonIntro to python
Intro to python
 
Powershell crash course
Powershell crash coursePowershell crash course
Powershell crash course
 
Intro to cybersecurity
Intro to cybersecurityIntro to cybersecurity
Intro to cybersecurity
 
Intro to Bash
Intro to BashIntro to Bash
Intro to Bash
 
Web Exploitation
Web ExploitationWeb Exploitation
Web Exploitation
 
Network Exploitation
Network ExploitationNetwork Exploitation
Network Exploitation
 
Penetration Testing: Celestial
Penetration Testing: CelestialPenetration Testing: Celestial
Penetration Testing: Celestial
 
Introduction to Exploitation
Introduction to ExploitationIntroduction to Exploitation
Introduction to Exploitation
 
Cryptography Crash Course
Cryptography Crash CourseCryptography Crash Course
Cryptography Crash Course
 
Fuzzing - Part 2
Fuzzing - Part 2Fuzzing - Part 2
Fuzzing - Part 2
 
Exploitation Crash Course
Exploitation Crash CourseExploitation Crash Course
Exploitation Crash Course
 
Fuzzing - Part 1
Fuzzing - Part 1Fuzzing - Part 1
Fuzzing - Part 1
 
Protostar VM - Heap3
Protostar VM - Heap3Protostar VM - Heap3
Protostar VM - Heap3
 
Heap Base Exploitation
Heap Base ExploitationHeap Base Exploitation
Heap Base Exploitation
 

Recently uploaded

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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
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
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
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
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Classic Cryptography

  • 1.
  • 2. The University of Texas at Dallas Introduction to Cryptography Jeremiah Shipman Kyle Tillotson Raman
  • 3. Outline ❖ Classical Ciphers ❖ Hash Functions ❖ Modern Cryptography ❖ Symmetric ❖ Asymmetric ❖ Hands-On
  • 4. Cryptography ❖ Cryptography is the process of writing or reading secret messages or codes. – Merriam Webster ❖ Midway story
  • 5. Basic Terminology ❖ Plaintext/Message - the original message to encrypt. ❖ Ciphertext - an encrypted message. ❖ Cipher - an algorithm to convert plaintext to cipher text and vice/versa. ❖ Key - a word/phrase or string of bits that modifies the enciphering/deciphering process
  • 6. Caesar Cipher ❖ Shift/Caesar Cipher - rotate each letter of the plaintext by a fixed amount ❖ Example: ❖ Plaintext - SEND HELP ❖ Key - rotate up by 13 ❖ Ciphertext - FRAQ URYC
  • 7. Caesar Cipher ❖ Shift/Caesar Cipher - rotate each letter of the plaintext by a fixed amount ❖ Example: ❖ Plaintext - SEND HELP ❖ Key - rotate up by 13 ❖ Ciphertext - FRAQ URYC
  • 8. Caesar Cipher ❖ Shift/Caesar Cipher - rotate each letter of the plaintext by a fixed amount ❖ Example: ❖ Plaintext - SEND HELP ❖ Key - rotate up by 13 ❖ Ciphertext - FRAQ URYC
  • 9. Caesar Cipher ❖ Shift/Caesar Cipher - rotate each letter of the plaintext by a fixed amount ❖ Example: ❖ Plaintext - SEND HELP ❖ Key - rotate up by 13 ❖ Ciphertext - FRAQ URYC
  • 10. Caesar Cipher ❖ Shift/Caesar Cipher - rotate each letter of the plaintext by a fixed amount ❖ Example: ❖ Plaintext - SEND HELP ❖ Key - rotate up by 13 ❖ Ciphertext - FRAQ URYC
  • 11. Substitution Cipher ❖ Create a mapping of the alphabet:
  • 12. Substitution Cipher ❖ Create a mapping of the alphabet:
  • 13. Substitution Cipher ❖ Create a mapping of the alphabet:
  • 14. Substitution Cipher ❖ Create a mapping of the alphabet:
  • 15. Substitution Cipher ❖ Create a mapping of the alphabet:
  • 16. Substitution Cipher ❖ Create a mapping of the alphabet:
  • 17. Substitution Cipher ❖ Create a mapping of the alphabet:
  • 18. Substitution Cipher ❖ Substitute each letter of the plaintext. ❖ Example: ❖ Plaintext - send reinforcements ❖ Key - knowledge of the mapping of the alphabet ❖ Ciphertext - ktdp jtfdoejytbtdlk
  • 19. Substitution Cipher ❖ Substitute each letter of the plaintext. ❖ Example: ❖ Plaintext - send reinforcements ❖ Key - knowledge of the mapping of the alphabet ❖ Ciphertext - ktdp jtfdoejytbtdlk
  • 20. Substitution Cipher ❖ Substitute each letter of the plaintext. ❖ Example: ❖ Plaintext - send reinforcements ❖ Key - knowledge of the mapping of the alphabet ❖ Ciphertext - ktdp jtfdoejytbtdlk
  • 21. Substitution Cipher ❖ Substitute each letter of the plaintext. ❖ Example: ❖ Plaintext - send reinforcements ❖ Key - knowledge of the mapping of the alphabet ❖ Ciphertext - ktdp jtfdoejytbtdlk
  • 22. Substitution Cipher ❖ Substitute each letter of the plaintext. ❖ Example: ❖ Plaintext - send reinforcements ❖ Key - knowledge of the mapping of the alphabet ❖ Ciphertext - ktdp jtfdoejytbtdlk
  • 24. Vigenere Cipher ❖ Extend the key to be the length of the plaintext. ❖ Plaintext P=P1P2P3.. Ciphertext C=C1C2C3.. ❖ Encryption: Ci = (Pi + ki) mod 26 ❖ Decryption: Pi = (Ci - ki) mod 26
  • 25. Vigenere Cipher ❖ To encrypt: ❖ Extend the key to be the length of the plaintext. ❖ Use the Vigenere Table to get the ciphertext. ❖ Example: ❖ Plaintext: NINE ONE ONE AND ONE ONE TWO ❖ Key: FOUR FOU RFO URF OUR FOU RFO ❖ Ciphertext: SWHV TBY FSS UEI CHV TBY KBC
  • 27. Vigenere Cipher ❖ To encrypt: ❖ Extend the key to be the length of the plaintext. ❖ Use the Vigenere Table to get the ciphertext. ❖ Example: ❖ Plaintext: NINE ONE ONE AND ONE ONE TWO ❖ Key: FOUR FOU RFO URF OUR FOU RFO ❖ Ciphertext: SWHV TBY FSS UEI CHV TBY KBC
  • 29. Vigenere Cipher ❖ To encrypt: ❖ Extend the key to be the length of the plaintext. ❖ Use the Vigenere Table to get the ciphertext. ❖ Example: ❖ Plaintext: NINE ONE ONE AND ONE ONE TWO ❖ Key: FOUR FOU RFO URF OUR FOU RFO ❖ Ciphertext: SWHV TBY FSS UEI CHV TBY KBC
  • 31. Vigenere Cipher ❖ To encrypt: ❖ Extend the key to be the length of the plaintext. ❖ Use the Vigenere Table to get the ciphertext. ❖ Example: ❖ Plaintext: NINE ONE ONE AND ONE ONE TWO ❖ Key: FOUR FOU RFO URF OUR FOU RFO ❖ Ciphertext: SWHV TBY FSS UEI CHV TBY KBC
  • 34. Vigenere Cipher ❖ To break: ❖ Look for group(s) of three characters that regularly repeat. ❖ Find a common factor for the distance(s) between repeating groups. ❖ Do frequency analysis of subsets of the characters.
  • 35. Transposition Ciphers ❖ Transposition Cipher - a cipher that shifts the original position of each plaintext character. The ciphertext is a permutation of the plaintext. ❖ Rail Fence Cipher ❖ Route Cipher
  • 36. Rail Fence Cipher ❖ Plaintext is written downwards on “rails” of an imaginary fence, then written upwards when the bottom is reached. ❖ Plaintext: We are discovered. Flee at once. ❖ Ciphertext: WECRLTEERDSOEEFEAOCAIVDEN
  • 37. Route Cipher ❖ The plaintext is written on a grid of given dimensions and padded with low-frequency characters. ❖ The key is how you make the ciphertext: “Spiral counter- clockwise, starting from the top right.” ❖ Ciphertext: EOEFROIRWEADCEDETCXJNALEVSE
  • 38. Route Cipher ❖ The plaintext is written on a grid of given dimensions and padded with low-frequency characters. ❖ The key is how you make the ciphertext: “Spiral counter- clockwise, starting from the top right.” ❖ Ciphertext: EOEFROIRWEADCEDETCXJNALEVSE
  • 39. Route Cipher ❖ The plaintext is written on a grid of given dimensions and padded with low-frequency characters. ❖ The key is how you make the ciphertext: “Spiral counter- clockwise, starting from the top right.” ❖ Ciphertext: EOEFROIRWEADCEDETCXJNALEVSE
  • 40. Hash Functions ❖ Used for integrity, signatures, and password storage. ❖ Given a bit string of any length, produces a bit string of length n. ❖ Properties of a good hash function: ❖ It is impossible to reverse. ❖ It gives a fixed-sized output. ❖ Changing one bit of the message changes the hash completely. ❖ Hard to find collisions.
  • 41. Hash Functions ❖ md5 ❖ extremely vulnerable to collisions ❖ vulnerable to rainbow tables ❖ fast (bad) ❖ sha1 ❖ less vulnerable to collisions, but still vulnerable ❖ also vulnerable to rainbow tables
  • 42. Hash Functions ❖ Password Storage - need slow hashing algorithm ❖ bcrypt, PBKDF2 ❖ bcrypt - 156 guesses per second (from security.stackexchange) ❖ md5 - over 1 billion guesses per second (from security.stackexchange)
  • 43. Encodings ❖ Simple encodings of text ❖ ASCII - hello ❖ Binary - 01101000 01100101 01101100 01101100 01101111 ❖ Hex - x68x65x6cx6cx6f ❖ Base64 - aGVsbG8=
  • 44. ASCII
  • 45. Base64 ❖ Used to safely encode ASCII characters such as 10 and 13 (return and newline characters) ❖ Uses character set {A..Z, a..z, 1-9, +, /} and = for padding ❖ 26 = 64 ❖ To encode, ASCII is converted to hex, and every 6 bits of hex is converted to its Base64 character
  • 48. XOR ❖ XOR = exclusive-OR ❖ A xor B = C <=> B xor C = A ❖ Plaintext xor Key = Ciphertext <=> Ciphertext xor Key = Plaintext <=> Plaintext xor Ciphertext = Key
  • 49. One-Time Pad ❖ Used with a random secret key. ❖ Both parties must have the key. ❖ The key must be the same length as the plaintext. ❖ Used by the NSA and KGB.
  • 52. One-Time Pad Complications ❖ The key must be completely random. ❖ The key must be known by both parties. ❖ The key can only be used once, so if you want to send a message to n people, you will need n keys. ❖ The key must be kept secret.
  • 53. Modern Ciphers ❖ Symmetric Key Encryption ❖ Uses the same key to encrypt and decrypt ❖ Alice and Bob share the same key. ❖ Asymmetric Key Encryption ❖ Uses two keys: one to encrypt and one to decrypt. ❖ Alice has a public key and a private key. ❖ Bob has a public key and a private key.
  • 54. Symmetric Key Encryption ❖ Share a secret key among two or more parties ❖ DES (Data Encryption Standard) ❖ Uses a 56-bit key ❖ Standard from 1979 to 1990s ❖ AES (Advanced Encryption Standard) ❖ Uses 128, 192, or 256-bit key ❖ Standardized in 2001
  • 55. Asymmetric Key Encryption ❖ Asymmetric Public Key Cryptography ❖ Used today to encrypt or sign messages ❖ Uses a private key and a public key
  • 56. RSA Algorithm ❖ Relies on the complexity of factoring large numbers ❖ Take two primes, p, q, and find N = pq. ❖ Find Phi(N) = (p-1)(q-1). ❖ Choose e such that 1 < e < Phi(N) and e and N share no common factors. ❖ Find d such that (de) mod Phi(N) = 1. ❖ Public Key is (e, N). ❖ Private Key is (d, N).
  • 57. RSA Encryption ❖ To encrypt, convert message M into hex/binary and calculate C = Me mod N, where C is the ciphertext. ❖ To decrypt C: M = Cd mod N. ❖ Difficulty to crack depends on the key length.
  • 58. Uses of RSA ❖ Encrypt email with the receiver’s public key ❖ Sign email by encrypting with the sender’s private key ❖ Bloat NSA servers ❖ Dependent upon the infeasibility of factor large numbers. ❖ Make sure you keep your private key a secret.