Key-Indistinguishability and Robustness. Anonymous Encryption. Rennes, 07/11/2014 CIDRE/ INRIA Cristina Onete maria-cristina.onete@irisa.fr ο What is anonymity? Anonymous: from “anonymos” (Greek)“, meaning “nameless”: “without any name ackowledged, whose name is withheld. Lacking individuality, unique character, or distinction” English Dictionary, Dictionary.com Anonyme/anonymat: du grec “anonymos”, ce qui veut dire “sans nom” : se dit de quelqu’un dont on ignore le nom, la qualité de ce qui est sans nom ou sans renommée. Larousse, www.larousse.fr; Wikipedia, fr.wikipedia.org Cristina Onete || 07/11/2014 || 2 ο Encryption B B Amélie Baptiste ο Security guarantees: • Message confidentiality: ciphertext hides plaintext ππ π = Encππ (π) π π π Random-looking Cristina Onete || 07/11/2014 || 3 ο Encryption π = "π»ππππ π€ππππ! " Encrypted with 2048-bit RSA key -----BEGIN PGP MESSAGE----wcBMAxDZjxP1noe7AQf+M0T6qNMgf7I2T0ADeUdwmx4J9uxGBFdptH0 RPOGbwLIeGjcKG6PZpemKCtu5iRVCfgE/iMBvE0bxMIWaesxBawBElm3R L8PZ6ZjREWYgDfNJmazpDCraLXnSNJEFVxRkQWApUfw2QMLGf0OVMj5 CRpkd/XjHaMkNEfe+F6M2tUxuxpzdTEMGWxZ+ESrP/gACxTTy3ewm7xl uztdXaracw7RV1UbpM4+9UPBce1kIzPn68w7uIOEZvhEGPeipLAKL8FC3J C9+rAEbDXf+nGZiRPyFQuJn2Pz3Cv+IxZ43hDsSctjLvxUxVMNCEz3QcR mpPXN6h5f7TTFFN2fMdRwOrdJEAdaJt3aE5I5ssJlfxJzBDH1dc8eVfH2d7 9AAUo6chn25kyGQRUvtYfto057ae5Jvl8mpipy37wZKIuKK52D57VNW1x A==2X4l -----END PGP MESSAGE----Cristina Onete || 07/11/2014 || 4 ο Plaintext Security ο Plaintext-hiding: • The attacker can’t get the full plaintext B B ο What if the message space is small? Cristina Onete || 07/11/2014 || 5 ο Plaintext Security ο Ciphertext Indistinguishability (IND-CCA) B B 1/2 ?? ? 1/2 ο Not even 1 bit of the message is leaked! Cristina Onete || 07/11/2014 || 6 ο Plaintext Security Plaintext Space Ciphertext Space B Cristina Onete || 07/11/2014 || 7 ο Goal: receiver anonymity ο Make ciphertext hide the receiver B π = Encππ (π) Baptiste π Amélie Charles ?? ? Cristina Onete || 07/11/2014 || 8 ο Contents ο Key Indistinguishability • IK-CCA • IND-CCA vs. IK-CCA • IK-CCA of RSA and ElGamal-based systems ο Robustness of Encryption • Weak and Strong Robustness • Robustness of RSA and ElGamal • WROB- and SROB encryption schemes ο Receiver-anonymous encryption • Construction and limitations ο Key-(in)distinguishability B π = Encππ (π) Baptiste π Amélie Charles ο Ciphertext hides the message ο Does it also hide the recipient (the pk used for encryption)? Not necessarily! Counterexample: take π β (ππ, Encππ (π)) Cristina Onete || 07/11/2014 || 10 ο Key-(in)distinguishability ο Goal: ciphertext hides the key under which it was created B B C B ?? ? B 1/2 1/2 C ο IK-CCA: Can’t tell whether it was one key or the other Cristina Onete || 07/11/2014 || 11 ο IND-CCA, but not IK-CCA Plaintext Space Ciphertext Space B C Cristina Onete || 07/11/2014 || 12 ο IND-CCA and IK-CCA Plaintext Space Ciphertext Space B C Cristina Onete || 07/11/2014 || 13 ο RSA is not IK-CCA ο Textbook RSA: • Key Generation: Primes π, π of size π. Define π = ππ, π π = (π − 1)(π − 1) Public key: choose π s.t. πΊπΆπ· π, π π = 1. Now ππ = (π, π) Secret key: find inverse π of π: ππ = 1 πππ π π . Now π π = π • Encryption (using pk = (e, N)): π β πΈππππ π = ππ (πππ π) • Decryption (using sk = d): π β π·πππ π π = π π (πππ π) Cristina Onete || 07/11/2014 || 14 ο RSA is not IK-CCA ο Case I: Moduli of different length • ππ1 = (π1 , π1 ) , with length π1 = π1 (say 512 bits) • ππ2 = (π2 , π2 ) , with length π2 = π2 (say 1024 bits) • πβππ ππ πππππ¦ππ‘πππ π’ππππ ππ1 π€πππ ππ 512 πππ‘π , π€βπππ ππ ππ − πππ¦ππ‘πππ π’ππππ ππ2 π€πππ ππ 1024 πππ‘π ππππ • When Adv. gives a message m and the two pk’s, she just needs to look at the length of the outcome Cristina Onete || 07/11/2014 || 15 ο RSA is not IK-CCA ο Case II: Moduli of same length • ππ1 = (π1 , π1 ) • ππ2 = (π2 , π2 ) • Let π1 > π2 • πβππ ππ πππππ¦ππ‘πππ π’ππππ ππ2 π€πππ ππ π ππππππ π‘βππ π2 , π€βπππ ππ πππππ¦ππ‘πππ π’ππππ ππ1 πππ ππ ππππππ π‘βππ π2 • Because the encryption of any message m has to cover the output space well: Prob πΈππππ1 π > π2 is significant Cristina Onete || 07/11/2014 || 16 ο ElGamal is IK-CCA ο Textbook ElGamal: • Key Generation: Prime π of size π s.t. 2q + 1 also prime. Let Gπ = < π > Secret key: choose π π ∈ {1, … π − 1}. Public key: ππ = π π π (πππ π) • Encryption: Choose random π ∈ {1, … , π − 1}. Set π1 β ππ (πππ π) Set π2 β π ππ π (πππ π). Send: π = (π1 , π2 ) • Decryption: Compute: π = π2 / π1π π (πππ π) Cristina Onete || 07/11/2014 || 17 ο ElGamal is IK-CCA ο Intuition: • All pk’s in the same group • All ciphertexts are of the same length and format • Given ππ1 , the encryption of π is: π π = (ππ1 , π ππ11 ) • Given ππ2 , the encryption of π is: π π = (ππ2 , π ππ22 ) • Output is identically distributed Cristina Onete || 07/11/2014 || 18 ο Contents ο Key Indistinguishability • IK-CCA • IND-CCA vs. IK-CCA • IK-CCA of RSA and ElGamal-based systems ο Robustness of Encryption • Weak and Strong Robustness • Robustness of RSA and ElGamal • WROB- and SROB encryption schemes ο Receiver-anonymous encryption • Construction and limitations ο Weak and Strong Robustness ο What happens if we get someone else’s ciphertext? • Theory: you can’t decrypt it • Security: you can’t recover the message • Practice: you’ll recover a nonsense message B Baptiste Charles ο Robustness: can’t decrypt other ciphertexts Cristina Onete || 07/11/2014 || 20 ο Why do we care? ο Our goal: receiver anonymity B π = Encππ (π) Baptiste π Amélie Charles ?? ? Cristina Onete || 07/11/2014 || 21 ο Why do we care? ο Setting: • Amélie wants to send π to Baptiste anonymously • She encrypts π under Baptiste’s public key, then broadcasts the ciphertext to multiple receivers • How do the receivers know whether the ciphertext was for them or not? ο Robust encryption: • If π was encrypted for someone else, the ciphertext decrypts to an error symbol Cristina Onete || 07/11/2014 || 22 ο Weak Robustness ο Honestly encrypted ciphertext is robust B B C B Cristina Onete || 07/11/2014 || 23 ο Strong Robustness ο Adversary-chosen ciphertext is robust B B C B At most 1 decryption Cristina Onete || 07/11/2014 || 24 ο RSA and ElGamal not robust RSA Encryption ο Encryption ο Encryption π β πΈππππ π = ππ (πππ π) ο Decryption (with π) π β π·πππ π π = π π (πππ π) ο Decryption (with π′) ′ ElGamal Encryption ′ π π πππ π = πππ πππ π = π′ π = π1 , π2 = (ππ , π ππ π ) ο Decryption (with π π) π = π2 π1π π (πππ π) ο Decryption (with π π′) π2 / π1π π ′ πππ π = π π π π π /ππ π π = π ππ(π π − π π ; ′) = π′ Cristina Onete || 07/11/2014 || 25 ο Strongly Robust Encryption ο Modified Cramer-Shoup (finite fields) • Setting: cyclic group Gπ of prime order π two generators π1 and π2 of Gπ choose random πΎ ←π Keysπ»ππ β • Key generation: pick ππ , ππ , ππ , ππ , ππ , ππ ←π {0 … π − 1} π₯ π₯ π¦ π¦ π§ π§ set π = π1 1 π2 2 , π = π1 1 π2 2 , π = π1 1 π22 • Encrypt π: pick π’ ←π {1 … π − 1}, set ππ β π1π’ , ππ β π2π’ set π β π βπ’ , π£ β π»(πΎ; π1 π2 π), π β π π’ π π’π£ −π§ −π§2 • Decrypt (π1 , π2 , π, π): do π£ = π»(πΎ; π1 π2 π), π = π π1 1 π2 π₯ +π£ π¦1 π₯2 +π£ π¦2 π2 if π1 ≠ 1 or π ≠ π1 1 Cristina Onete || set π = β 07/11/2014 || 26 ο Contents ο Key Indistinguishability • IK-CCA • IND-CCA vs. IK-CCA • IK-CCA of RSA and ElGamal-based systems ο Robustness of Encryption • Weak and Strong Robustness • Robustness of RSA and ElGamal • WROB- and SROB encryption schemes ο Receiver-anonymous encryption • Construction and limitations ο Receiver-anonymous encryption ο Our goal: receiver anonymity B π = Encππ (π) Baptiste π Amélie Charles ?? ? Cristina Onete || 07/11/2014 || 28 ο Construction & Limitations ο Use IK-CCA and SROB encryption • Adversary won’t know whom a ciphertext is for B π = Encππ (π) Baptiste π Amélie ?? ? Charles Cristina Onete || 07/11/2014 || 29 ο Construction & Limitations ο Use IK-CCA and SROB encryption • What if the adversary waits for an answer? B π = Encππ (π) Baptiste π Amélie Charles Cristina Onete || 07/11/2014 || 30 ο Constructions & Limitations ο Use “onion” routing – use routers to encrypt and send messages between sender and receiver Source: cdn.arstechnica.net Cristina Onete || 07/11/2014 || 31 ο MRI students: papers • Karame, Androulaki, Capkun: “Two Bitcoins at the Price of One? Double-spending attacks on fast payments in Bitcoin” https://eprint.iacr.org/2012/248.pdf • Burmester, Desmedt: “A Secure and Efficient Conference Key Distribution System” http://www.cs.fsu.edu/~langley/Eurocrypt/euro-pre.pdf • Sarkar, Fitzgerald: “Attacks on SSL. A comprehensive study of BEAST, CRIME, TIME, BREACH, LUCKY 13 & RC4 biases” https://www.isecpartners.com/media/106031/ssl_attacks_survey.pdf Cristina Onete || 07/11/2014 || 32 ο MRI students: papers • BSI: “Advanced Security Mechanisms for MachineReadable Travel Documents – Part 2” https://www.bsi.bund.de/SharedDocs/Downloads/EN/BSI/Publ ications/TechGuidelines/TR03110/TR03110_v2.1_P2pdf.pdf;jsessionid=A06695D3F0DCA020B98B4 CAC8946CD13.2_cid294?__blob=publicationFile • Bordes: “BitLocker” https://www.sstic.org/media/SSTIC2011/SSTICactes/bitlocker/SSTIC2011-Article-bitlocker-bordes.pdf • Fluhrer, Matin, Shamir: “Weaknesses in the Key Scheduling Algorithm of RC4” http://merlot.usc.edu/cs531-s11/papers/Fluhrer01a.pdf Cristina Onete || 07/11/2014 || 33 ο MRI students: papers • Montalvo, Defrance, Lefebvre, Le Scouarnec, Pérez: “Système de stockage-en-ligne avec confidentialité des données personnelles” https://www.sstic.org/media/SSTIC2011/SSTIC-actes/ systeme_de_stockage-en-ligne_de_photos_avec_confid/ SSTIC2011-Article-systeme_de_stockage-en-ligne_de_photos_ avec_confidentialite_des_donnees_personnelles-montalvo.pdf • Marechal: “État de l’art sur le cassage de mots de passe” https://www.sstic.org/media/SSTIC2007/SSTICactes/Etat_de_l_art_cassage_de_mots_de_passe/SSTIC2007Article-Etat_de_l_art_cassage_de_mots_de_passe-marechal.pdf Cristina Onete || 07/11/2014 || 34 ο MRI students: papers • Shi, Chan, Stefanov, Li: “Oblivious RAM with O((log N)3) Worse-Case Cost” https://eprint.iacr.org/2011/407.pdf • Curtmola, Garay, Kamara, Ostrovsky: “Searchable Symmetric Encryption: Improved Definitions and Efficient Constructions” http://eprint.iacr.org/2006/210.pdf • Dodis, Pointcheval, Ruhault, Vergnaud, Wichs: “Security Analysis of Pseudo-Random Number Generators with Input: /dev/random is not robust” https://eprint.iacr.org/2013/338.pdf Cristina Onete || 07/11/2014 || 35 ο MRI students: papers • Bellare, Paterson, Rogaway: “Security of Symmetric Encryption against Mass Surveillance” https://eprint.iacr.org/2014/438.pdf Cristina Onete || 07/11/2014 || 36 Thanks! CIDRE/ INRIA