
Cryptography CS 555 Topic 29: Formalizing Public Key Cryptography 1 Recap • Key Management • Diffie Hellman Key Exchange • Password Authenticated Key Exchange (PAKEs) 2 Public Key Encryption: Basic Terminology • Plaintext/Plaintext Space • A message m c • Ciphertext ∈ ℳ • Public/Private Key Pair , ∈ ∈ 3 Public Key Encryption Syntax • Three Algorithms • Gen(1 , ) (Key-generation algorithm) • Input: Random Bits R Alice must run key generation • Output: , algorithm in advance an publishes the public key: pk • Enc ( ) (Encryption algorithm) pk ∈ • Decsk( ) (Decryption algorithm) • Input: Secret∈ key sk and a ciphertex c • Output: a plaintext message m Assumption: Adversary only gets to see pk (not sk) ∈ ℳ • Invariant: Decsk(Encpk(m))=m 4 Chosen-Plaintext Attacks • Model ability of adversary to control or influence what the honest parties encrypt. • Historical Example: Battle of Midway (WWII). • US Navy cryptanalysts were able to break Japanese code by tricking Japanese navy into encrypting a particular message • Private Key Cryptography 5 Recap CPA-Security (Symmetric Key Crypto) m0,1,m1,1 c1 = EncK(mb,1) m0,2,m1,2 c2 = EncK(mb,2) m0,3,m1,3 c3 = EncK(mb,3) … b’ Random bit b (negligible) s. t K = Gen(.) 1 Pr = + ( ) ∀ ∃ 2 6 ′ ≤ Chosen-Plaintext Attacks • Model ability of adversary to control or influence what the honest parties encrypt. • Private Key Crypto • Attacker tricks victim into encrypting particular messages • Public Key Cryptography • The attacker already has the public key pk • Can encrypt any message s/he wants! • CPA Security is critical! 7 CPA-Security (PubK , n ) Public Key:LR pk−cpa , A Π 1 1 = 0 1 , = 2 , 2 0 1 3 3 = 0 1 … b’ Random bit b (negligible) s. t (pk,sk) = Gen(.) 1 Pr PubK n = 1 + ( ) ∀, ∃ 2 8 LR−cpa A Π ≤ CPA-Security (Single Message) m0,m1 , = , , c = EncK(mb) , m2 , Π c2 = EncK(m2)푡 � m3 − Π 푡 PubK c3 == Enc1K(m3)= … , PubKLR−cpa = 0 ′ A,Π b’ LR−cpa A Π � Random bit b , negligible function such that Π ℎ � � K = Gen(.) Pr[(PubKnegligible, =)1]s . t + ( ) LR−cpa푡 1 A Π 1 Pr = +≤ 2 ( ) ∀ ∃ 2 9 ′ ≤ Private Key Crypto • CPA Security was stronger than eavesdropping security EncK(m) = G(K) ⨁ Vs. EncK(m) = , ⨁ 10 Public Key Crypto • Fact 1: CPA Security and Eavesdropping Security are Equivalent • Key Insight: The attacker has the public key so he doesn’t gain anything from being able to query the encryption oracle! • Fact 2: Any deterministic encryption scheme is not CPA-Secure • Historically overlooked in many real world public key crypto systems • Fact 3: Plain RSA is not CPA-Secure • Fact 4: No Public Key Cryptosystem can achieve Perfect Secrecy! • Exercise 11.1 • Hint: Unbounded attacker can keep encrypting the message m using the public key to recover all possible encryptions of m. 11 Encrypting Longer Messages Claim 11.7: Let = , , denote a CPA-Secure public key encryption scheme and let = , , be defined such that Π Π′ = ′ ′ Then is′ also CPA-Secure. ∥ ∥ ⋯ ∥ ℓ ∥ ⋯ ∥ ℓ Π′ 12 Chosen Ciphertext Attacks • Models ability of attacker to obtain (partial) decryption of selected ciphertexts • Attacker might intercept ciphertext c (sent from S to R) and send c’ instead. • After that attacker can observe receiver’s behavior (abort, reply etc…) • Attacker might send a modified ciphertext c’ to receiver R in his own name. • E-mail response: Receiver might decrypt c’ to obtain m’ and include m’ in the response to the attacker 13 Recap CCA-Security (Symmetric Key Crypto) We could set m0 = m-1 or m1 = m-2 m-1 c-1 = EncK(m-1) c-2 … m-2 = DecK(c-2) m ,m 0 1 However, we could still flip 1 bit c = EncK(mb) of c and ask challenger to decrypt m3 c2 = EncK(m2) c3 Random bit b m3 = DecK(m3) K = Gen(.) … c4 =c “No Way!” b’ 14 Recap CCA-Security , 1. Challenger generates a secret key k and a bit b Π 2. Adversary (A) is given oracle access to Enckand Deck 3. Adversary outputs m0,m1 4. Challenger sends the adversary c=Enck(mb). 5. Adversary maintains oracle access to Enck and Deck ,however the adversary is not allowed to query Deck(c). 6. Eventually, Adversary outputs b’. , = 1 if b = b ; otherwise 0. ′ Π CCA-Security: For all PPT A exists a negligible function negl(n) s.t. 1 Pr = 1 + ( ) , 2 Π ≤ 15 CCA-Security (PubK , n ) Public Key:cca pk A Π = − … , − − = 0 1 = … b’ Random bit b (negligible) s. t (pk,sk) = Gen(.) 1 Pr PubK n = 1 + ( ) ∀ , ∃ 2 cca 16 A Π ≤ Encrypting Longer Messages Claim 11.7: Let = , , denote a CPA-Secure public key encryption scheme and let = , , be defined such that Π = Then is also′ CPA-Secure. Π′ ′ ′ ∥ ∥ ⋯ ∥ ℓ ∥ ⋯ ∥ ℓ Claim?Π ′Let = , , denote a CCA-Secure public key encryption scheme and let = , , be defined such that Π = Then is also′ CCAΠ′ -Secure. � � ∥ ∥ ⋯ ∥ ℓ ∥ ⋯ ∥ ℓ Π′ Is this second claim true? 17 Encrypting Longer Messages Claim? Let = , , denote a CCA-Secure public key encryption scheme and let = , , be defined such that Π Π′ = � � Then is′ also CCA-Secure. ∥ ∥ ⋯ ∥ ℓ ∥ ⋯ ∥ ℓ Π′ Is this second claim true? Answer: No! 18 Encrypting Longer Messages Fact: Let = , , denote a CCA-Secure public key encryption scheme and let = , , be defined such that Π = Π′ � � Then is Provably′ Not CCA-Secure. ∥ ∥ ⋯ ∥ ℓ ∥ ⋯ ∥ ℓ 1. AttackerΠ′ sets = and = and gets = = , , , 2. Attacker′ sets = , ∥ , ∥ , , queries the∥ decryption ∥ oracle and gets ∥ ∥ ′ ∥ ∥ if b= = ′ � ∥ ∥ ′ ∥ ∥ 19 Achieving CPA and CCA-Security • Plain RSA is not CPA Secure (therefore, not CCA-Secure) • El-Gamal (next class) is CPA-Secure, but not CCA-Secure • Homework 4 • Tools to build CCA-Secure Encryption • Key Encapsulation Mechanism 20 Key Encapsulation Mechanism (KEM) • Three Algorithms • Gen(1 , ) (Key-generation algorithm) • Input: Random Bits R • Output: , • Encaps (1 , ) pk ∈ • Input: security parameter, random bits R • Output: Symmetric key k 0,1 and a ciphertext c • Decaps ( ) (Deterministic algorithm)ℓ sk ∈ • Input: Secret key sk and a ciphertex c • Output: a symmetric key 0,1 or (fail) ∈ ℓ • Invariant: Decapssk(c)=k whenever⊥ (c,k) = Encapspk(1 , ) 21 KEM CCA-Security (KEM , n ) , cca, … A Π ≠ ≠ … b’ Random bit b (negligible) s. t (pk,sk) = Gen(.) 1 Pr KEM , = 1 + ( ) , = . ∀ ∃ 2 , 22 cca A Π ≤ ⟵ CCA-Secure Encryption from CCA-Secure KEM ; = , Where ∗ • , ; , • is a CCA-Secure symmetric key encryption algorithm, and ← • ∗ is a CCA-Secure KEM. Theorem 11.14: is CCA-Secure public key encryption scheme. 23 CCA-Secure KEM in the Random Oracle Model • Let (N,e,d) be an RSA key (pk =(N,e), sk=(N,d)). Encapspk 1 , = , = • Remark 1: k is completely random string unless the adversary can query random oracle H on input r. • Remark 2: If Plain-RSA is hard to invert for a random input then PPT attacker finds r with negligible probability. 24 Next Class: El-Gamal • Read Katz and Lindell: 11.4 25.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages25 Page
-
File Size-