Dan Boneh Introduction Course Overview Online Cryptography Course Dan Boneh.

Slides:



Advertisements
Similar presentations
Trusted 3rd parties Basic key exchange
Advertisements

MAC Raushan. DES simple fiestel network 3131 PlainText Blocks 2*4=8bits 31 f f =0011 xor 0011=0000 = 0 f(r,k)=(2*r+k^2)%8 f(1,5)=(2*1+5^2)%8=3 xor 3 3.
CS 6262 Spring 02 - Lecture #7 (Tuesday, 1/29/2002) Introduction to Cryptography.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
ITS 451 – Crypto Basics1 Cryptography. ITS 451 – Crypto Basics2 A simple example… Text: U-M ASCII Encoded: “Encoding” refers.
Notation Intro. Number Theory Online Cryptography Course Dan Boneh
Mar 19, 2002Mårten Trolin1 This lecture On the assignment Certificates and key management SSL/TLS –Introduction –Phases –Commands.
15-1 Last time Internet Application Security and Privacy Public-key encryption Integrity.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
CS 555Topic 11 Cryptography CS 555 Topic 1: Overview of the Course & Introduction to Encryption.
Lesson Title: Introduction to Cryptography Dale R. Thompson Computer Science and Computer Engineering Dept. University of Arkansas
CMSC 414 Computer (and Network) Security Lecture 2 Jonathan Katz.
Chapter 5 Cryptography Protecting principals communication in systems.
8-1 What is network security? Confidentiality: only sender, intended receiver should “understand” message contents m sender encrypts message m receiver.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m.
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
8: Network Security8-1 Symmetric key cryptography symmetric key crypto: Bob and Alice share know same (symmetric) key: K r e.g., key is knowing substitution.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Network Security. Contents Security Requirements and Attacks Confidentiality with Conventional Encryption Message Authentication and Hash Functions Public-Key.
Computer Security CS 426 Lecture 3
Lecture 4 Cryptographic Tools (cont) modified from slides of Lawrie Brown.
Dan Boneh Introduction What is cryptography? Online Cryptography Course Dan Boneh.
Public Key Model 8. Cryptography part 2.
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 9: Cryptography.
Dan Boneh Introduction History Online Cryptography Course Dan Boneh.
Cryptography Lecture 1: Introduction Piotr Faliszewski.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
Cryptography, Authentication and Digital Signatures
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Midterm Review Cryptography & Network Security
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Chapter 31 Cryptography And Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Dan Boneh Introduction Discrete Probability (crash course) Online Cryptography Course Dan Boneh See also:
Dan Boneh Introduction Discrete Probability (crash course) Online Cryptography Course Dan Boneh.
Public Key Cryptography. symmetric key crypto requires sender, receiver know shared secret key Q: how to agree on key in first place (particularly if.
Dan Boneh Symmetric Encryption History Crypto. Dan Boneh History David Kahn, “The code breakers” (1996)
Network Security David Lazăr.
Part 9, Basic Cryptography 1. Introduction A cryptosystem is a tuple: ( M,K,C, E,D) where M is the set of plaintexts K the set of keys C the set of ciphertexts.
Upper OSI Layers Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
Lecture 2: Introduction to Cryptography
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
Encryption. Introduction The incredible growth of the Internet has excited businesses and consumers alike with its promise of changing the way we live.
+ Security. + What is network security? confidentiality: only sender, intended receiver should “understand” message contents sender encrypts message receiver.
Lectures so far: Today’s lecture: Discrete probability Proving things
Cryptography Lecture 2 Arpita Patra. Recall >> Crypto: Past and Present (aka Classical vs. Modern Cryto) o Scope o Scientific Basis (Formal Def. + Precise.
Dan Boneh Introduction Course Overview Online Cryptography Course Dan Boneh.
MM Clements Cryptography. Last Week Firewalls A firewall cannot protect against poor server, client or network configuration A firewall cannot.
Dan Boneh Introduction Discrete Probability (crash course, cont.) Online Cryptography Course Dan Boneh See also:
Cryptography services Lecturer: Dr. Peter Soreanu Students: Raed Awad Ahmad Abdalhalim
@Yuan Xue CS 285 Network Security Block Cipher Principle Fall 2012 Yuan Xue.
Computer Security By Rubel Biswas. Introduction History Terms & Definitions Symmetric and Asymmetric Attacks on Cryptosystems Outline.
Department of Computer Science Chapter 5 Introduction to Cryptography Semester 1.
CMSC 414 Computer and Network Security Lecture 2 Jonathan Katz.
@Yuan Xue Quick Review.
Cryptography.
B504/I538: Introduction to Cryptography
Security through Encryption
Introduction to Symmetric-key and Public-key Cryptography
Presentation transcript:

Dan Boneh Introduction Course Overview Online Cryptography Course Dan Boneh

Dan Boneh Welcome Course objectives: Learn how crypto primitives work Learn how to use them correctly and reason about security My recommendations: Take notes Pause video frequently to think about the material Answer the in-video questions

Dan Boneh Cryptography is everywhere Secure communication: – web traffic: HTTPS – wireless traffic: i WPA2 (and WEP), GSM, Bluetooth Encrypting files on disk: EFS, TrueCrypt Content protection (e.g. DVD, Blu-ray): CSS, AACS User authentication … and much much more

Dan Boneh Secure communication no eavesdropping no tampering

Dan Boneh Secure Sockets Layer / TLS Two main parts 1. Handshake Protocol: Establish shared secret key using public-key cryptography (2 nd part of course) 2. Record Layer: Transmit data using shared secret key Ensure confidentiality and integrity (1 st part of course)

Dan Boneh Protected files on disk Disk File 1 File 2 Alice No eavesdropping No tampering Analogous to secure communication: Alice today sends a message to Alice tomorrow

Dan Boneh Building block: sym. encryption E, D: cipher k: secret key (e.g. 128 bits) m, c: plaintext, ciphertext publicly known Encryption algorithm is publicly known Never use a proprietary cipher Alice E m E(k,m)=c Bob D c D(k,c)=m k k

Dan Boneh Use Cases Single use key: (one time key) Key is only used to encrypt one message encrypted new key generated for every Multi use key: (many time key) Key used to encrypt multiple messages encrypted files: same key used to encrypt many files Need more machinery than for one-time key

Dan Boneh Things to remember Cryptography is: – A tremendous tool – The basis for many security mechanisms Cryptography is not: – The solution to all security problems – Reliable unless implemented and used properly – Something you should try to invent yourself many many examples of broken ad-hoc designs

Dan Boneh End of Segment

Dan Boneh Introduction What is cryptography? Online Cryptography Course Dan Boneh

Dan Boneh Crypto core Secret key establishment: Secure communication: attacker??? k k confidentiality and integrity m1m1 m2m2 Alice Bob Talking to Alice Talking to Bob

Dan Boneh But crypto can do much more Digital signatures Anonymous communication Alice signature Alice Who did I just talk to? Bob

Dan Boneh Alice But crypto can do much more Digital signatures Anonymous communication Anonymous digital cash – Can I spend a “digital coin” without anyone knowing who I am? – How to prevent double spending? Who was that? Internet 1$ (anon. comm.)

Dan Boneh Protocols Elections Private auctions

Dan Boneh Protocols Elections Private auctions Secure multi-party computation Goal: compute f(x 1, x 2, x 3, x 4 ) “Thm:” anything that can done with trusted auth. can also be done without trusted authority

Dan Boneh Crypto magic Privately outsourcing computation Zero knowledge (proof of knowledge) Alice search query What did she search for? results I know the factors of N !! proof π ??? E[ query ] E[ results ] Alice N=p∙q Bob N

Dan Boneh A rigorous science The three steps in cryptography: Precisely specify threat model Propose a construction Prove that breaking construction under threat mode will solve an underlying hard problem

Dan Boneh End of Segment

Dan Boneh Introduction History Online Cryptography Course Dan Boneh

Dan Boneh History David Kahn, “The code breakers” (1996)

Dan Boneh Symmetric Ciphers

Dan Boneh Few Historic Examples (all badly broken) 1. Substitution cipher k :=

Dan Boneh Caesar Cipher (no key)

Dan Boneh What is the size of key space in the substitution cipher assuming 26 letters?

Dan Boneh How to break a substitution cipher? What is the most common letter in English text? “X” “L” “E” “H”

Dan Boneh How to break a substitution cipher? (1) Use frequency of English letters (2) Use frequency of pairs of letters (digrams)

Dan Boneh An Example UKBYBIPOUZBCUFEEBORUKBYBHOBBRFESPVKBWFOFERVNBCVBZPRUBOFERVNBCVBPCYYFVUFO FEIKNWFRFIKJNUPWRFIPOUNVNIPUBRNCUKBEFWWFDNCHXCYBOHOPYXPUBNCUBOYNRVNIWN CPOJIOFHOPZRVFZIXUBORJRUBZRBCHNCBBONCHRJZSFWNVRJRUBZRPCYZPUKBZPUNVPWPCYVF ZIXUPUNFCPWRVNBCVBRPYYNUNFCPWWJUKBYBIPOUZBCUIPOUNVNIPUBRNCHOPYXPUBNCUB OYNRVNIWNCPOJIOFHOPZRNCRVNBCUNENVVFZIXUNCHPCYVFZIXUPUNFCPWZPUKBZPUNVR B36 N34 U33 P32 C26  E  T  A NC11 PU10 UB10 UN9  IN  AT UKB6 RVN6 FZI4  THE digrams trigrams

Dan Boneh 2. Vigener cipher (16’th century, Rome) k = C R Y P T O C R Y P T O m = W H A T A N I C E D A Y T O D A Y C R Y P T (+ mod 26) c = Z Z Z J U C L U D T U N W G C Q S suppose most common = “H” first letter of key = “H” – “E” = “C”

Dan Boneh 3. Rotor Machines ( ) Early example: the Hebern machine (single rotor) ABC..XYZABC..XYZ ABC..XYZABC..XYZ KST..RNEKST..RNE KST..RNEKST..RNE EKST..RNEKST..RN EKST..RNEKST..RN NEKST..RNEKST..R NEKST..RNEKST..R key

Dan Boneh Rotor Machines (cont.) Most famous: the Enigma (3-5 rotors) # keys = 26 4 = 2 18 (actually 2 36 due to plugboard)

Dan Boneh 4. Data Encryption Standard (1974) DES: # keys = 2 56, block size = 64 bits Today: AES (2001), Salsa20 (2008) (and many others)

Dan Boneh End of Segment

Dan Boneh Introduction Discrete Probability (crash course, cont.) Online Cryptography Course Dan Boneh See also:

Dan Boneh U: finite set (e.g. U = {0,1} n ) Def: Probability distribution P over U is a function P: U [0,1] such that Σ P(x) = 1 Examples: 1.Uniform distribution:for all x ∈ U: P(x) = 1/|U| 2.Point distribution at x 0 :P(x 0 ) = 1, ∀ x≠x 0 : P(x) = 0 Distribution vector: ( P(000), P(001), P(010), …, P(111) ) x∈Ux∈U

Dan Boneh Events For a set A ⊆ U: Pr[A] = Σ P(x) ∈ [0,1] The set A is called an event Example: U = {0,1} 8 A = { all x in U such that lsb 2 (x)=11 } ⊆ U for the uniform distribution on {0,1} 8 : Pr[A] = 1/4 x∈Ax∈A note: Pr[U]=1

Dan Boneh The union bound For events A 1 and A 2 Pr [ A 1 ∪ A 2 ] ≤ Pr[A 1 ] + Pr[A 2 ] Example: A 1 = { all x in {0,1} n s.t lsb 2 (x)=11 } ; A 2 = { all x in {0,1} n s.t. msb 2 (x)=11 } Pr [ lsb 2 (x)= 11 or msb 2 (x)= 11 ] = Pr [ A 1 ∪ A 2 ] ≤ ¼+¼ = ½ A 1 A2A2 A2A2

Dan Boneh Random Variables Def: a random variable X is a function X:UV Example: X: {0,1} n {0,1} ; X(y) = lsb(y) ∈ {0,1} For the uniform distribution on U: Pr[ X=0 ] = 1/2, Pr[ X=1 ] = 1/2 More generally: rand. var. X induces a distribution on V: Pr[ X=v ] := Pr [ X -1 (v) ] lsb=1 0 1 lsb=0 UV

Dan Boneh The uniform random variable Let U be some set, e.g. U = {0,1} n We write r U to denote a uniform random variable over U for all a ∈ U: Pr [ r = a ] = 1/|U| ( formally, r is the identity function: r(x)=x for all x ∈ U ) R

Dan Boneh Let r be a uniform random variable on {0,1} 2 Define the random variable X = r 1 + r 2 Then Pr[X=2] = ¼ Hint: Pr[X=2] = Pr[ r=11 ]

Dan Boneh Randomized algorithms Deterministic algorithm: y A(m) Randomized algorithm y A( m ; r ) where r {0,1} n output is a random variable y A( m ) Example: A(m ; k) = E(k, m), y A( m ) A(m) m inputs outputs A(m) m R R R

Dan Boneh End of Segment

Dan Boneh Introduction Discrete Probability (crash course, cont.) Online Cryptography Course Dan Boneh See also:

Dan Boneh Recap U: finite set (e.g. U = {0,1} n ) Prob. distr. P over U is a function P: U [0,1] s.t. Σ P(x) = 1 A ⊆ U is called an event and Pr[A] = Σ P(x) ∈ [0,1] A random variable is a function X:UV. X takes values in V and defines a distribution on V x∈Ux∈U x∈Ax∈A

Dan Boneh Independence Def: events A and B are independent if Pr[ A and B ] = Pr[A] ∙ Pr[B] random variables X,Y taking values in V are independent if ∀ a,b ∈ V: Pr[ X=a and Y=b] = Pr[X=a] ∙ Pr[Y=b] Example: U = {0,1} 2 = {00, 01, 10, 11} and r U Define r.v. X and Y as: X = lsb(r), Y = msb(r) Pr[ X=0 and Y=0 ] = Pr[ r=00 ] = ¼ = Pr[X=0] ∙ Pr[Y=0] R

Dan Boneh Review: XOR XOR of two strings in {0,1} n is their bit-wise addition mod ⊕

Dan Boneh An important property of XOR Thm:Y a rand. var. over {0,1} n, X an indep. uniform var. on {0,1} n Then Z := YX is uniform var. on {0,1} n Proof: (for n=1) Pr[ Z=0 ] =

Dan Boneh The birthday paradox Let r 1, …, r n ∈ U be indep. identically distributed random vars. Thm: when n = 1.2 × |U| 1/2 then Pr [ ∃ i≠j: r i = r j ] ≥ ½ Example: Let U = {0,1} 128 After sampling about 2 64 random messages from U, some two sampled messages will likely be the same notation: |U| is the size of U

Dan Boneh |U|=10 6 # samples n collision probability

Dan Boneh End of Segment