computer aided cryptography
play

Computer-aided cryptography Gilles Barthe IMDEA Software Institute, - PowerPoint PPT Presentation

Computer-aided cryptography Gilles Barthe IMDEA Software Institute, Madrid, Spain May 17, 2015 Modern cryptography Shannon 49 Mathematical proof of security Perfect secrecy is impossible Diffie & Hellman 76


  1. Computer-aided cryptography Gilles Barthe IMDEA Software Institute, Madrid, Spain May 17, 2015

  2. Modern cryptography Shannon ’49 • Mathematical proof of security Perfect secrecy is impossible • Diffie & Hellman ’76 • Computational security • Asymptotic guarantees PPT adversary has negligible advantage Goldwasser & Micali’82 Yao’82 Bellare & Rogaway ’94 • Concrete bounds Aversary advantage to win in time t is ≤ p

  3. Pillars of provable security: Definitions Definition

  4. Pillars of provable security: Constructions Construction Definition

  5. Pillars of provable security: Proofs Assumption Construction Definition

  6. Pillars of provable security: Proofs Assumption Construction Definition Attack

  7. Pillars of provable security: Proofs Assumption Attack Construction Definition Attack

  8. Pillars of provable security: Proofs Assumption Attack Construction Reduction Definition Attack

  9. Public-key encryption Algorithms ( K , E pk , D sk ) ◮ E probabilistic ◮ D deterministic and partial Key generation If ( sk , pk ) is a valid key pair, Public Secret key key D sk ( E pk ( m )) = m hello rwxtf hello Encryption Decryption

  10. Indistinguishability Game IND-CCA ( A ) ( sk , pk ) ← K (); ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; b $ c ⋆ ← E pk ( m b ); b ′ ← A 2 ( c ⋆ ); return ( b ′ = b )

  11. Indistinguishability Game IND-CCA ( A ) ( sk , pk ) ← K (); ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; b $ c ⋆ ← E pk ( m b ); b ′ ← A 2 ( c ⋆ ); return ( b ′ = b )

  12. Indistinguishability Game IND-CCA ( A ) ( sk , pk ) ← K (); ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; b $ c ⋆ ← E pk ( m b ); b ′ ← A 2 ( c ⋆ ); return ( b ′ = b ) m 0 m 1

  13. Indistinguishability Game IND-CCA ( A ) ( sk , pk ) ← K (); $ ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; b b $ c ⋆ ← E pk ( m b ); b ′ ← A 2 ( c ⋆ ); return ( b ′ = b ) m 0 m 1

  14. Indistinguishability m b Game IND-CCA ( A ) ( sk , pk ) ← K (); $ ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; b b $ c ⋆ ← E pk ( m b ); b ′ ← A 2 ( c ⋆ ); return ( b ′ = b ) m 0 m 1

  15. Indistinguishability m b Game IND-CCA ( A ) ( sk , pk ) ← K (); E pk $ ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; c ⋆ b b $ c ⋆ ← E pk ( m b ); b ′ ← A 2 ( c ⋆ ); return ( b ′ = b ) m 0 m 1

  16. Indistinguishability m b Game IND-CCA ( A ) ( sk , pk ) ← K (); E pk $ ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; c ⋆ b b $ c ⋆ ← E pk ( m b ); b ′ ← A 2 ( c ⋆ ); return ( b ′ = b ) m 0 c ⋆ m 1

  17. Indistinguishability m b Game IND-CCA ( A ) ( sk , pk ) ← K (); E pk $ ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; c ⋆ b b $ c ⋆ ← E pk ( m b ); b ′ ← A 2 ( c ⋆ ); return ( b ′ = b ) m 0 c ⋆ b ′ m 1

  18. Indistinguishability m b Game IND-CCA ( A ) ( sk , pk ) ← K (); E pk $ ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; c ⋆ b b $ c ⋆ ← E pk ( m b ); ? = b ′ ← A 2 ( c ⋆ ); return ( b ′ = b ) m 0 c ⋆ b ′ m 1

  19. Indistinguishability m b Game IND-CCA ( A ) ( sk , pk ) ← K (); E pk $ ( m 0 , m 1 ) ← A 1 ( pk ); ← { 0 , 1 } ; c ⋆ b b $ c ⋆ ← E pk ( m b ); ? = b ′ ← A 2 ( c ⋆ ); return ( b ′ = b ) m 0 c ⋆ b ′ m 1 Pr IND-CCA ( A ) b ′ = b − 1 small 2

  20. Optimal Asymmetric Encryption Padding Encryption E OAEP ( pk ) ( m ) : Decryption D OAEP ( sk ) ( c ) : ← { 0 , 1 } k 0 ; r $ ( s , t ) ← f − 1 s ← G ( r ) ⊕ ( m � 0 k 1 ); sk ( c ); r ← t ⊕ H ( s ); t ← H ( s ) ⊕ r ; if ([ s ⊕ G ( r )] k 1 = 0 k 1 ) return f pk ( s � t ) then { m ← [ s ⊕ G ( r )] k ; } else { m ← ⊥ ; } Oracle G ( x ) : return m if x / ∈ L G then ← { 0 , 1 } k ; r $ Game sPDOW ( I ) L G ← ( x , r ) :: L G ; ( sk , pk ) ← K (); return L G [ x ]; ← { 0 , 1 } n 0 ; y 0 $ ← { 0 , 1 } n 1 ; y 1 $ Oracle H ( x ) : y ← y 0 � y 1 ; if x / ∈ L H then x ⋆ ← f pk ( y ); ← { 0 , 1 } k ′ ; Y ′ ← I ( x ⋆ ); r $ L H ← ( x , r ) :: L H ; return ( y 0 ∈ Y ′ ) return L H [ x ];

  21. OAEP: provable security FOR ALL IND-CCA adversary A against ( K , E OAEP , D OAEP ) , THERE EXISTS a sPDOW adversary I against ( K , f , f − 1 ) st � Pr IND-CCA ( A ) [ b ′ = b ] − 1 � ≤ � � 2 Pr PDOW ( I ) [ y ∈ Y ′ ] + 3 q D q G + q 2 D + 4 q D + q G + 2 q D 2 k 0 2 k 1 and t I ≤ t A + q D q G q H T f

  22. OAEP: history Shoup Bellare, Hofheinz, Kiltz Bellare and Rogaway Pointcheval 1994 2001 2004 2009 2011 Fujisaki, Okamoto, Pointcheval, Stern BGLZ 1994 Purported proof of chosen-ciphertext security 2001 1994 proof gives weaker security; desired security holds ◮ under stronger assumptions ◮ for a modified scheme 2004 Filled gaps in 2001 proof 2009 Security definition needs to be clarified 2011 Fills gaps in 2004 proof

  23. An isolated problem? ◮ In our opinion, many proofs in cryptography have become essentially unverifiable. Our field may be approaching a crisis of rigor . Bellare and Rogaway, 2004-2006 ◮ Do we have a problem with cryptographic proofs? Yes, we do [...] We generate more proofs than we carefully verify (and as a consequence some of our published proofs are incorrect) . Halevi, 2005

  24. Approach: computer-aided cryptographic proofs ◮ adhere to cryptographic practice ☞ same guarantees ☞ same level of abstraction ☞ same proof techniques ◮ leverage existing verification techniques and tools ☞ program logics, VC generation, invariant generation ☞ SMT solvers, theorem provers, proof assistants (code-based game-playing) provable security = deductive relational verification of parametrized probabilistic programs

  25. EasyCrypt Next generation program verification environment ◮ full-fledged proof assistant (inspired from SSR EFLECT ) ◮ backend to SMT solvers and CAS ◮ native embedding of rich probabilistic language ◮ probabilistic Relational Hoare Logic for game hopping ◮ probabilistic Hoare Logic for bounding probabilities ◮ libraries of proof techniques ◮ module system and theory mechanism ◮ (soon) automation from symbolic cryptography

  26. Applications Emblematic examples ◮ encryption, signatures, hash designs, key exchange protocols, zero knowledge protocols, garbled circuits, secure function evaluation, verifiable computation ◮ (computational) differential privacy, mechanism design Ongoing examples ◮ SHA3 ◮ Voting

  27. A language for cryptographic games C ::= skip skip | V ← E assignment | V ← D random sampling $ | C ; C sequence | if E then C else C conditional while E do C while loop | | V ← P ( E , . . . , E ) procedure call ◮ E : (higher-order) expressions � user extensible ◮ D : discrete sub-distributions ◮ P : procedures (concrete or abstract) Programs interpreted as sub-distribution transformers � c � : M → distr M

  28. Probabilistic Relational Hoare Logic ◮ Judgments � { P } c 1 ∼ c 2 { Q } ◮ P and Q are relations on states (not state distributions!); essential to generate VCs in predicate logic ◮ If � { P } c 1 ∼ c 2 { A � 1 � ⇒ B � 2 �} is valid then for all m 1 , m 2 ∈ M s.t. P m 1 m 2 , we have Pr c 1 , m 1 [ A ] ≤ Pr c 2 , m 2 [ B ] ◮ � { P } c 1 ∼ c 2 { Q } is valid iff for all m 1 , m 2 ∈ M , P m 1 m 2 implies Q ♯ ( � c 1 � m 1 ) ( � c 2 � m 2 )

  29. Lifting Q ♯ is the smallest relation that satisfies: ◮ If Q s t then Q ♯ δ s δ t ◮ If Q ♯ µ i ν i and � i p i = 1, then �� � �� � Q ♯ p i µ i p i ν i i i Strong ties with coupling and probabilistic bisimulation. Theorem � � Q ♯ µ 1 µ 2 iff there exists µ ∈ Γ( µ 1 , µ 2 ) such that µ = 0, Q where Γ( µ 1 , µ 2 ) = { µ ∈ D ( A × B ) | π i ( µ ) = µ i } Also related to maximum flow problem

  30. Flow networks a 1 b 1 µ 1 ( a 1 ) µ 2 ( b 1 ) µ 1 ( a 2 ) µ 2 ( b 2 ) a 2 b 2 ⊥ ⊤ µ 2 ( b m ) µ 1 ( a n ) Q a n b m

  31. pRHL rules ◮ One-sided and two-sided rules for most constructions P ⇒ e � 1 � = e ′ � 2 � � { P ∧ e � 1 �} c 1 ∼ c ′ 1 { Q } � { P ∧ ¬ e � 1 �} c 2 ∼ c ′ 2 { Q } � { P } if e then c 1 else c 2 ∼ if e ′ then c ′ 1 else c ′ 2 { Q } � { P ∧ e � 1 �} c 1 ∼ c { Q } � { P ∧ ¬ e � 1 �} c 2 ∼ c { Q } � { P } if e then c 1 else c 2 ∼ c { Q } ◮ Two-sided rule for adversary calls and loops ◮ Second-order exist. quant. for random sampling h is 1-1 and ∀ a , µ ( a ) = µ ′ ( h ( a )) ← µ ′ { Q } � {∀ v , Q { h v / x � 1 �}{ v / x � 2 �}} x ← µ ∼ x $ $

  32. Example: Bellare and Rogaway 1993 encryption Game IND-CPA ( A ) : ( sk , pk ) ← K ( ); Encryption E pk ( m ) : ← { 0 , 1 } ℓ ; ( m 0 , m 1 ) ← A 1 ( pk ); r $ ← { 0 , 1 } ; b s ← H ( r ) ⊕ m ; $ c ⋆ ← E pk ( m b ); y ← f pk ( r ) � s ; b ′ ← A 2 ( c ⋆ ); return y return ( b ′ = b ) For every IND-CPA adversary A , there exists an inverter I st − 1 b ′ = b y ′ = y � � � � 2 ≤ Pr OW ( I ) Pr IND-CPA ( A )

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend