SlideShare a Scribd company logo
Encryption Basics
Kevin O'Brien
Washtenaw Linux Users Group
Ancient History
● Wax tablets – Herodotus
● Shaved head – Herodotus
● Both examples of Steganography (hidden writing)
– Steganos (Greek) = hidden
– Graphei (Greek) = writing
● Essentially security by obscurity
● More modern version = microdots
Encryption
● Kryptos (Greek) = hidden
● A message should be unreadable to someone
who finds it
● Employs a cipher
● Substitutes one symbol for another
● Not the same as a code!
Codes
● Codes do not try to obscure the message
● Examples:
– Morse code
– ASCII
● Codes transform one set of symbols into
another without trying to hide the meaning
Caesar Cipher
● Moved each letter a fixed number of spaces
● Same as ROT13
● HAL = IBM
● Not very secure, but then Caesar was dealing
with barbarians :)
● Trivial to break since there are only 25 schemes
to try.
Substitution Cipher
● Better than Caesar Cipher
● No fixed pattern to how symbols are substituted
● Think of the “brain teaser” puzzles in the
newspaper
● Obviously, these can be broken by ordinary
people with small effort
Statistical analysis
● The weakness of Substitution Ciphers is that
they are susceptible to statistical analysis
●
First shown by Al-Kindi in the 9th
century
● In English, letters have a certain frequency
– e,t,a,o,i,n,s,h,r,d,l,u....
● Letter q almost always followed by u, “the” is
most common three-letter word, and so on
Vigenere Square
● Uses a key word or phrase to create a different
substitution for each letter of the message
● But if reused could also be analyzed
● Charles Babbage showed that it could be
attacked statistically
One-Time Pads
● A series of unique Vigenere Squares
● Each one is used only once
● Absolutely secure
● But pain the butt to create
● And distribution is an issue
● If enemy gets it, no security
Mechanical solutions
● Captain Midnight Decoder Ring
● Rotate one disk against another
● Essentially just another Caesar Cipher
Enigma
● Decoder ring on steroids
● Multiple disks
● Settings change after each letter
● Poles figured out how to analyze
● Passed to Brits
● Bletchley Park & Turing
Enigma flawed
● First, essentially mechanical means there is a
way to attack
● Mechanical cannot be truly random
● No letter could be encrypted as itself
● Key turned out to be mathematics
Computers
● Originally created to break ciphers
● Collosus used against German Lorenz Cipher
● But computers could be used to create ciphers
as well
● By the 1960s it was clear that computers could
create unbreakable encryption schemes as
long users did not make a mistake
Key distribution
● But how to distribute keys securely?
● Same issue as with one-time pads
● Whitfield Diffie, Martin Hellman, and Ralph
Merkle solved that and created Diffie-Hellman-
Merkle Key Exchange
● Diffie later realized that publicly distributed keys
could be asymmetric
RSA
● Ron Rivest, Adi Shamior, and Leonard Adelman first
figured out how to do it practically
● Based on one-way function
● Easy to compute, impractical to reverse
● They used large prime numbers which they multiplied
together to get an even larger number
● Extremely large numbers are hard to factor, hence
the one-way
Key Pair
● RSA procedure creates two keys
● Each key can decrypt what the other key has
encrypted
● But no key can decrypt what it itself has
encrypted
Other Algorithms
● In addition to the RSA prime number algorithm
there are two well-known alternatives
● Discrete Logarithm
● Elliptical Curve
● Both are also “one-way” functions that are easy
to compute but impractical to reverse
Symmetric vs. Asymmetric Encryption
● Symmetric means the same key that encrypted
the message will also decrypt it
● Very efficient = can easily and quickly encrypt
and decrypt
● Key distribution is a problem
● Alice has to send Bob the key before sending
the encrypted message
● Eve can listen in and get the key
Public Key
● This is Asymmetric
● A key pair is generated
● One of the keys is designated as private, the
other public
● Arbitrary which is which
Key Distribution
● Public key gets around the key distribution
problem
● The Public key can be freely distributed
● But only the Private key can decrypt what the
Public key has encrypted
● But also requires a lot more resources
Symmetric Standard DES
● Data Encryption Standard (DES) developed by
IBM for the U.S. Government
● Employed several techniques still in use today
– Block Cipher
– XOR
● http://en.wikipedia.org/wiki/Data_Encryption_St
andard
Block Cipher
● A Block Cipher operates on a fixed-length block
of bits to transform them
● Plain text is turned into ciphertext block by
block
● Generally the transformation is repeated a
number times called rounds
● https://en.wikipedia.org/wiki/Block_cipher
XOR
● Most common transformation
● Stands for “Exclusive Or”
● In logic, means that either A is true or B is true,
but not both
● In circuit design, if either A or B is sending a
signal it is output, but if both are, nothing is
output
XOR in Cryptography
● The message and the key are expressed in
binary
● They are XORed together
● This essentially means adding without carrying
the 1
● If both A and B are 0, or both are 1, the result is
0. If one is zero and the other is 1, the result is
1
Coding
● Remember that a code is just a transparent
transform of information from one scheme to
another
● ASCII is such a code
● It takes letters and symbols and turns them into
binary numbers
● http://en.wikipedia.org/wiki/ASCII
Coding Example 1
● I want to send a message “cat”
● C=1100011
● A=1100001
● T=1110100
● CAT=110001111000011110100
● This is still transparent
Key
● Now I will choose a key to use, and I choose
“dog”
● D=1100100
● 0=1101111
● G=1100111
● DOG=110010011011111100111
XOR
XOR is reversible
● If you take the result text from the example, and
XOR it with the key, you get back the original
message
Encryption Algorithm
● Combines a number of transformations and
combines them in rounds
● For symmetric encryption needs to be
reversible
● XOR is always part of the process
DES
● Block size was initially 64-bits
● But one bit from each byte was devoted to
parity checking
● Effective length 56-bits, therefore
DES role
● Bruce Schneier said about it “”DES did more to
galvanize the field of cryptanalysis than
anything else. Now there was an algorithm to
study.”
● Standard against which all others were
compared
● Key length just too small
● Cracked in 22 hours in 1999
Triple DES
● Uses 3 independent 56-bit keys in a repeated
process
● Each block encrypted three times, once with
each key
● Probably safe for now
AES
● Advanced Encryption Standard
● Adopted in 2001 by NIST
● Considered best symmetric algorithm available
now
Rijndael Cipher
● Named for developers, Vincent Rijman and Joan
Daeman
● Basis of AES
● Block size of 128-bits
● Key sizes of 128, 192, or 256 bits are allowed
● Called AES-128, AES192, or AES-256
● As with all other algorithms, repeated rounds of
transformations
Symmetric Summed Up
● Fast and efficient
● Relies on a single shared key
● Does not require entropy because the key
needs only to be agreed, not random
Asymmetric Standards
● Solve the key distribution problem
● Requires entropy (randomness) along with one-
way functions
● Three kinds
– Multiplying large prime numbers
– Discrete logarithm
– Elliptic Curve
Prime Number Approach
● This is what RSA uses
● Two large prime numbers are multiplied together
● This is easy to do
● But factoring the result to get back the original primes
is computationally infeasible with current technology
● But research into factorization is ongoing, it is an
arms race
What numbers?
● Generally in the neighborhood of 1024 digits
● Must be randomly selected
● Should not be “near” each other
● Product is used to generate other prime
numbers which help form the key pair
● One is arbitrarily made private, the other public
Discrete Logarithm
● Involves finding an integer that solves a
logarithmic equation
● Used in Elgamal encryption and Diffie-Hellman-
Merkle Key Exchange
● Choosing the particular numbers for the
logarithmic equation is where the entropy comes in
● Diffie-Hellman-Merkle Key Exchange is used for
Perfect Forward Secrecy
Elliptic Curve
● Builds on Discrete Logarithm approach
● A curve with the right properties is chosen,
then a point on that curve
● Then you need to find the discrete logarithm of
that point
● Entropy comes in when choosing the point on
the curve
Issues with Elliptic Curve
● NIST has recommended 15 curves as suitable
● It appears NSA pushed one with weaknesses
as the default
● But Elliptic Curve done right is faster and more
efficient than RSA or general Discrete
Logarithm approaches
● So it should be the future.
Symmetric vs. Asymmetric
● Symmetric is fast and efficient, but needs no
entropy
● Symmetric has key exchange problems
● Asymmetric is resource-intensive, requires
randomness
● Asymmetric solves key exchange
Hybrid Approach
● Most public key crypto uses Asymmetric
encryption to distribute a Symmetric key
● So the inefficient algorithm is only used at the
beginning
● Everything after that is done with the efficient
Symmetric algorithm
Example: E-mail
● When you encrypt a message to someone, you
use a Symmetric key to encrypt a message
● Then you use their Public key to encrypt the
Symmetric key
● They get the message and use their Private key
to decrypt the Symmetric key
● Then they use the Symmetric key to decrypt the
message
See also
● SSL certificates
● SSH tunnels
● Generally, the same techniques are used over
and over
● So learn it once and you can quickly learn other
uses

More Related Content

PDF
CNIT 141 6. Hash Functions
PDF
CNIT 141 9. Hard Problems
PDF
CNIT 141: 4. Block Ciphers
PDF
CNIT 141: 14. Quantum and Post-Quantum
PDF
CNIT 1417. Keyed Hashing
PDF
CNIT 141: 6. Hash Functions
PDF
CNIT 141: 4. Block Ciphers
PDF
CNIT 141: 12. Elliptic Curves
CNIT 141 6. Hash Functions
CNIT 141 9. Hard Problems
CNIT 141: 4. Block Ciphers
CNIT 141: 14. Quantum and Post-Quantum
CNIT 1417. Keyed Hashing
CNIT 141: 6. Hash Functions
CNIT 141: 4. Block Ciphers
CNIT 141: 12. Elliptic Curves

What's hot (20)

PDF
CNIT 141: 4. Block Ciphers
PDF
CNIT 141: 14. Quantum and Post-Quantum
PDF
CNIT 141 12. Elliptic Curves
PDF
CNIT 141: 1. Encryption
PDF
CNIT 141: 11. Diffie-Hellman
PDF
CNIT 141: 3. Cryptographic Security
PPTX
Cryptography
PDF
An Analysis of RSA Public Exponent e
PPTX
PDF
CNIT 141: 2. Randomness
PDF
CRYPTOGRAPHY AND NETWORK SECURITY
PDF
Post Quantum Cryptography - Emerging Frontiers
PDF
CNIT 141: 1. Encryption
PDF
CNIT 141: 5. Stream Ciphers
ODP
Secure 2 Party AES
PDF
CNIT 141: 4. Block Ciphers
PDF
CNIT 141 8. Authenticated Encryption
PDF
An Analysis of Secure Remote Password (SRP)
PPTX
Symmetric encryption
PDF
Cyclic Attacks on the RSA Trapdoor Function
CNIT 141: 4. Block Ciphers
CNIT 141: 14. Quantum and Post-Quantum
CNIT 141 12. Elliptic Curves
CNIT 141: 1. Encryption
CNIT 141: 11. Diffie-Hellman
CNIT 141: 3. Cryptographic Security
Cryptography
An Analysis of RSA Public Exponent e
CNIT 141: 2. Randomness
CRYPTOGRAPHY AND NETWORK SECURITY
Post Quantum Cryptography - Emerging Frontiers
CNIT 141: 1. Encryption
CNIT 141: 5. Stream Ciphers
Secure 2 Party AES
CNIT 141: 4. Block Ciphers
CNIT 141 8. Authenticated Encryption
An Analysis of Secure Remote Password (SRP)
Symmetric encryption
Cyclic Attacks on the RSA Trapdoor Function
Ad

Viewers also liked (20)

PPTX
Cryptography
KEY
TMG Intro To Linux
PPT
Linux Intro
PDF
Auditing a Wireless Network and Planning for a Secure WLAN Implementation
ODP
Intro To Linux
PDF
Introduction to linux
PDF
Linux day 2016 la shell in linux
PDF
关于Linux的许多
ODP
Encryption Techniques
PPSX
Network secuirty & encryption techniques
PDF
Scripting and the shell in LINUX
PPT
Bash shell
PPTX
Double DES & Triple DES
PDF
Linux intro 1 definitions
PDF
Ubuntu – Linux Useful Commands
PPT
Unix/Linux Basic Commands and Shell Script
ODP
An Introduction to Linux
PPTX
Operating Systems: Linux in Detail
PPTX
Cryptography.ppt
PPTX
Cryptography and network security
Cryptography
TMG Intro To Linux
Linux Intro
Auditing a Wireless Network and Planning for a Secure WLAN Implementation
Intro To Linux
Introduction to linux
Linux day 2016 la shell in linux
关于Linux的许多
Encryption Techniques
Network secuirty & encryption techniques
Scripting and the shell in LINUX
Bash shell
Double DES & Triple DES
Linux intro 1 definitions
Ubuntu – Linux Useful Commands
Unix/Linux Basic Commands and Shell Script
An Introduction to Linux
Operating Systems: Linux in Detail
Cryptography.ppt
Cryptography and network security
Ad

Similar to Encryption basics (20)

PPT
crypto slide for students, check out the good article
PDF
CNIT 125 Ch 4. Security Engineering (Part 2)
PDF
Chapter 8 cryptography lanjutan
ODP
CISSP Week 18
PDF
CISSP Prep: Ch 4. Security Engineering (Part 2)
PPT
crypto Digital Signature Diffie Hell man.ppt
PPTX
Cryptography-101
PPTX
PPT
Introduction to cryptography and Network Security
PPT
RSA Algorithm - Public Key Cryptography
PDF
Ch 12: Cryptography
PDF
CNIT 123 12: Cryptography
PPTX
Cryptography
PDF
Securing your Bitcoin wallet
PDF
WEEK-2 (1).pdfdccccccccccccccccccccccccccccccccccc
PPT
PPTX
Cryptography & Steganography
PPTX
AES-GCM common pitfalls and how to work around them.pptx
PPTX
Cryptography and network security Nit701
crypto slide for students, check out the good article
CNIT 125 Ch 4. Security Engineering (Part 2)
Chapter 8 cryptography lanjutan
CISSP Week 18
CISSP Prep: Ch 4. Security Engineering (Part 2)
crypto Digital Signature Diffie Hell man.ppt
Cryptography-101
Introduction to cryptography and Network Security
RSA Algorithm - Public Key Cryptography
Ch 12: Cryptography
CNIT 123 12: Cryptography
Cryptography
Securing your Bitcoin wallet
WEEK-2 (1).pdfdccccccccccccccccccccccccccccccccccc
Cryptography & Steganography
AES-GCM common pitfalls and how to work around them.pptx
Cryptography and network security Nit701

More from Kevin OBrien (20)

PPTX
American icon pmi
ODP
Tls 1.3
ODP
Forward Secrecy
ODP
Diffie_Hellman-Merkle Key Exchange
ODP
Password best practices and the last pass hack
ODP
SSL certificates
ODP
Passwords
PDF
Linux Directory Structure
PDF
Hardware Discovery Commands
PDF
Help, my computer is sluggish
PDF
The ps Command
PDF
Installing Software, Part 3: Command Line
PDF
Installing Software, Part 2: Package Managers
PDF
Installing Software, Part 1 - Repositories
PDF
Installing Linux: Partitioning and File System Considerations
PDF
The ifconfig Command
PDF
Find and Locate: Two Commands
PDF
The Shell Game Part 4: Bash Shortcuts
PDF
The Shell Game Part 3: Introduction to Bash
PDF
The Shell Game Part 2: What are your shell choices?
American icon pmi
Tls 1.3
Forward Secrecy
Diffie_Hellman-Merkle Key Exchange
Password best practices and the last pass hack
SSL certificates
Passwords
Linux Directory Structure
Hardware Discovery Commands
Help, my computer is sluggish
The ps Command
Installing Software, Part 3: Command Line
Installing Software, Part 2: Package Managers
Installing Software, Part 1 - Repositories
Installing Linux: Partitioning and File System Considerations
The ifconfig Command
Find and Locate: Two Commands
The Shell Game Part 4: Bash Shortcuts
The Shell Game Part 3: Introduction to Bash
The Shell Game Part 2: What are your shell choices?

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Approach and Philosophy of On baking technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Dropbox Q2 2025 Financial Results & Investor Presentation
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
Chapter 3 Spatial Domain Image Processing.pdf
Network Security Unit 5.pdf for BCA BBA.
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Approach and Philosophy of On baking technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology
Machine learning based COVID-19 study performance prediction
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
The AUB Centre for AI in Media Proposal.docx
sap open course for s4hana steps from ECC to s4
Spectroscopy.pptx food analysis technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

Encryption basics

  • 2. Ancient History ● Wax tablets – Herodotus ● Shaved head – Herodotus ● Both examples of Steganography (hidden writing) – Steganos (Greek) = hidden – Graphei (Greek) = writing ● Essentially security by obscurity ● More modern version = microdots
  • 3. Encryption ● Kryptos (Greek) = hidden ● A message should be unreadable to someone who finds it ● Employs a cipher ● Substitutes one symbol for another ● Not the same as a code!
  • 4. Codes ● Codes do not try to obscure the message ● Examples: – Morse code – ASCII ● Codes transform one set of symbols into another without trying to hide the meaning
  • 5. Caesar Cipher ● Moved each letter a fixed number of spaces ● Same as ROT13 ● HAL = IBM ● Not very secure, but then Caesar was dealing with barbarians :) ● Trivial to break since there are only 25 schemes to try.
  • 6. Substitution Cipher ● Better than Caesar Cipher ● No fixed pattern to how symbols are substituted ● Think of the “brain teaser” puzzles in the newspaper ● Obviously, these can be broken by ordinary people with small effort
  • 7. Statistical analysis ● The weakness of Substitution Ciphers is that they are susceptible to statistical analysis ● First shown by Al-Kindi in the 9th century ● In English, letters have a certain frequency – e,t,a,o,i,n,s,h,r,d,l,u.... ● Letter q almost always followed by u, “the” is most common three-letter word, and so on
  • 8. Vigenere Square ● Uses a key word or phrase to create a different substitution for each letter of the message ● But if reused could also be analyzed ● Charles Babbage showed that it could be attacked statistically
  • 9. One-Time Pads ● A series of unique Vigenere Squares ● Each one is used only once ● Absolutely secure ● But pain the butt to create ● And distribution is an issue ● If enemy gets it, no security
  • 10. Mechanical solutions ● Captain Midnight Decoder Ring ● Rotate one disk against another ● Essentially just another Caesar Cipher
  • 11. Enigma ● Decoder ring on steroids ● Multiple disks ● Settings change after each letter ● Poles figured out how to analyze ● Passed to Brits ● Bletchley Park & Turing
  • 12. Enigma flawed ● First, essentially mechanical means there is a way to attack ● Mechanical cannot be truly random ● No letter could be encrypted as itself ● Key turned out to be mathematics
  • 13. Computers ● Originally created to break ciphers ● Collosus used against German Lorenz Cipher ● But computers could be used to create ciphers as well ● By the 1960s it was clear that computers could create unbreakable encryption schemes as long users did not make a mistake
  • 14. Key distribution ● But how to distribute keys securely? ● Same issue as with one-time pads ● Whitfield Diffie, Martin Hellman, and Ralph Merkle solved that and created Diffie-Hellman- Merkle Key Exchange ● Diffie later realized that publicly distributed keys could be asymmetric
  • 15. RSA ● Ron Rivest, Adi Shamior, and Leonard Adelman first figured out how to do it practically ● Based on one-way function ● Easy to compute, impractical to reverse ● They used large prime numbers which they multiplied together to get an even larger number ● Extremely large numbers are hard to factor, hence the one-way
  • 16. Key Pair ● RSA procedure creates two keys ● Each key can decrypt what the other key has encrypted ● But no key can decrypt what it itself has encrypted
  • 17. Other Algorithms ● In addition to the RSA prime number algorithm there are two well-known alternatives ● Discrete Logarithm ● Elliptical Curve ● Both are also “one-way” functions that are easy to compute but impractical to reverse
  • 18. Symmetric vs. Asymmetric Encryption ● Symmetric means the same key that encrypted the message will also decrypt it ● Very efficient = can easily and quickly encrypt and decrypt ● Key distribution is a problem ● Alice has to send Bob the key before sending the encrypted message ● Eve can listen in and get the key
  • 19. Public Key ● This is Asymmetric ● A key pair is generated ● One of the keys is designated as private, the other public ● Arbitrary which is which
  • 20. Key Distribution ● Public key gets around the key distribution problem ● The Public key can be freely distributed ● But only the Private key can decrypt what the Public key has encrypted ● But also requires a lot more resources
  • 21. Symmetric Standard DES ● Data Encryption Standard (DES) developed by IBM for the U.S. Government ● Employed several techniques still in use today – Block Cipher – XOR ● http://en.wikipedia.org/wiki/Data_Encryption_St andard
  • 22. Block Cipher ● A Block Cipher operates on a fixed-length block of bits to transform them ● Plain text is turned into ciphertext block by block ● Generally the transformation is repeated a number times called rounds ● https://en.wikipedia.org/wiki/Block_cipher
  • 23. XOR ● Most common transformation ● Stands for “Exclusive Or” ● In logic, means that either A is true or B is true, but not both ● In circuit design, if either A or B is sending a signal it is output, but if both are, nothing is output
  • 24. XOR in Cryptography ● The message and the key are expressed in binary ● They are XORed together ● This essentially means adding without carrying the 1 ● If both A and B are 0, or both are 1, the result is 0. If one is zero and the other is 1, the result is 1
  • 25. Coding ● Remember that a code is just a transparent transform of information from one scheme to another ● ASCII is such a code ● It takes letters and symbols and turns them into binary numbers ● http://en.wikipedia.org/wiki/ASCII
  • 26. Coding Example 1 ● I want to send a message “cat” ● C=1100011 ● A=1100001 ● T=1110100 ● CAT=110001111000011110100 ● This is still transparent
  • 27. Key ● Now I will choose a key to use, and I choose “dog” ● D=1100100 ● 0=1101111 ● G=1100111 ● DOG=110010011011111100111
  • 28. XOR
  • 29. XOR is reversible ● If you take the result text from the example, and XOR it with the key, you get back the original message
  • 30. Encryption Algorithm ● Combines a number of transformations and combines them in rounds ● For symmetric encryption needs to be reversible ● XOR is always part of the process
  • 31. DES ● Block size was initially 64-bits ● But one bit from each byte was devoted to parity checking ● Effective length 56-bits, therefore
  • 32. DES role ● Bruce Schneier said about it “”DES did more to galvanize the field of cryptanalysis than anything else. Now there was an algorithm to study.” ● Standard against which all others were compared ● Key length just too small ● Cracked in 22 hours in 1999
  • 33. Triple DES ● Uses 3 independent 56-bit keys in a repeated process ● Each block encrypted three times, once with each key ● Probably safe for now
  • 34. AES ● Advanced Encryption Standard ● Adopted in 2001 by NIST ● Considered best symmetric algorithm available now
  • 35. Rijndael Cipher ● Named for developers, Vincent Rijman and Joan Daeman ● Basis of AES ● Block size of 128-bits ● Key sizes of 128, 192, or 256 bits are allowed ● Called AES-128, AES192, or AES-256 ● As with all other algorithms, repeated rounds of transformations
  • 36. Symmetric Summed Up ● Fast and efficient ● Relies on a single shared key ● Does not require entropy because the key needs only to be agreed, not random
  • 37. Asymmetric Standards ● Solve the key distribution problem ● Requires entropy (randomness) along with one- way functions ● Three kinds – Multiplying large prime numbers – Discrete logarithm – Elliptic Curve
  • 38. Prime Number Approach ● This is what RSA uses ● Two large prime numbers are multiplied together ● This is easy to do ● But factoring the result to get back the original primes is computationally infeasible with current technology ● But research into factorization is ongoing, it is an arms race
  • 39. What numbers? ● Generally in the neighborhood of 1024 digits ● Must be randomly selected ● Should not be “near” each other ● Product is used to generate other prime numbers which help form the key pair ● One is arbitrarily made private, the other public
  • 40. Discrete Logarithm ● Involves finding an integer that solves a logarithmic equation ● Used in Elgamal encryption and Diffie-Hellman- Merkle Key Exchange ● Choosing the particular numbers for the logarithmic equation is where the entropy comes in ● Diffie-Hellman-Merkle Key Exchange is used for Perfect Forward Secrecy
  • 41. Elliptic Curve ● Builds on Discrete Logarithm approach ● A curve with the right properties is chosen, then a point on that curve ● Then you need to find the discrete logarithm of that point ● Entropy comes in when choosing the point on the curve
  • 42. Issues with Elliptic Curve ● NIST has recommended 15 curves as suitable ● It appears NSA pushed one with weaknesses as the default ● But Elliptic Curve done right is faster and more efficient than RSA or general Discrete Logarithm approaches ● So it should be the future.
  • 43. Symmetric vs. Asymmetric ● Symmetric is fast and efficient, but needs no entropy ● Symmetric has key exchange problems ● Asymmetric is resource-intensive, requires randomness ● Asymmetric solves key exchange
  • 44. Hybrid Approach ● Most public key crypto uses Asymmetric encryption to distribute a Symmetric key ● So the inefficient algorithm is only used at the beginning ● Everything after that is done with the efficient Symmetric algorithm
  • 45. Example: E-mail ● When you encrypt a message to someone, you use a Symmetric key to encrypt a message ● Then you use their Public key to encrypt the Symmetric key ● They get the message and use their Private key to decrypt the Symmetric key ● Then they use the Symmetric key to decrypt the message
  • 46. See also ● SSL certificates ● SSH tunnels ● Generally, the same techniques are used over and over ● So learn it once and you can quickly learn other uses