CS555Spring 2012/Topic 31 Cryptography CS 555 Topic 3: One-time Pad and Perfect Secrecy.

Slides:



Advertisements
Similar presentations
CMSC 414 Computer (and Network) Security Lecture 4 Jonathan Katz.
Advertisements

CS555Topic 191 Cryptography CS 555 Topic 19: Formalization of Public Key Encrpytion.
1 Cryptanalysis-tolerant CPA crypt. ● Suppose E, E’ are two encryption schemes which on of them is CPA - secure  E.g., a standard and a proprietary, a.
CIS 5371 Cryptography 3b. Pseudorandomness.
1 Introduction CSE 5351: Introduction to cryptography Reading assignment: Chapter 1 of Katz & Lindell.
Lecture 2.1: Private Key Cryptography -- I CS 436/636/736 Spring 2013 Nitesh Saxena.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Ref. Cryptography: theory and practice Douglas R. Stinson
CMSC 414 Computer and Network Security Lecture 4 Jonathan Katz.
Asymmetric Cryptography part 1 & 2 Haya Shulman Many thanks to Amir Herzberg who donated some of the slides from
Princeton University COS 433 Cryptography Fall 2005 Boaz Barak COS 433: Cryptography Princeton University Fall 2005 Boaz Barak Lecture 2: Perfect Secrecy.
CS470, A.SelcukIntroduction1 CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
CS555Spring 2012/Topic 41 Cryptography CS 555 Topic 4: Computational Approach to Cryptography.
Princeton University COS 433 Cryptography Fall 2005 Boaz Barak COS 433: Cryptography Princeton University Fall 2005 Boaz Barak Lecture 2: Perfect Secrecy.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Computer Security CS 426 Lecture 3
CMSC 414 Computer and Network Security Lecture 3 Jonathan Katz.
Dan Boneh Stream ciphers The One Time Pad Online Cryptography Course Dan Boneh.
CS526Topic 3: One-time Pad and Perfect Secrecy 1 Information Security CS 526 Topic 3 Cryptography: One-time Pad, Information Theoretic Security, and Stream.
Cryptography Lecture 8 Stefan Dziembowski
One-Time Pad Or Vernam Cipher Sayed Mahdi Mohammad Hasanzadeh Spring 2004.
CS555Spring 2012/Topic 51 Cryptography CS 555 Topic 5: Pseudorandomness and Stream Ciphers.
Topic 21 Cryptography CS 555 Topic 2: Evolution of Classical Cryptography CS555.
Introduction to cryptography by konrad. Introduction to cryptography Cryptography is the process of encrypting/decrypting data streams using some E(M)/D(M)
CS555Spring 2012/Topic 111 Cryptography CS 555 Topic 11: Encryption Modes and CCA Security.
Traditional Symmetric-Key Ciphers
Cryptography Lecture 2 Arpita Patra. Summary of Last Class  Introduction  Secure Communication in Symmetric Key setting >> SKE is the required primitive.
1 Information Theory Nathanael Paul Oct. 09, 2002.
CS426Fall 2010/Lecture 251 Computer Security CS 426 Lecture 26 Review of Some Mid-Term Problems.
Secure Computation Lecture Arpita Patra. Recap >> Improving the complexity of GMW > Step I: Offline: O(n 2 c AND ) OTs; Online: i.t., no crypto.
Lectures so far: Today’s lecture: Discrete probability Proving things
CS555Spring 2012/Topic 71 Cryptography CS 555 Topic 7: Stream Ciphers and CPA Security.
Cryptography Lecture 2 Arpita Patra. Recall >> Crypto: Past and Present (aka Classical vs. Modern Cryto) o Scope o Scientific Basis (Formal Def. + Precise.
Cryptography Lecture 4 Arpita Patra. Recall o Various Definitions and their equivalence (Shannon’s Theorem) o Inherent Drawbacks o Cannot afford perfect.
CS555Spring 2012/Topic 81 Cryptography CS 555 Topic 8: Pseudorandom Functions and CPA Security.
CS526Topic 2: Classical Cryptography1 Information Security CS 526 Topic 2 Cryptography: Terminology & Classic Ciphers.
CS555Spring 2012/Topic 151 Cryptography CS 555 Topic 15: HMAC, Combining Encryption & Authentication.
Cryptography Lecture 3 Arpita Patra © Arpita Patra.
หัวข้อบรรยาย Stream cipher RC4 WEP (in)security LFSR CSS (in)security.
CS555Spring 2012/Topic 141 Cryptography CS 555 Topic 14: CBC-MAC & Hash Functions.
Authenticated encryption
Secrecy of (fixed-length) stream ciphers
Cryptography Lecture 3.
Cryptography Lecture 12.
B504/I538: Introduction to Cryptography
Cryptography Lecture 2 Arpita Patra © Arpita Patra.
Cryptography Lecture 4.
Topic 5: Constructing Secure Encryption Schemes
Topic 30: El-Gamal Encryption
Topic 3: Perfect Secrecy
Cryptography Lecture 3 Arpita Patra © Arpita Patra.
Cryptography Lecture 2 Arpita Patra © Arpita Patra.
CMSC 414 Computer and Network Security Lecture 3
Cryptography Lecture 6.
Topic 7: Pseudorandom Functions and CPA-Security
B504/I538: Introduction to Cryptography
Cryptography Lecture 4.
Cryptography Lecture 5.
Topic 13: Message Authentication Code
Cryptography Lecture 3.
Information Security CS 526 Topic 3
Cryptography Lecture 3.
Cryptography Lecture 11.
2. Perfect Secret Encryption
CIS 5371 Cryptography 2. Perfect Secret Encryption
Presentation transcript:

CS555Spring 2012/Topic 31 Cryptography CS 555 Topic 3: One-time Pad and Perfect Secrecy

CS555Spring 2012/Topic 32 Outline and Readings Outline One-time pad Perfect secrecy Limitation of perfect secrecy Usages of one-time pad Readings: Katz and Lindell: Chapter 2

CS555Spring 2012/Topic 33 One-Time Pad Fix the vulnerability of the Vigenere cipher by using very long keys Key is a random string that is at least as long as the plaintext Encryption is similar to shift cipher Invented by Vernam in the 1920s

CS555Spring 2012/Topic 34 One-Time Pad Let Z m ={0,1,…,m-1} be the alphabet. Plaintext space = Ciphtertext space = Key space = (Z m ) n The key is chosen uniformly randomly Plaintext X = (x 1 x 2 … x n ) Key K = (k 1 k 2 … k n ) Ciphertext Y = (y 1 y 2 … y n ) e k (X) = (x 1 +k 1 x 2 +k 2 … x n +k n ) mod m d k (Y) = (y 1 -k 1 y 2 -k 2 … y n -k n ) mod m

CS555Spring 2012/Topic 35 The Binary Version of One-Time Pad Plaintext space = Ciphtertext space = Keyspace = {0,1} n Key is chosen randomly For example: Plaintext is Key is Then ciphertext is

CS555Spring 2012/Topic 36 Bit Operators Bit AND 0  0 = 0 0  1 = 0 1  0 = 0 1  1 = 1 Bit OR 0  0 = 0 0  1 = 1 1  0 = 1 1  1 = 1 Addition mod 2 (also known as Bit XOR) 0  0 = 0 0  1 = 1 1  0 = 11  1 = 0 Can we use operators other than Bit XOR for binary version of One-Time Pad?

CS555Spring 2012/Topic 37 How Good is One-Time Pad? Intuitively, it is secure … –The key is random, so the ciphertext is completely random How to formalize the confidentiality requirement? –Want to say “certain thing” is not learnable by the adversary (who sees the ciphertext). But what is the “certain thing”? Which (if any) of the following is the correct answer? –The key. –The plaintext. –Any bit of the plaintext. –Any information about the plaintext. E.g., the first bit is 1, the parity is 0, or that the plaintext is not “aaaa”, and so on

Spring 2012/Topic 38 Perfect Secrecy: Shannon (Information-Theoretic) Security Basic Idea: Ciphertext should provide no “information” about Plaintext Have several equivalent formulations: –The two random variables M and C are independent –Observing what values C takes does not change what one believes the distribution M is –Knowing what is value of M does not change the distribution of C –Encrypting two different messages m 0 and m 1 results in exactly the same distribution. CS555

Perfect Secrecy Definition 1 Definition 2.1 (From textbook). (Gen,Enc,Dec) over a message space M is perfectly secure if  probability distribution over M  message m  M  ciphertext c  C for which Pr[C=c] > 0 We have Pr [M=m | C=c] = Pr [M = m]. CS555Spring 2012/Topic 39

Perfect Secrecy Definition 0 Definition. (Gen,Enc,Dec) over a message space M is perfectly secure if  probability distribution over M The random variables M and C are independent. That is,  message m  M  ciphertext c  C Pr [M=m  C=c] = Pr [M = m] Pr [C = c] CS555Spring 2012/Topic 310

Definition 0 equiv. Definition 1 Definition 0 implies Definition 1 –Idea: Given Pr [M=m  C=c] = Pr [M = m] Pr [C = c], for any c such that Pr [C = c] > 0, divide both sides of the above with Pr [C = c], we have Pr [M=m | C=c] = Pr [M = m]. Definition 1 implies Definition 0 –Idea:  c  C s.t. Pr[C=c] > 0 Pr [M=m | C=c] = Pr [M = m], multiple both side by Pr[C=c], obtain Pr [M=m  C=c] = Pr [M = m] Pr [C = c]  c  C s.t. Pr[C=c] = 0 we have Pr [M=m  C=c] = 0 = Pr [M=m] Pr[C=c] CS555Spring 2012/Topic 311

Perfect Secrecy. Definition 2. Definition in Lemma 2.2. (Gen,Enc,Dec) over a message space M is perfectly secure if  probability distribution over M  message m  M (assuming Pr[M=m]>0)  ciphertext c  C We have Pr [C=c | M=m] = Pr [C = c]. Equivalence with Definition 0 straightforward. CS555Spring 2012/Topic 312

Perfect Indistinguishability Definition in Lemma 2.3. (Gen,Enc,Dec) over a message space M is perfectly secure if  probability distribution over M  messages m 0,m 1  M  ciphertext c  C We have Pr [C=c | M=m 0 ] = Pr [C=c | M=m 1 ] To prove that this definition implies Definition 0, consider Pr [C=c]. CS555Spring 2012/Topic 313

Adversarial Indistinguishability Define an experiment called PrivK eav : –Involving an Adversary and a Challenger –Instantiated with an Adv algorithm A, and an encryption scheme  = (Gen, Enc, Dec) CS555Spring 2012/Topic 314 Challenger Adversary k  Gen() b  R {0,1} chooses m 0, m 1  M m 0, m 1 C=E k [m b ] b’  {0,1} PrivK eav = 1 if b=b’, and PrivK eav = 0 if b  b’

Adversarial Indistinguishability (con’d) Definition 2.4. (Gen,Enc,Dec) over a message space M is perfectly secure if  adversary A it holds that Pr[PrivK eav A,  =1] = ½ Proposition 2.5. Definition 2.1 is equivalent to Definition 2.4. CS555Spring 2012/Topic 315

CS555Spring 2012/Topic 316 Perfect Secrecy Fact: When keys are uniformly chosen in a cipher, a deterministic cipher has Shannon security iff. the number of keys encrypting m to c is the same for any pair of (m,c) One-time pad has perfect secrecy (Proof?) –In textbook

CS555Spring 2012/Topic 317 The “Bad News” Theorem for Perfect Secrecy Question: OTP requires key as long as messages, is this an inherent requirement for achieving perfect secrecy? Answer. Yes. Perfect secrecy implies that key-length  msg-length Proof: Implication: Perfect secrecy difficult to achieve in practice Plaintext space Cipherttext space

CS555Spring 2012/Topic 318 Key Randomness in One-Time Pad One-Time Pad uses a very long key, what if the key is not chosen randomly, instead, texts from, e.g., a book are used as keys. –this is not One-Time Pad anymore –this does not have perfect secrecy –this can be broken –How? The key in One-Time Pad should never be reused. –If it is reused, it is Two-Time Pad, and is insecure! –Why?

Usage of One-Time Pad To use one-time pad, one must have keys as long as the messages. To send messages totaling certain size, sender and receiver must agree on a shared secret key of that size. –typically by sending the key over a secure channel This is difficult to do in practice. Can’t one use the channel for send the key to send the messages instead? Why is OTP still useful, even though difficult to use? CS555Spring 2012/Topic 319

Usage of One-Time Pad The channel for distributing keys may exist at a different time from when one has messages to send. The channel for distributing keys may have the property that keys can be leaked, but such leakage will be detected –Such as in Quantum cryptography CS555Spring 2012/Topic 320

CS555Spring 2012/Topic 321 Coming Attractions … Cryptography: Block ciphers, encryption modes, cryptographic functions