the applied pi calculus with proofs
play

The Applied Pi Calculus. . . with Proofs Bruno Blanchet INRIA - PowerPoint PPT Presentation

Introduction The language Main theorem Proof Conclusion The Applied Pi Calculus. . . with Proofs Bruno Blanchet INRIA Paris-Rocquencourt joint work with Mart n Abadi and C edric Fournet April 2015 Bruno Blanchet (INRIA) Applied


  1. Introduction The language Main theorem Proof Conclusion The Applied Pi Calculus. . . with Proofs Bruno Blanchet INRIA Paris-Rocquencourt joint work with Mart´ ın Abadi and C´ edric Fournet April 2015 Bruno Blanchet (INRIA) Applied pi calculus April 2015 1 / 47

  2. Introduction The language Main theorem Proof Conclusion The applied pi calculus Designed by Abadi and Fournet ( Mobile Values, New Names, and Secure Communication , POPL’01). Extension of the pi calculus with terms instead of names for messages. Language for modeling security protocols: Terms represent protocol messages. Function symbols represent cryptographic primitives. The properties of these primitives are modeled by equations. The input language of ProVerif is a dialect of the applied pi calculus. The applied pi calculus and ProVerif are widely used. Interesting to make them converge, with a solid theoretical foundation. Bruno Blanchet (INRIA) Applied pi calculus April 2015 2 / 47

  3. Introduction The language Main theorem Proof Conclusion Our contribution Minor changes to the language Closer to ProVerif Detailed proofs of all results Minor fixes; some side-conditions were not explicit 74 pages of proofs. . . Revised examples New example on indifferentiability Bruno Blanchet (INRIA) Applied pi calculus April 2015 3 / 47

  4. Introduction The language Main theorem Proof Conclusion Related work Avik Chaudhuri (private communication, 2007) found a counter-example to “observational equivalence equals labelled bisimilarity”, due to a missing side-condition. Bengtson et al, LICS’09 mentioned a similar counter-example; proposed a framework for defining various extensions of the pi calculus (psi-calculi), with machine-checked proofs. Jia Liu ( http://lcs.ios.ac.cn/~jliu/papers/LiuJia0608.pdf ) made the missing side-condition explicit, and gave a proof of “observational equivalence equals labelled bisimilarity”; closer to the original applied pi calculus paper; extension to a stateful variant (POST’14, with Arapinis, Ritter, and Ryan). Bruno Blanchet (INRIA) Applied pi calculus April 2015 4 / 47

  5. Introduction The language Main theorem Proof Conclusion Syntax: processes L , M , N , T , U , V ::= terms a , b , c , . . . , k , . . . , m , n , . . . , s name x , y , z variable f ( M 1 , . . . , M l ) function application P , Q , R ::= processes (or plain processes) null process 0 P | Q parallel composition ! P replication ν n . P name restriction (“new”) if M = N then P else Q conditional u ( x ) . P message input u � M � . P message output Bruno Blanchet (INRIA) Applied pi calculus April 2015 5 / 47

  6. Introduction The language Main theorem Proof Conclusion Syntax: processes L , M , N , T , U , V ::= terms a , b , c , . . . , k , . . . , m , n , . . . , s name x , y , z variable f ( M 1 , . . . , M l ) function application P , Q , R ::= processes (or plain processes) null process 0 P | Q parallel composition ! P replication ν n . P name restriction (“new”) if M = N then P else Q conditional N ( x ) . P message input N � M � . P message output Bruno Blanchet (INRIA) Applied pi calculus April 2015 5 / 47

  7. Introduction The language Main theorem Proof Conclusion Syntax: extended processes A , B , C ::= extended processes P plain process A | B parallel composition ν n . A name restriction ν x . A variable restriction { M / x } active substitution Active substitutions model the knowledge of the adversary. { M 1 / x 1 , . . . , M l / x l } for { M 1 / x 1 } | . . . |{ M l / x l } . Substitutions are cycle-free. At most one substitution for each variable. Exactly one when the variable is restricted. Bruno Blanchet (INRIA) Applied pi calculus April 2015 6 / 47

  8. Introduction The language Main theorem Proof Conclusion Sorts Variables, names, and functions come with sorts: u : τ means that u has sort τ . Examples of sorts: Integer, Key, Data, . . . There are infinite numbers of variables and names of each sort. f : τ 1 × · · · × τ l → τ means that f has arguments of sorts τ 1 , . . . , τ l and a result of sort τ . Bruno Blanchet (INRIA) Applied pi calculus April 2015 7 / 47

  9. Introduction The language Main theorem Proof Conclusion Sorts Special sort Channel � τ � for channels. Bruno Blanchet (INRIA) Applied pi calculus April 2015 8 / 47

  10. Introduction The language Main theorem Proof Conclusion Sorts Special sort Channel for channels. The unsorted applied pi is a particular case of the sorted applied pi, using the single sort Channel. The sort system enforces that: Functional applications are well-sorted. M and N are of the same sort in the conditional expression. N has sort Channel in the input and output expressions. The sort system can enforce that channels are names or variables: choose types of functions so that no function returns sort Channel. Active substitutions preserve sorts. Bruno Blanchet (INRIA) Applied pi calculus April 2015 8 / 47

  11. Introduction The language Main theorem Proof Conclusion Semantics: equations The signature Σ is equipped with an equational theory closed under substitutions of terms for variables and names; intuitively, defined from equations that do not contain names; respects the sort system; non-trivial, that is, there exist two different terms in each sort. Example fst(( x , y )) = x snd(( x , y )) = y dec(enc( x , y ) , y ) = x check( x , sign( x , sk( y )) , pk( y )) = ok Equality modulo the equational theory: Σ ⊢ M = N . Bruno Blanchet (INRIA) Applied pi calculus April 2015 9 / 47

  12. Introduction The language Main theorem Proof Conclusion Semantics: preliminary definitions Processes are considered equal modulo renaming of bound names and variables. Needed to define P { M / x } . A context is a (possibly extended) process with a hole. An evaluation context is a context whose hole is not under a replication, a conditional, an input, or an output. E ::= evaluation context hole A | E parallel composition E | A parallel composition ν n . E name restriction ν x . E variable restriction Bruno Blanchet (INRIA) Applied pi calculus April 2015 10 / 47

  13. Introduction The language Main theorem Proof Conclusion Semantics: structural equivalence Structural equivalence ≡ equivalence relation closed by application of evaluation contexts ≡ A | 0 Par- 0 A A | ( B | C ) ≡ ( A | B ) | C Par-A Par-C A | B ≡ B | A ! P ≡ P | ! P Repl ν n . 0 ≡ New- 0 0 New-C ν u .ν v . A ≡ ν v .ν u . A A | ν u . B ≡ ν u . ( A | B ) New-Par when u �∈ fv ( A ) ∪ fn ( A ) ν x . { M / Alias x } ≡ 0 { M / { M / x } | A { M / x } | A ≡ x } Subst { M / { N / Rewrite x } ≡ x } when Σ ⊢ M = N Bruno Blanchet (INRIA) Applied pi calculus April 2015 11 / 47

  14. Introduction The language Main theorem Proof Conclusion Semantics: internal reduction Internal reduction → closed by structural equivalence closed by application of evaluation contexts N � x � . P | N ( x ) . Q → P | Q Comm if M = M then P else Q → Then P if M = N then P else Q → Else Q for any ground terms M and N such that Σ �⊢ M = N Using structural equivalence: ν x . ( { M / N � M � . P | N ( x ) . Q ≡ x } | N � x � . P | N ( x ) . Q ) ν x . ( { M / → x } | P | Q ) by Comm P | Q { M / ≡ x } Bruno Blanchet (INRIA) Applied pi calculus April 2015 12 / 47

  15. Introduction The language Main theorem Proof Conclusion Preliminary definitions dom ( A ): domain, set of variables that A exports. fv ( A ): free variables A is closed when its free variables are all defined by an active substitution, that is, dom ( A ) = fv ( A ). E [ ] closes A when E [ A ] is closed. A ⇓ a when A → ∗ ≡ E [ a � M � . P ] for some evaluation context E [ ] that does not bind a . A can send a message on channel a . Bruno Blanchet (INRIA) Applied pi calculus April 2015 13 / 47

  16. Introduction The language Main theorem Proof Conclusion Observational equivalence Definition An observational bisimulation is a symmetric relation R between closed extended processes with the same domain such that A R B implies: 1 if A ⇓ a , then B ⇓ a ; 2 if A → ∗ A ′ and A ′ is closed, then B → ∗ B ′ and A ′ R B ′ for some B ′ ; 3 E [ A ] R E [ B ] for all closing evaluation contexts E [ ]. Observational equivalence ( ≈ ) is the largest such relation. Intuitively, A ≈ B when an adversary (evaluation context) cannot distinguish A from B . Hard to prove because of the universal quantification over all contexts. Use a labeled bisimulation. Bruno Blanchet (INRIA) Applied pi calculus April 2015 14 / 47

  17. Introduction The language Main theorem Proof Conclusion Equality in a frame A frame ϕ is an extended process built up from 0 and active substitutions { M / x } by parallel composition and restriction. The frame of A , ϕ ( A ), is obtained replacing every plain process in A with 0 . Definition Two terms M and N are equal in the frame ϕ , written ( M = N ) ϕ , if and only if fv ( M ) ∪ fv ( N ) ⊆ dom ( ϕ ), ϕ ≡ ν � n .σ , M σ = N σ , and { � n } ∩ ( fn ( M ) ∪ fn ( N )) = ∅ for some names � n and substitution σ . Independent of the representative ν � n .σ . Bruno Blanchet (INRIA) Applied pi calculus April 2015 15 / 47

Recommend


More recommend