Theory and Practice of
    Cryptography
  From Classical to Modern
About this Course

All course materials: http://saweis.net/crypto.shtml

Four Lectures:
 1. History and foundations of modern cryptography.
 2. Using cryptography in practice and at Google.
 3. Theory of cryptography: proofs and definitions.
 4. A special topic in cryptography.
Classic Definition of Cryptography

Kryptósgráfo , or the art of "hidden writing", classically meant
hiding the contents or existence of messages from an
adversary.

Informally, encryption renders the contents of a message
unintelligible to anyone not possessing some secret
information.

Steganography, or "covered writing", is concerned with hiding
the existence of a message -- often in plain sight.
Scytale Transposition Cipher
Caesar Substitution Cipher
Zodiac Cipher
Vigenère Polyalphabetic Substitution

                      Key:
                      GOOGLE
                      Plaintext:
                      BUYYOUTUBE
                      Ciphertext:
                      HIMEZYZIPK
Rotor-based Polyalphabetic Ciphers
Steganography

 He rodotus tattoo and wax tablets

 Inv is ible ink

 Mic rodots

 "Th e Finger"

 Priso n gang codes

 Low-order bits
Codes

Codes replace a specific piece of plaintext with a predefined
code word. Codes are essentially a substitution cipher, but can
replace strings of symbols rather than just individual symbols.

Examples:
   "One if by land, two if by sea."

   Beale code

   Numbers stations

   ECB Mode
Kerckhoffs' Principle


A cryptosystem should be secure even if everything
about it is public knowledge except the secret key.

    Do not rely on "security through obscurity".
One-Time Pads

Generate a random key of equal length to your message, then
exclusive-or (XOR) the key with your message.

This is information theoretically secure...but:
   "To transmit a large secret message, first transmit a large
   secret message"

   One time means one time.

   Need to transmit a key per message per recipient.

   Keys are as big as messages.
Problems with Classical Crypto

Weak: Pen and paper, and mechanical cryptosystems became
weak in the face of modern computers.

Informal: Constructions were ad hoc. There weren't publicly
available security definitions or proofs of security.

Closed: Cryptographic knowledge and technology was primarily
only available to military or intelligence agencies.

Key distribution: The number of keys in the system grows
quadratically with the number of parties.
Modern Cryptographic Era

 Standardization of cryptographic primitives

 Invention of public key cryptography

 Formalization of security definitions

 Growth of computing and the internet

 Liberalization of cryptographic restrictions
Government Standardization

 Data Encryption Standard (DES): A strong, standardized
 56-bit cipher designed for modern computers

 Originally designed by IBM and called "Lucifer". Tweaked by
 the NSA and published in 1975.

 In 1999, a DES key was brute forced in 24 hours for $100K
 Triple DES (3DES): Effectively 112-bit cipher. Still in use.

 Advanced Encryption Standard (AES) is modern heir to
 DES, and was designed by academics in a public
 competition.

 AES supports 128-bit and larger keys.
Key Distribution Problem


  How do Alice and Bob first agree on a shared key?

  What happens if either party is compromised?

  What happens when Carol wants to talk to Alice and Bob?
Diffie-Hellman Key Exchange

Diffie-Hellman-Merkle (1976) / Williamson (1974):
Generate a shared secret with a stranger over a public channel.
1. Alice picks a group G, generator g, and a random value x
2. Alice computes A = g^x and sends Bob (G, g, A)
3. Bob picks a random y, computes B = gy, and sends Alice B
4. Alice computes K = B^x = g^(xy)
5. Bob computes K = A^y = g^(xy)

                Eve's sees (G, g, A, B) = (G, g, g^x, g^y)
                How hard is it for her to compute g^(xy)?
Note: "^" is the power operator, not an XOR
Diffie-Hellman Key Exchange

Does this solve the key distribution problem? Not quite..
  Still need to establish n^2 keys for n people or conduct
  interactive key exchange protocols for each message.

   Computation over appropriate groups can be expensive

   Vulnerable to a man in the middle attack
Public Key Encryption

What if you could publish a "public" key that anyone could use
to encrypt, but not decrypt messages?
 1. A public key cryptosystem consists of (G, E, D).
 2. Alice generates a key pair: G(r)→(PKa, SKa)
 3. Alice publishes her public key PKa
 4. Bob encrypts a message with her public key: E(PKa,m) → c
 5. Alice decrypts a ciphertext with her secret key: D(SKa,c) →
    m
Public Key Encryption

Nice properties:
   Only one key per person, not per pair.

   Can communicate with a stranger without agreeing on a
   key.

Problems with public key cryptography:
   Is this even possible?

   How do you get Alice's public key?

   Why do you trust the ciphertext?
RSA Encryption

Published in 1977 / Cocks 1973

Based on hardness of factoring products of large primes.
1. Setup: n = pq, PK = (e, n), SK = d, ed = 1 mod (p-1)(q-1)
2. E(PK, m) = m^e (mod n) = c
3. D(SK, c) = c^d (mod n) = m^(ed) (mod n) = m

Problems?
   Ciphertext is fixed size
   Computation is still relatively expensive.
   Why do you trust the ciphertext has not been modified?
   Not semantically secure (lecture 3)
What about authentication?

  How do we know Alice is Alice?

  How do we know a message originated from Alice?

  How do we know Alice's message was not altered in transit?
Message Authentication Codes

 Alice and Bob share a secret key k.

 Either can sign (or MAC) a message: Sign(k, m)→ σ

 The recipient can verify the signature: Verify(k, m, σ)

 Often built from other primitives

 Similar key distribution problems to ciphers
Public Key Signatures

Only you can sign messages, but anyone in the world can
verify them. Public-key analog of a MAC.
 1. A public key signature scheme consists of (G, Sign, Ver).
 2. Alice generates a key pair: G(r)→(VKa, SKa)
 3. Alice publishes her verifying key VKa
 4. Alice signs a message: Sign(SKa, m) → σ
 5. Bob verifies a signature with her verifying key: Ver(VKa,m)
Public Key Signatures

  Is a public key signature scheme possible?

  How do we distribute verification keys?

  RSA is fixed size. How do we sign big messages?
Message Digests

 Message digests compress input to fixed length strings.

 No keys involved.

 One-wayness: It is hard to find an input that hashes to a
 pre-specified value.

 Collision resistance: Finding any two inputs having the
 same hash-value is difficult.

 Fixed-length public signature schemes can sign digests
 instead of the actual message.
Key Distribution: Still a problem

How do you know someone's public key is their own?
  Certificates: A signature on a public key or another
  certificate

   PKI: A graph of relationships between keys.
      Certificate authorities
      A "web-of-trust" social graph

How do we revoke keys?
  Expiration dates

   Certificate Revocation Lists
The Rest of the Course

Exercise Set 1: Posted on http://go/cryptocourse

Lecture 2: Using cryptography in practice. Engineering-oriented

Lecture 3: Theory of cryptography. Math-oriented.

Lecture 4: A special crypto topic. General audience.

More Related Content

PDF
Ch12 Encryption
PPTX
Cryptography and network security
PDF
computer-security-and-cryptography-a-simple-presentation
PPT
Cryptography - A Brief History
PPT
Is case study
DOCX
Data encryption standard
PPTX
Introduction to Cryptography
PPTX
Information and network security 31 public key cryptography
Ch12 Encryption
Cryptography and network security
computer-security-and-cryptography-a-simple-presentation
Cryptography - A Brief History
Is case study
Data encryption standard
Introduction to Cryptography
Information and network security 31 public key cryptography

What's hot (20)

PDF
Introduction to Cryptography
PPTX
Different types of Symmetric key Cryptography
PPT
Network Security & Cryptography
PPTX
Cryptography
PPT
Internet security
PPT
13 asymmetric key cryptography
PPT
Network security cryptography ppt
PPT
Cryptography
PPSX
Introductory Lecture on Cryptography and Information Security
PPT
Cryptography
PPT
Cryptography - An Overview
PPTX
Cryptography and Network Security
PPT
Cryptography Intro
PDF
Chapter8 nov 29_05[one.]
PPT
Network Security and Cryptography
PPTX
Cryptography
PPT
Public key cryptography and RSA
PPTX
Cryptography
PPTX
Cryptography
PPTX
Cryptography and network security
Introduction to Cryptography
Different types of Symmetric key Cryptography
Network Security & Cryptography
Cryptography
Internet security
13 asymmetric key cryptography
Network security cryptography ppt
Cryptography
Introductory Lecture on Cryptography and Information Security
Cryptography
Cryptography - An Overview
Cryptography and Network Security
Cryptography Intro
Chapter8 nov 29_05[one.]
Network Security and Cryptography
Cryptography
Public key cryptography and RSA
Cryptography
Cryptography
Cryptography and network security
Ad

Viewers also liked (20)

PPTX
PDF
320.1-Cryptography
PPTX
Types of ssl commands and keytool
PDF
Evaluating Open Source Security Software
PDF
LibreSSL, one year later
PDF
OpenSSL User Manual and Data Format
PPTX
Attack presentation
PDF
OpenSSL programming (still somewhat initial version)
PDF
Sécurité des bd
PPT
How to create Self-Sign Certificate by using OpenSSL
PPT
How to use OpenPGP for Email Encryption & Signing
PPSX
Computer and internet security
ODP
Applying Security Algorithms Using openSSL crypto library
PPT
(Crypto) DES And RSA Algorithms Overview
PDF
OpenSSL Basic Function Call Flow
PPTX
Engineering Cryptographic Applications: Symmetric Encryption
PDF
Forced repetitions over alphabet lists
PDF
Pki and OpenSSL
PDF
Intro to Cryptography
KEY
320.1-Cryptography
Types of ssl commands and keytool
Evaluating Open Source Security Software
LibreSSL, one year later
OpenSSL User Manual and Data Format
Attack presentation
OpenSSL programming (still somewhat initial version)
Sécurité des bd
How to create Self-Sign Certificate by using OpenSSL
How to use OpenPGP for Email Encryption & Signing
Computer and internet security
Applying Security Algorithms Using openSSL crypto library
(Crypto) DES And RSA Algorithms Overview
OpenSSL Basic Function Call Flow
Engineering Cryptographic Applications: Symmetric Encryption
Forced repetitions over alphabet lists
Pki and OpenSSL
Intro to Cryptography
Ad

Similar to b (20)

PPT
Crypt
PDF
Chapter 8 cryptography lanjutan
PPT
1329 n 9460
PPTX
Security
PDF
international security system data threats
PDF
PRINCIPLES OF INFORMATION SYSTEM SECURITY
PDF
Intro to Cryptography
PPT
Cryptography
PPTX
CNS 3RD UNIT PPT.pptx
PPT
Ch12 Cryptography it-slideshares.blogspot.com
PPT
Cryptography Lecture by Sam Bowne
PPT
Stallings Kurose and Ross
PPT
Crypto2
DOC
DOCS ON NETWORK SECURITY
DOC
PPTX
Introduction to Cryptography CYB 303.pptx
PPT
Introduction To PKI Technology
PPT
CISSP EXAM PREPARATION FOR A PASSED SCORE
PPTX
Information system security Unit 2.pptx
PPTX
UNIT-IV.pptx
Crypt
Chapter 8 cryptography lanjutan
1329 n 9460
Security
international security system data threats
PRINCIPLES OF INFORMATION SYSTEM SECURITY
Intro to Cryptography
Cryptography
CNS 3RD UNIT PPT.pptx
Ch12 Cryptography it-slideshares.blogspot.com
Cryptography Lecture by Sam Bowne
Stallings Kurose and Ross
Crypto2
DOCS ON NETWORK SECURITY
Introduction to Cryptography CYB 303.pptx
Introduction To PKI Technology
CISSP EXAM PREPARATION FOR A PASSED SCORE
Information system security Unit 2.pptx
UNIT-IV.pptx

More from Balaji Ravi (17)

PDF
Quest_Software_Best_Practices_for_Exchange_2007
DOC
forgot_administrator_password.htm
DOC
lost-xp-password.html
PDF
Upgrading_and_Migrating_to_Exchange_Server_2007_and_Windows_2008
PDF
1.Routing-eng
PDF
Practical-LDAP-and-Linux
DOC
bldef_ap.htm
PDF
exch2003
PDF
L03-ajc-C-arrays
PDF
10307021
DOC
show.php.htm
PDF
PDF
3852_wlan_revised
PDF
cryptography
PDF
Virtualizing_Exchange2003
PPT
Balaji
Quest_Software_Best_Practices_for_Exchange_2007
forgot_administrator_password.htm
lost-xp-password.html
Upgrading_and_Migrating_to_Exchange_Server_2007_and_Windows_2008
1.Routing-eng
Practical-LDAP-and-Linux
bldef_ap.htm
exch2003
L03-ajc-C-arrays
10307021
show.php.htm
3852_wlan_revised
cryptography
Virtualizing_Exchange2003
Balaji

b

  • 1. Theory and Practice of Cryptography From Classical to Modern
  • 2. About this Course All course materials: http://saweis.net/crypto.shtml Four Lectures: 1. History and foundations of modern cryptography. 2. Using cryptography in practice and at Google. 3. Theory of cryptography: proofs and definitions. 4. A special topic in cryptography.
  • 3. Classic Definition of Cryptography Kryptósgráfo , or the art of "hidden writing", classically meant hiding the contents or existence of messages from an adversary. Informally, encryption renders the contents of a message unintelligible to anyone not possessing some secret information. Steganography, or "covered writing", is concerned with hiding the existence of a message -- often in plain sight.
  • 7. Vigenère Polyalphabetic Substitution Key: GOOGLE Plaintext: BUYYOUTUBE Ciphertext: HIMEZYZIPK
  • 9. Steganography He rodotus tattoo and wax tablets Inv is ible ink Mic rodots "Th e Finger" Priso n gang codes Low-order bits
  • 10. Codes Codes replace a specific piece of plaintext with a predefined code word. Codes are essentially a substitution cipher, but can replace strings of symbols rather than just individual symbols. Examples: "One if by land, two if by sea." Beale code Numbers stations ECB Mode
  • 11. Kerckhoffs' Principle A cryptosystem should be secure even if everything about it is public knowledge except the secret key. Do not rely on "security through obscurity".
  • 12. One-Time Pads Generate a random key of equal length to your message, then exclusive-or (XOR) the key with your message. This is information theoretically secure...but: "To transmit a large secret message, first transmit a large secret message" One time means one time. Need to transmit a key per message per recipient. Keys are as big as messages.
  • 13. Problems with Classical Crypto Weak: Pen and paper, and mechanical cryptosystems became weak in the face of modern computers. Informal: Constructions were ad hoc. There weren't publicly available security definitions or proofs of security. Closed: Cryptographic knowledge and technology was primarily only available to military or intelligence agencies. Key distribution: The number of keys in the system grows quadratically with the number of parties.
  • 14. Modern Cryptographic Era Standardization of cryptographic primitives Invention of public key cryptography Formalization of security definitions Growth of computing and the internet Liberalization of cryptographic restrictions
  • 15. Government Standardization Data Encryption Standard (DES): A strong, standardized 56-bit cipher designed for modern computers Originally designed by IBM and called "Lucifer". Tweaked by the NSA and published in 1975. In 1999, a DES key was brute forced in 24 hours for $100K Triple DES (3DES): Effectively 112-bit cipher. Still in use. Advanced Encryption Standard (AES) is modern heir to DES, and was designed by academics in a public competition. AES supports 128-bit and larger keys.
  • 16. Key Distribution Problem How do Alice and Bob first agree on a shared key? What happens if either party is compromised? What happens when Carol wants to talk to Alice and Bob?
  • 17. Diffie-Hellman Key Exchange Diffie-Hellman-Merkle (1976) / Williamson (1974): Generate a shared secret with a stranger over a public channel. 1. Alice picks a group G, generator g, and a random value x 2. Alice computes A = g^x and sends Bob (G, g, A) 3. Bob picks a random y, computes B = gy, and sends Alice B 4. Alice computes K = B^x = g^(xy) 5. Bob computes K = A^y = g^(xy) Eve's sees (G, g, A, B) = (G, g, g^x, g^y) How hard is it for her to compute g^(xy)? Note: "^" is the power operator, not an XOR
  • 18. Diffie-Hellman Key Exchange Does this solve the key distribution problem? Not quite.. Still need to establish n^2 keys for n people or conduct interactive key exchange protocols for each message. Computation over appropriate groups can be expensive Vulnerable to a man in the middle attack
  • 19. Public Key Encryption What if you could publish a "public" key that anyone could use to encrypt, but not decrypt messages? 1. A public key cryptosystem consists of (G, E, D). 2. Alice generates a key pair: G(r)→(PKa, SKa) 3. Alice publishes her public key PKa 4. Bob encrypts a message with her public key: E(PKa,m) → c 5. Alice decrypts a ciphertext with her secret key: D(SKa,c) → m
  • 20. Public Key Encryption Nice properties: Only one key per person, not per pair. Can communicate with a stranger without agreeing on a key. Problems with public key cryptography: Is this even possible? How do you get Alice's public key? Why do you trust the ciphertext?
  • 21. RSA Encryption Published in 1977 / Cocks 1973 Based on hardness of factoring products of large primes. 1. Setup: n = pq, PK = (e, n), SK = d, ed = 1 mod (p-1)(q-1) 2. E(PK, m) = m^e (mod n) = c 3. D(SK, c) = c^d (mod n) = m^(ed) (mod n) = m Problems? Ciphertext is fixed size Computation is still relatively expensive. Why do you trust the ciphertext has not been modified? Not semantically secure (lecture 3)
  • 22. What about authentication? How do we know Alice is Alice? How do we know a message originated from Alice? How do we know Alice's message was not altered in transit?
  • 23. Message Authentication Codes Alice and Bob share a secret key k. Either can sign (or MAC) a message: Sign(k, m)→ σ The recipient can verify the signature: Verify(k, m, σ) Often built from other primitives Similar key distribution problems to ciphers
  • 24. Public Key Signatures Only you can sign messages, but anyone in the world can verify them. Public-key analog of a MAC. 1. A public key signature scheme consists of (G, Sign, Ver). 2. Alice generates a key pair: G(r)→(VKa, SKa) 3. Alice publishes her verifying key VKa 4. Alice signs a message: Sign(SKa, m) → σ 5. Bob verifies a signature with her verifying key: Ver(VKa,m)
  • 25. Public Key Signatures Is a public key signature scheme possible? How do we distribute verification keys? RSA is fixed size. How do we sign big messages?
  • 26. Message Digests Message digests compress input to fixed length strings. No keys involved. One-wayness: It is hard to find an input that hashes to a pre-specified value. Collision resistance: Finding any two inputs having the same hash-value is difficult. Fixed-length public signature schemes can sign digests instead of the actual message.
  • 27. Key Distribution: Still a problem How do you know someone's public key is their own? Certificates: A signature on a public key or another certificate PKI: A graph of relationships between keys. Certificate authorities A "web-of-trust" social graph How do we revoke keys? Expiration dates Certificate Revocation Lists
  • 28. The Rest of the Course Exercise Set 1: Posted on http://go/cryptocourse Lecture 2: Using cryptography in practice. Engineering-oriented Lecture 3: Theory of cryptography. Math-oriented. Lecture 4: A special crypto topic. General audience.