SlideShare una empresa de Scribd logo
1 de 44
Descargar para leer sin conexión
CNIT 141
Cryptography for Computer Networks
1. Encryption
Topics
• The Basics
• Classical Ciphers
• How Ciphers Work
• Perfect Encryption: The One-Time Pad
• Encryption Security
• Asymmetric Encryption
• When Ciphers Do More Than Encryption
• How Things Can Go Wrong
The Basics
• P: Plaintext
• K: Key
• C: Cleartext
• E: Encryption via cipher
• D: Decryption via cipher
Classical Ciphers
Caesar Cipher
Caesar Cipher in Python
Brute Force Attack in Python
Brute
Force
Attack in
Python
Vigenere Cipher
• Shift varies with a repeated keyword
• Combine several Caesar ciphers together
Breaking the Vigenere
Cipher
• Find repeating ciphertext to deduce key length
• Use frequency analysis
Frequency Analysis
• From Wikipedia
Modified Caesar Program
• Converts to
uppercase
• Preserves
spaces
Encrypt a Paragraph
Frequency Counter
How Ciphers Work
Two Components
• Permutation
• Transforms one letter to another letter
• In Caesar cipher, shift letter three places
• Mode of Operation
• Algorithm to handle messages of arbitrary
size
• In Caesar cipher, process each letter
independently
Permutation Security
• Permutation should be determined by
the key
• If key is secret, attacker can’t easily
decrypt
• Different keys should result in different
permutations
• Permutation should look random
• No pattern in ciphertext
Mode of Operation
• Caesar cipher encrypts letters one at a time
• Double letters remain doubled
• HELLO -> KHOOR
• Patterns in plaintext are preserved in ciphertext
• Insecure (now called “Electronic Code Book”
mode)
• More secure modes encrypt repeated text
differently each time
Perfect Encryption:
The One-Time Pad
XOR
• XOR combines two bits
• 0 ^ 0 = 0
• 0 ^ 1 = 1
• 1 ^ 0 = 1
• 1 ^ 1 = 0
Encrypting a Stream of
Bits
• Plain: ABC = 0100 0001 0100 0010 0100 0011
• Key: 0110 0110 0110 0101 1010 1110
• Cipher: 0010 0111 0010 0111 1110 1101
•Key must be random and never re-used
•Key must be longer than all the plaintexts you
want to send
Unbreakable
• If an attacker uses a brute-force attack
• Trying all possible keys
• They get all possible letter sequences
• No way to identify the correct decryption
Encryption Security
Attack Models
• Set requirements for cryptographers who
design ciphers
• So they know what attacks to prevent
• Give guidelines to users
• Whether a cipher is safe in their environment
• Provide clues for cryptanalysts who attempt to
break ciphers
• Is an attack doable in the model considered?
Attack Models
Kerckhoff’s Principle
• The key is secret
• The cipher is not secret
Black-Box Models
No knowledge of cipher operation
• Ciphertext-Only Attack (COA)
• Attacker sees only C
• Known-Plaintext Attack (KPA)
• Attacker knows P and C
• Chosen-Plaintext Attack (CPA)
• Attacker can perform encryption for any P
• Chosen-Ciphertext Attack (CCA)
• Attacker can perform encryption and decryption
Gray-Box Models
• Attacker has access to the implementation
• Can tamper with the system’s internals
• Side-channel attack
• Attacker measures something else about the
cipher’s operation
• Such as timing or power consumption
• Noninvasive — does not alter integrity of
system
Gray-Box Models
• Invasive attacks
• Modify system
• Examples
• Using acid to dissolve parts of a microchip
• Injecting faults with lasers
Security Goals
• Indistinguishability
• Ciphertext should be indistinguishable from
a random string
• Non-malleability
• Ciphertext cannot be altered and produce
meaningful plaintext
Security Notions
• IND-CPA
• Indistinguishability against a Chosen-
Plaintext Attack
• Also called semantic security
• Two identical plaintext strings must result in
different ciphertexts
• Accomplished by adding “random” bits each
time you encrypt
Asymmetric Encryption
• Uses two keys
• Also called Public-Key encryption
• Public key freely published to everyone
• Private key held secret
• Will be in later chapters—everything in this
chapter is about symmetric encryption
When Ciphers Do More
Than Encryption
Authenticated Encryption
• Returns an authentication
tag with the ciphertext
• Tag ensures integrity of the
message and also
authenticates the author
• Authenticated Encryption
with Associated Data
(AWAD)
• Another variant
Format-Preserving Encryption
• Normally encryption takes inputs as bits and
returns outputs as bits
• Could be written as hex, base64, etc.
• Format-Preserving Encryption returns
ciphertext in the same format as the plaintext
• Zip code -> Zip code
• IP address -> IP address
Fully Homomorphic
Encryption
• Allows modification of encrypted data without
decrypting it
• The first FHE scheme was created in 2009
• Very slow
Searchable Encryption
• Searches encrypted data without decrypting it
• Using an encrypted search string
• Protects privacy of search engine users
• Experimental at present
Tweakable Encryption
• Adds a “tweak” parameter to normal
encryption
• Such as a unique customer number
• Main application is disk encryption
How Things Can Go
Wrong
Weak Cipher
• 2G phone networks used the A5/1 cipher
• Vulnerable to a time-memory trade-off attack
• Using large lookup tables to speed up an
attack
Wrong Model
• Padding Oracle attack
• If a user submitted data that decrypted to a
valid string, that was taken as authentication
• Even if the string contained nonsense
• Server provided error messages for incorrect
padding
• Those erroirs can be used to find valid
ciohertext without knowing the key
CNIT 141: 1. Encryption

Más contenido relacionado

La actualidad más candente

«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz «Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
0xdec0de
 

La actualidad más candente (20)

CNIT 1417. Keyed Hashing
CNIT 1417. Keyed HashingCNIT 1417. Keyed Hashing
CNIT 1417. Keyed Hashing
 
CNIT 141: 3. Cryptographic Security
CNIT 141: 3. Cryptographic SecurityCNIT 141: 3. Cryptographic Security
CNIT 141: 3. Cryptographic Security
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141: 7. Keyed Hashing
CNIT 141: 7. Keyed HashingCNIT 141: 7. Keyed Hashing
CNIT 141: 7. Keyed Hashing
 
CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2CISSP Certification Security Engineering-Part2
CISSP Certification Security Engineering-Part2
 
CNIT 141 11. Diffie-Hellman
CNIT 141 11. Diffie-Hellman	CNIT 141 11. Diffie-Hellman
CNIT 141 11. Diffie-Hellman
 
CNIT 141: 4. Block Ciphers
CNIT 141: 4. Block CiphersCNIT 141: 4. Block Ciphers
CNIT 141: 4. Block Ciphers
 
CNIT 141 6. Hash Functions
CNIT 141 6. Hash FunctionsCNIT 141 6. Hash Functions
CNIT 141 6. Hash Functions
 
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz «Applied cryptanalysis stream ciphers» by Vladimir Garbuz
«Applied cryptanalysis stream ciphers» by Vladimir Garbuz
 
CNIT 141: 14. Quantum and Post-Quantum
CNIT 141: 14. Quantum and Post-QuantumCNIT 141: 14. Quantum and Post-Quantum
CNIT 141: 14. Quantum and Post-Quantum
 
CNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic CurvesCNIT 141 12. Elliptic Curves
CNIT 141 12. Elliptic Curves
 
Cryptography
CryptographyCryptography
Cryptography
 
Applied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphersApplied cryptanalysis - stream ciphers
Applied cryptanalysis - stream ciphers
 
CNIT 141: 11. Diffie-Hellman
CNIT 141: 11. Diffie-HellmanCNIT 141: 11. Diffie-Hellman
CNIT 141: 11. Diffie-Hellman
 
SunshinePHP 2017: Tales From The Crypt - A Cryptography Primer
SunshinePHP 2017: Tales From The Crypt - A Cryptography PrimerSunshinePHP 2017: Tales From The Crypt - A Cryptography Primer
SunshinePHP 2017: Tales From The Crypt - A Cryptography Primer
 
Applied cryptanalysis - everything else
Applied cryptanalysis - everything elseApplied cryptanalysis - everything else
Applied cryptanalysis - everything else
 
Introduction to ethereum_public
Introduction to ethereum_publicIntroduction to ethereum_public
Introduction to ethereum_public
 
Reinventing anon email
Reinventing anon emailReinventing anon email
Reinventing anon email
 
CNIT 141: 13. TLS
CNIT 141: 13. TLSCNIT 141: 13. TLS
CNIT 141: 13. TLS
 
Laverna vs etherpad
Laverna vs etherpadLaverna vs etherpad
Laverna vs etherpad
 

Similar a CNIT 141: 1. Encryption

detailed presentation on cryptography analysis
detailed presentation on cryptography analysisdetailed presentation on cryptography analysis
detailed presentation on cryptography analysis
BARATH800940
 
7-cryptography.pptfffffffffffffffffffffffffffffffffff
7-cryptography.pptfffffffffffffffffffffffffffffffffff7-cryptography.pptfffffffffffffffffffffffffffffffffff
7-cryptography.pptfffffffffffffffffffffffffffffffffff
maninthemirrorrror
 

Similar a CNIT 141: 1. Encryption (20)

CISSP Prep: Ch 4. Security Engineering (Part 2)
CISSP Prep: Ch 4. Security Engineering (Part 2)CISSP Prep: Ch 4. Security Engineering (Part 2)
CISSP Prep: Ch 4. Security Engineering (Part 2)
 
CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)CNIT 125 Ch 4. Security Engineering (Part 2)
CNIT 125 Ch 4. Security Engineering (Part 2)
 
Block Ciphers Modes of Operation
Block Ciphers Modes of OperationBlock Ciphers Modes of Operation
Block Ciphers Modes of Operation
 
CISSP - Chapter 3 - Cryptography
CISSP - Chapter 3 - CryptographyCISSP - Chapter 3 - Cryptography
CISSP - Chapter 3 - Cryptography
 
CompTIASecPLUS-Part6 - UnlimitedEdited.pptx
CompTIASecPLUS-Part6 -  UnlimitedEdited.pptxCompTIASecPLUS-Part6 -  UnlimitedEdited.pptx
CompTIASecPLUS-Part6 - UnlimitedEdited.pptx
 
Basic cryptography
Basic cryptographyBasic cryptography
Basic cryptography
 
Cryptography
CryptographyCryptography
Cryptography
 
Slidecast - Workshop
Slidecast - WorkshopSlidecast - Workshop
Slidecast - Workshop
 
Information and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniquesInformation and network security 10 classical encryption techniques
Information and network security 10 classical encryption techniques
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 
7-cryptography.ppt
7-cryptography.ppt7-cryptography.ppt
7-cryptography.ppt
 
the art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.pptthe art of the fking dum crypto_basic.ppt
the art of the fking dum crypto_basic.ppt
 
This is the presentation ofcryptography.ppt
This is the presentation ofcryptography.pptThis is the presentation ofcryptography.ppt
This is the presentation ofcryptography.ppt
 
7 cryptography
7 cryptography7 cryptography
7 cryptography
 
Crytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.pptCrytography CertCourse Module 1 & 2.ppt
Crytography CertCourse Module 1 & 2.ppt
 
Best book for the cryptography doctor.ppt
Best book for the cryptography doctor.pptBest book for the cryptography doctor.ppt
Best book for the cryptography doctor.ppt
 
detailed presentation on cryptography analysis
detailed presentation on cryptography analysisdetailed presentation on cryptography analysis
detailed presentation on cryptography analysis
 
7-cryptography.pptfffffffffffffffffffffffffffffffffff
7-cryptography.pptfffffffffffffffffffffffffffffffffff7-cryptography.pptfffffffffffffffffffffffffffffffffff
7-cryptography.pptfffffffffffffffffffffffffffffffffff
 
RSA.ppt
RSA.pptRSA.ppt
RSA.ppt
 

Más de Sam Bowne

Más de Sam Bowne (20)

Cyberwar
CyberwarCyberwar
Cyberwar
 
3: DNS vulnerabilities
3: DNS vulnerabilities 3: DNS vulnerabilities
3: DNS vulnerabilities
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
4 Mapping the Application
4 Mapping the Application4 Mapping the Application
4 Mapping the Application
 
3. Attacking iOS Applications (Part 2)
 3. Attacking iOS Applications (Part 2) 3. Attacking iOS Applications (Part 2)
3. Attacking iOS Applications (Part 2)
 
12 Elliptic Curves
12 Elliptic Curves12 Elliptic Curves
12 Elliptic Curves
 
11. Diffie-Hellman
11. Diffie-Hellman11. Diffie-Hellman
11. Diffie-Hellman
 
2a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 12a Analyzing iOS Apps Part 1
2a Analyzing iOS Apps Part 1
 
9 Writing Secure Android Applications
9 Writing Secure Android Applications9 Writing Secure Android Applications
9 Writing Secure Android Applications
 
12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)12 Investigating Windows Systems (Part 2 of 3)
12 Investigating Windows Systems (Part 2 of 3)
 
10 RSA
10 RSA10 RSA
10 RSA
 
12 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 312 Investigating Windows Systems (Part 1 of 3
12 Investigating Windows Systems (Part 1 of 3
 
9. Hard Problems
9. Hard Problems9. Hard Problems
9. Hard Problems
 
8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)8 Android Implementation Issues (Part 1)
8 Android Implementation Issues (Part 1)
 
11 Analysis Methodology
11 Analysis Methodology11 Analysis Methodology
11 Analysis Methodology
 
8. Authenticated Encryption
8. Authenticated Encryption8. Authenticated Encryption
8. Authenticated Encryption
 
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 2)
 
7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)7. Attacking Android Applications (Part 1)
7. Attacking Android Applications (Part 1)
 
5. Stream Ciphers
5. Stream Ciphers5. Stream Ciphers
5. Stream Ciphers
 
6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection6 Scope & 7 Live Data Collection
6 Scope & 7 Live Data Collection
 

Último

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
 

Último (20)

The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 

CNIT 141: 1. Encryption

  • 1. CNIT 141 Cryptography for Computer Networks 1. Encryption
  • 2. Topics • The Basics • Classical Ciphers • How Ciphers Work • Perfect Encryption: The One-Time Pad • Encryption Security • Asymmetric Encryption • When Ciphers Do More Than Encryption • How Things Can Go Wrong
  • 3. The Basics • P: Plaintext • K: Key • C: Cleartext • E: Encryption via cipher • D: Decryption via cipher
  • 7. Brute Force Attack in Python
  • 9. Vigenere Cipher • Shift varies with a repeated keyword • Combine several Caesar ciphers together
  • 10. Breaking the Vigenere Cipher • Find repeating ciphertext to deduce key length • Use frequency analysis
  • 12. Modified Caesar Program • Converts to uppercase • Preserves spaces
  • 15.
  • 17. Two Components • Permutation • Transforms one letter to another letter • In Caesar cipher, shift letter three places • Mode of Operation • Algorithm to handle messages of arbitrary size • In Caesar cipher, process each letter independently
  • 18. Permutation Security • Permutation should be determined by the key • If key is secret, attacker can’t easily decrypt • Different keys should result in different permutations • Permutation should look random • No pattern in ciphertext
  • 19. Mode of Operation • Caesar cipher encrypts letters one at a time • Double letters remain doubled • HELLO -> KHOOR • Patterns in plaintext are preserved in ciphertext • Insecure (now called “Electronic Code Book” mode) • More secure modes encrypt repeated text differently each time
  • 21. XOR • XOR combines two bits • 0 ^ 0 = 0 • 0 ^ 1 = 1 • 1 ^ 0 = 1 • 1 ^ 1 = 0
  • 22. Encrypting a Stream of Bits • Plain: ABC = 0100 0001 0100 0010 0100 0011 • Key: 0110 0110 0110 0101 1010 1110 • Cipher: 0010 0111 0010 0111 1110 1101 •Key must be random and never re-used •Key must be longer than all the plaintexts you want to send
  • 23. Unbreakable • If an attacker uses a brute-force attack • Trying all possible keys • They get all possible letter sequences • No way to identify the correct decryption
  • 24.
  • 26. Attack Models • Set requirements for cryptographers who design ciphers • So they know what attacks to prevent • Give guidelines to users • Whether a cipher is safe in their environment • Provide clues for cryptanalysts who attempt to break ciphers • Is an attack doable in the model considered?
  • 28. Kerckhoff’s Principle • The key is secret • The cipher is not secret
  • 29. Black-Box Models No knowledge of cipher operation • Ciphertext-Only Attack (COA) • Attacker sees only C • Known-Plaintext Attack (KPA) • Attacker knows P and C • Chosen-Plaintext Attack (CPA) • Attacker can perform encryption for any P • Chosen-Ciphertext Attack (CCA) • Attacker can perform encryption and decryption
  • 30. Gray-Box Models • Attacker has access to the implementation • Can tamper with the system’s internals • Side-channel attack • Attacker measures something else about the cipher’s operation • Such as timing or power consumption • Noninvasive — does not alter integrity of system
  • 31. Gray-Box Models • Invasive attacks • Modify system • Examples • Using acid to dissolve parts of a microchip • Injecting faults with lasers
  • 32. Security Goals • Indistinguishability • Ciphertext should be indistinguishable from a random string • Non-malleability • Ciphertext cannot be altered and produce meaningful plaintext
  • 33. Security Notions • IND-CPA • Indistinguishability against a Chosen- Plaintext Attack • Also called semantic security • Two identical plaintext strings must result in different ciphertexts • Accomplished by adding “random” bits each time you encrypt
  • 34. Asymmetric Encryption • Uses two keys • Also called Public-Key encryption • Public key freely published to everyone • Private key held secret • Will be in later chapters—everything in this chapter is about symmetric encryption
  • 35. When Ciphers Do More Than Encryption
  • 36. Authenticated Encryption • Returns an authentication tag with the ciphertext • Tag ensures integrity of the message and also authenticates the author • Authenticated Encryption with Associated Data (AWAD) • Another variant
  • 37. Format-Preserving Encryption • Normally encryption takes inputs as bits and returns outputs as bits • Could be written as hex, base64, etc. • Format-Preserving Encryption returns ciphertext in the same format as the plaintext • Zip code -> Zip code • IP address -> IP address
  • 38. Fully Homomorphic Encryption • Allows modification of encrypted data without decrypting it • The first FHE scheme was created in 2009 • Very slow
  • 39. Searchable Encryption • Searches encrypted data without decrypting it • Using an encrypted search string • Protects privacy of search engine users • Experimental at present
  • 40. Tweakable Encryption • Adds a “tweak” parameter to normal encryption • Such as a unique customer number • Main application is disk encryption
  • 41. How Things Can Go Wrong
  • 42. Weak Cipher • 2G phone networks used the A5/1 cipher • Vulnerable to a time-memory trade-off attack • Using large lookup tables to speed up an attack
  • 43. Wrong Model • Padding Oracle attack • If a user submitted data that decrypted to a valid string, that was taken as authentication • Even if the string contained nonsense • Server provided error messages for incorrect padding • Those erroirs can be used to find valid ciohertext without knowing the key