YAPA: A generic tool for computing intruder knowledge Mathieu Baudet - - PowerPoint PPT Presentation

yapa a generic tool for computing intruder knowledge
SMART_READER_LITE
LIVE PREVIEW

YAPA: A generic tool for computing intruder knowledge Mathieu Baudet - - PowerPoint PPT Presentation

YAPA: A generic tool for computing intruder knowledge Mathieu Baudet 1 eronique Cortier 2 and St ephanie Delaune 3 Joint work with V 1 DCSSI, France 2 LORIA, CNRS & INRIA project Cassis, France 3 LSV, ENS Cachan & CNRS & INRIA,


slide-1
SLIDE 1

YAPA: A generic tool for computing intruder knowledge

Mathieu Baudet1 Joint work with V´ eronique Cortier2 and St´ ephanie Delaune3

1DCSSI, France 2LORIA, CNRS & INRIA project Cassis, France 3LSV, ENS Cachan & CNRS & INRIA, France

RTA’2009, Braz´ ılia, June 29.

1 / 41

slide-2
SLIDE 2

Content of the talk

1 Motivations

Why study static equivalence ? Why a new tool ?

2 Results

Overview of the procedure Examples Proving termination and non-failure

3 Conclusion

2 / 41

slide-3
SLIDE 3

Motivations

Content of the talk

1 Motivations

Why study static equivalence ? Why a new tool ?

2 Results

Overview of the procedure Examples Proving termination and non-failure

3 Conclusion

3 / 41

slide-4
SLIDE 4

Motivations Why study static equivalence ?

Static equivalence (teaser)

1 A useful logical tool for security protocols. 2 A nice and general algebraic notion. 4 / 41

slide-5
SLIDE 5

Motivations Why study static equivalence ?

Algebraic framework

  • Consider a set Fpub of first-order symbols

f : s × · · · × s → s. (Single sort s assumed for simplicity.)

  • A Fpub-algebra is a set A together with functions

fA : A × · · · × A → A.

  • Standard definitions : Fpub-morphisms, generated

sub-algebras Fpub[S] ⊆ A, free algebra Fpub[X], . . .

5 / 41

slide-6
SLIDE 6

Motivations Why study static equivalence ?

Static equivalence (algebraic definition)

  • Consider the tuples ϕ = (t1, . . . , tn) in An, also

called frames and written ϕ = {w1 ⊲ t1, . . . , wn ⊲ tn}.

  • A formal equation on An is a pair M1 ⊲

⊳ M2 where M1, M2 ∈ Fpub[w1, . . . , wn] are terms built upon special constants wi.

6 / 41

slide-7
SLIDE 7

Motivations Why study static equivalence ?

Static equivalence (algebraic definition)

  • Consider the tuples ϕ = (t1, . . . , tn) in An, also

called frames and written ϕ = {w1 ⊲ t1, . . . , wn ⊲ tn}.

  • A formal equation on An is a pair M1 ⊲

⊳ M2 where M1, M2 ∈ Fpub[w1, . . . , wn] are terms built upon special constants wi. Definition Two frames ϕ1 and ϕ2 in An are statically equivalent (from [Abadi and Fournet, 2001]), written ϕ1 ≈ ϕ2, iff eq(ϕ1) = eq(ϕ2) where eq(ϕ) = {M1 ⊲ ⊳ M2 | M1ϕ =A M2ϕ}.

7 / 41

slide-8
SLIDE 8

Motivations Why study static equivalence ?

A mathematical example

Example Let n = 1, A = C and the terms M ∈ Q[w1] be rational polynomials with single variable w1. We have ϕ1 ≈ ϕ2 iff ϕ1 and ϕ2 are both transcendental or are conjugated elements (i.e. have the same minimal polynomial over Q). For instance, π ≈ e and √ 2 ≈ − √ 2. We are currently investigating further links with the fundamentals of algebraic geometry. (Ask me for more details !)

8 / 41

slide-9
SLIDE 9

Motivations Why study static equivalence ?

Back to logics and security protocols I

  • We are interested in modeling cryptographic

messages : we let A be an F-algebra of ground terms taken modulo an equational theory E, where Fpub F.

  • Typically, the symbols in F − Fpub are free constants

modeling secret keys or random numbers.

  • E is generated by a finite set of equations modeling

the cryptographic primitives.

9 / 41

slide-10
SLIDE 10

Motivations Why study static equivalence ?

Back to logics and security protocols II

  • Static equivalence models indistinguishability between

messages from an attacker’s point of view.

  • Another classical problem is deducibility :

Given ϕ ∈ An and t ∈ A, does there exist M ∈ Fpub[w1, . . . , wn] such that Mϕ =A t ?

N.B. Such an M is often called a recipe of t.

10 / 41

slide-11
SLIDE 11

Motivations Why study static equivalence ?

Example : deterministic symmetric encryption

  • M ∈ Fpub[w1, . . . , wn]

(recipes)

::= wi | enc(M1, M2) | dec(M1, M2)

  • t ∈ F[∅] ::= kj | enc(t1, t2) | dec(t1, t2)

(plain terms)

  • Let E be generated by dec(enc(x, y), y) = x.
  • Consider ϕ1 = {w1 ⊲ enc(k1, k2), w2 ⊲ k2}

(frames)

and ϕ2 = {w1 ⊲ enc(k1, k2), w2 ⊲ k3}.

  • We have ϕ1 ≈E ϕ2

(ϕ1, ϕ2 not E-equivalent)

because enc(dec(w1, w2), w2)ϕ1 =E w1ϕ1 but enc(dec(w1, w2), w2)ϕ2 =E w1ϕ2

11 / 41

slide-12
SLIDE 12

Motivations Why study static equivalence ?

Equational approach to security protocols I

  • Similar equational settings used in popular

specification languages such as the applied pi calculus [Abadi and Fournet, 2001], or Proverif’s language [Blanchet, 2001, Blanchet et al., 2008].

  • Studying full protocols requires a more general notion
  • f observational equivalence.

12 / 41

slide-13
SLIDE 13

Motivations Why study static equivalence ?

Equational approach to security protocols II

  • Proof techniques for observational equivalence include

– labelled bisimulations built on the top of static equivalence [Abadi and Fournet, 2001], – and symbolic semantics based on a generalization of static equivalence [Baudet, 2005, Delaune et al., 2007].

  • Static equivalence also applied to characterize

guessing attacks [Corin et al., 2004, Baudet, 2005]

  • Correspondance between static equivalence and

cryptographic (a.k.a. computational) indistinguishability investigated in several papers, e.g. [Abadi et al., 2006].

13 / 41

slide-14
SLIDE 14

Motivations Why a new tool ?

More equational theories I

  • More involved examples of cryptographic equational

theories include (see e.g. [Cortier et al., 2006])

– public-key encryption : pdec(penc(x, pub(y), z), y) = x – signatures : checksign(sign(x, y), pub(y)) = ok

14 / 41

slide-15
SLIDE 15

Motivations Why a new tool ?

More equational theories I

  • More involved examples of cryptographic equational

theories include (see e.g. [Cortier et al., 2006])

– public-key encryption : pdec(penc(x, pub(y), z), y) = x – signatures : checksign(sign(x, y), pub(y)) = ok – XOR symbol : AC[⊕] x ⊕ x = 0 – XOR-homomorphic symbols : h(x ⊕ y) = h(x) ⊕ h(y) – Diffie-Hellman exponents : (gx)y = (gy)x

15 / 41

slide-16
SLIDE 16

Motivations Why a new tool ?

More equational theories I

  • More involved examples of cryptographic equational

theories include (see e.g. [Cortier et al., 2006])

– public-key encryption : pdec(penc(x, pub(y), z), y) = x – signatures : checksign(sign(x, y), pub(y)) = ok – XOR symbol : AC[⊕] x ⊕ x = 0 – XOR-homomorphic symbols : h(x ⊕ y) = h(x) ⊕ h(y) – Diffie-Hellman exponents : (gx)y = (gy)x – pair-homomorphic encryption : . . . enc(x, y, z) = enc(x, z), enc(y, z) – prefix-homomorphic encryption : . . . pref(enc(x, y, z)) = enc(x, z) – blind signatures : checksign(sign(x, y), pub(y)) =

  • k

unblind(blind(x, y), y) = x unblind(sign(blind(x, y), z), y) = sign(x, z)

16 / 41

slide-17
SLIDE 17

Motivations Why a new tool ?

More equational theories II

  • Each of these theories yields new deduction and

static-equivalence problems to decide.

  • So far the only applicable tool to static equivalence

has been Proverif [Blanchet et al., 2008], but it does not make use of the specialized, existing decision procedures for static equivalence [Abadi and Cortier, 2006, Cortier and Delaune, 2007].

17 / 41

slide-18
SLIDE 18

Motivations Why a new tool ?

Our contributions

Focusing on theories E generated by convergent rewrite systems R :

  • We present a uniform procedure for deducibility and

static equivalence, that is

– sound and complete, up to explicit failure cases, – provably non failing on a syntactic class of theories called layered, – “as much terminating as possible” in non-failing cases (termination implied by finite representation of deducible terms).

  • We provide an efficient Ocaml implementation :

http://www.lsv.ens-cachan.fr/~baudet/yapa/

18 / 41

slide-19
SLIDE 19

Results

Content of the talk

1 Motivations

Why study static equivalence ? Why a new tool ?

2 Results

Overview of the procedure Examples Proving termination and non-failure

3 Conclusion

19 / 41

slide-20
SLIDE 20

Results Overview of the procedure

Overview of the procedure I

  • We saturate a set of deduction facts Φ = {Mi ⊲ ti}

and a set of visible equations Ψ = {∀x.Mj ⊲ ⊳ Nj} by means of transformation rules st = ⇒ st′.

  • The initial state Init(ϕ) is (roughly)

(Φ0, Ψ0) ≃ (ϕ↓R, ∅).

  • The final state is either ⊥ (failure) or a saturated

state (Φ1, Ψ1) (success).

20 / 41

slide-21
SLIDE 21

Results Overview of the procedure

Overview of the procedure II

  • Saturated states are finite syntactic representations of

the sets of deducible terms and equations of the initial frame ϕ. Theorem (soundness and completeness) If Init(ϕ) = ⇒∗ (Φ, Ψ) is saturated, then

1 For all recipes M and ground terms t,

Mϕ =E t ⇔ ∃N s.t. Ψ ⊢ M ⊲ ⊳ N and N ⊲Φ t↓R

2 For all recipes M and N,

Mϕ =E Nϕ ⇔ Ψ ⊢ M ⊲ ⊳ N. where M ⊲Φ t ⇔ ∃C, {Mi ⊲ ti} ⊆ Φ,

  • M = C[M1, . . . , Mn]

t = C[t1, . . . , tn]

.

21 / 41

slide-22
SLIDE 22

Results Overview of the procedure

Overview of the procedure III

From saturated states Init(ϕi) = ⇒∗ (Φi, Ψi), it is easy to deduce procedures to check whether (i) t is deducible from ϕ1, that is : t↓R ∈ Fpub[im(Φ1)] (ii) eqE(ϕ1) ⊆ eqE(ϕ2), that is : for all (∀x.M ⊲ ⊳ N) ∈ Ψ1, (Mϕ2)↓R = (Nϕ2)↓R.

22 / 41

slide-23
SLIDE 23

Results Examples

Simple example

Let R = {dec(enc(x, y), y) → x} and ϕ1 = {w1 ⊲ enc(k1, k2), w2 ⊲ k2}. Deductions steps for saturating ϕ1 : w1 ⊲ enc(k1, k2) w2 ⊲ k2 dec(w1, w2) ⊲ k1 ∀x, y. dec(enc(x, y), y) ⊲ ⊳ x dec(w1, w2) ⊲ k1 w2 ⊲ k2 w1 ⊲ enc(k1, k2) enc(dec(w1, w2), w2) ⊲ ⊳ w1

23 / 41

slide-24
SLIDE 24

Results Examples

Less simple example

(with apologies for the wrong definition of Rblind in the proc.)

Let R =

   checksign(sign(x, y), pub(y)) →

  • k

unblind(blind(x, y), y) → x unblind(sign(blind(x, y), z), y) → sign(x, z)   

and ϕ1 = {w1 ⊲ blind(k, r), w2 ⊲ r}. (1) Trivial equations : ∀x, y. checksign(sign(x, y), pub(y)) ⊲ ⊳ ok ∀x, y. unblind(blind(x, y), y) ⊲ ⊳ x ∀x, y. unblind(sign(blind(x, y), z), y) ⊲ ⊳ sign(x, z)

24 / 41

slide-25
SLIDE 25

Results Examples

Less simple example

(with apologies for the wrong definition of Rblind in the proc.)

Let R =

   checksign(sign(x, y), pub(y)) →

  • k

unblind(blind(x, y), y) → x unblind(sign(blind(x, y), z), y) → sign(x, z)   

and ϕ1 = {w1 ⊲ blind(k, r), w2 ⊲ r}. (2) Failure case that must be postponed : w1 ⊲ blind(k, r) w2 ⊲ r unblind(sign(w1, z), w2) ⊲ sign(k, z) Rationals for failure cases In YAPA, accumulated deduction facts M ⊲ t must be

  • ground. Only equations ∀x, y.M ⊲

⊳ N may use quantifiers.

25 / 41

slide-26
SLIDE 26

Results Examples

Less simple example

(with apologies for the wrong definition of Rblind in the proc.)

Let R =

   checksign(sign(x, y), pub(y)) →

  • k

unblind(blind(x, y), y) → x unblind(sign(blind(x, y), z), y) → sign(x, z)   

and ϕ1 = {w1 ⊲ blind(k, r), w2 ⊲ r}. (3) Other deduction steps w1 ⊲ blind(k, r) w2 ⊲ r unblind(w1, w2) ⊲ k unblind(w1, w2) ⊲ k w2 ⊲ r w1 ⊲ blind(k, r) blind(unblind(w1, w2), w2) ⊲ ⊳ w1

26 / 41

slide-27
SLIDE 27

Results Examples

Less simple example

(with apologies for the wrong definition of Rblind in the proc.)

Let R =

   checksign(sign(x, y), pub(y)) →

  • k

unblind(blind(x, y), y) → x unblind(sign(blind(x, y), z), y) → sign(x, z)   

and ϕ1 = {w1 ⊲ blind(k, r), w2 ⊲ r}. (4) Failure case solved ! w1 ⊲ blind(k, r) w2 ⊲ r unblind(w1, w2) ⊲ k ∀z. unblind(sign(w1, z), w2) ⊲ ⊳ sign(unblind(w1, w2), z) Proving non-failure We have formalized these observations and defined a general class of non-failing theories, called layered.

27 / 41

slide-28
SLIDE 28

Results Proving termination and non-failure

A syntactic criterion for non-failure

Definition (Layered rewrite system – simplified) There exist subsystems ∅ = R0 ⊆ R1 ⊆ . . . ⊆ RN = R such that for every 0 ≤ i < N, for every rule l → r in Ri+1 − Ri, for every l = D[l1, . . . , ln, x1, . . . , xm], either (i) var(r) ⊆ var(l1, . . . , ln), or (ii) there exists C such that C[l1, . . . , ln, x1, . . . , xm]

≤1

− →Ri r. Proposition The procedure never fails on layered convergent theories. Note that the union of two layered systems is layered.

28 / 41

slide-29
SLIDE 29

Results Proving termination and non-failure

Termination

  • Proving termination by hand for one theory is

generally easy by standard techniques.

  • We provide a semantic criterion ((ii) below) as well.

Proposition Assume Init(ϕ) = ⇒∗ ⊥. The following are equivalent : (i) There exists a saturated state Init(ϕ) = ⇒∗ (Φ, Ψ). (ii) There exists a finite set of deducible terms S such that Fpub[S] covers every deducible R-normal term. (iii) There exists no fair infinite derivation from Init(ϕ).

29 / 41

slide-30
SLIDE 30

Conclusion

Content of the talk

1 Motivations

Why study static equivalence ? Why a new tool ?

2 Results

Overview of the procedure Examples Proving termination and non-failure

3 Conclusion

30 / 41

slide-31
SLIDE 31

Conclusion

Supported theories

  • Altogether, using [Abadi and Cortier, 2006], we

deduce termination and non-failure for

– subterm convergent theories R : ∀l → r in R, r ∈ st(l) ∪ F[∅]↓R – pair-homomorphic encryption : . . . enc(x, y, z) = enc(x, z), enc(y, z) – prefix-homomorphic encryption (new) : . . . pref(enc(x, y, z)) = enc(x, z) – blind signatures : checksign(sign(x, y), pub(y)) =

  • k

unblind(blind(x, y), y) = x unblind(sign(blind(x, y), z), y) = sign(x, z) – a simple theory of addition : plus(x, s(y)) = plus(s(x), y) plus(x, zero) = x pred(s(x)) = x

31 / 41

slide-32
SLIDE 32

Conclusion

Benchmarks

  • We have tested the tool on a few examples and
  • btained good results, usually faster than Proverif.
  • This is not surprising as static equivalence is an easier

problem than the (in)security of protocols as studied by Proverif.

32 / 41

slide-33
SLIDE 33

Conclusion

Summary

  • We have proposed a unifying approach to study

“intruder knowledge” for convergent theories.

  • Many equational theories are provably and efficiently

supported by the tool YAPA.

33 / 41

slide-34
SLIDE 34

Conclusion

Perspectives

  • Better comparison with Proverif and with the recent

work of [Ciobˆ ac˘ a et al., 2009], which both allow non-ground deduction facts.

  • More complex theories e.g. including a XOR symbol

(see combination theorem of [Arnaud et al., 2007]).

  • More complex algebraic properties, for instance

checking whether eq(ϕ1) ∩ eq(ϕ2) ⊆ eq(ϕ3).

  • Active case, ideally to generalize [Baudet, 2005].

34 / 41

slide-35
SLIDE 35

Conclusion

Thank you !

35 / 41

slide-36
SLIDE 36

Erratum

Erratum : Blind signatures

To see that the (corrected) theory of blind signatures is layered, let R1 = checksign(sign(x, y), pub(y)) → ok unblind(blind(x, y), y) → x

  • R2 = R1 ∪ {unblind(sign(blind(x, y), z), y) → sign(x, z)}

36 / 41

slide-37
SLIDE 37

Link with algebraic geometry

Link with algebraic geometry (ongoing work)

  • Generalize equations by allowing disjunctions :

F ::=

n

  • i=1

(M1 ⊲ ⊳ M2) ∈ Pfin(Fpub[w1, . . . , wn]2)

  • formulas(Φ) = {F | ∀ϕ ∈ Φ, ϕ |

= F} (≈ radical ideal)

  • points(I) = {ϕ | ∀F ∈ I, ϕ |

= F} (≈ algebraic set)

  • Φ ⊆ Φ = points(formulas(Φ))

(≈ algebraic closure, → Zariski topology)

  • ϕ1 ≈ ϕ2 iff formulas({ϕ1}) = formulas({ϕ2}).

37 / 41

slide-38
SLIDE 38

Bibliography

References I

Abadi, M., Baudet, M., and Warinschi, B. (2006). Guessing attacks and the computational soundness of static equivalence. In Foundations of Software Science and Computation Structures (FOSSACS’06), pages 398–412. Abadi, M. and Cortier, V. (2006). Deciding knowledge in security protocols under equational theories. Theoretical Computer Science, 387(1-2) :2–32. Abadi, M. and Fournet, C. (2001). Mobile values, new names, and secure communication. In 28th ACM Symposium on Principles of Programming Languages (POPL’01), pages 104–115. ACM. Anantharaman, S., Narendran, P., and Rusinowitch, M. (2007). Intruders with caps. In 18th International Conference on Term Rewriting and Applications (RTA’07), volume 4533 of LNCS. Springer. Arnaud, M., Cortier, V., and Delaune, S. (2007). Combining algorithms for deciding knowledge in security protocols. In Proc. 6th International Symposium on Frontiers of Combining Systems (FroCoS’07), volume 4720 of Lecture Notes in Artificial Intelligence, pages 103–117. Springer. Baudet, M. (2005). Deciding security of protocols against off-line guessing attacks. In 12th ACM Conference on Computer and Communications Security (CCS’05), pages 16–25. ACM Press. Baudet, M. (2007). S´ ecurit´ e des protocoles cryptographiques : aspects logiques et calculatoires. Th` ese de doctorat, LSV, ENS Cachan, France. 38 / 41

slide-39
SLIDE 39

Bibliography

References II

Baudet, M., Cortier, V., and Kremer, S. (2005). Computationally sound implementations of equational theories against passive adversaries. In 32nd International Colloquium on Automata, Languages and Programming (ICALP’05), volume 3580 of LNCS, pages 652–663. Springer. Blanchet, B. (2001). An Efficient Cryptographic Protocol Verifier Based on Prolog Rules. In 14th Computer Security Foundations Workshop (CSFW’01), pages 82–96. IEEE Comp. Soc. Press. Blanchet, B., Abadi, M., and Fournet, C. (2008). Automated verification of selected equivalences for security protocols. Journal of Logic and Algebraic Programming, 75(1) :3–51. Chevalier, Y., K¨ usters, R., Rusinowitch, M., and Turuani, M. (2003). An NP decision procedure for protocol insecurity with XOR. In 18th IEEE Symposium on Logic in Computer Science (LICS’03). IEEE Comp. Soc. Press. Ciobˆ ac˘ a, S ¸., Delaune, S., and Kremer, S. (2009). Computing knowledge in security protocols under convergent equational theories. In Proc. 22nd International Conference on Automated Deduction (CADE’09), Lecture Notes in Artificial Intelligence. Springer. To appear. Comon-Lundh, H. and Shmatikov, V. (2003). Intruder deductions, constraint solving and insecurity decision in presence of exclusive or. In 18th IEEE Symposium on Logic in Computer Science (LICS’03). IEEE Comp. Soc. Press. 39 / 41

slide-40
SLIDE 40

Bibliography

References III

Corin, R., Doumen, J., and Etalle, S. (2004). Analysing password protocol security against off-line dictionary attacks. In 2nd International Workshop on Security Issues with Petri Nets and other Computational Models (WISP’04), ENTCS. Cortier, V. and Delaune, S. (2007). Deciding knowledge in security protocols for monoidal equational theories. In 14th International Conference on Logic for Programming, Artificial Intelligence, and Reasoning (LPAR’07), LNAI. Springer. Cortier, V., Delaune, S., and Lafourcade, P. (2006). A survey of algebraic properties used in cryptographic protocols. Journal of Computer Security, 14(1) :1–43. Delaune, S. and Jacquemard, F. (2004). A decision procedure for the verification of security protocols with explicit destructors. In 11th ACM Conference on Computer and Communications Security (CCS’04), pages 278–287. Delaune, S., Kremer, S., and Ryan, M. D. (2007). Symbolic bisimulation for the applied pi-calculus. In Proceedings of the 27th Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS’07), volume 4855 of LNCS, pages 133–145. Springer. Delaune, S., Kremer, S., and Ryan, M. D. (2008). Verifying privacy-type properties of electronic voting protocols. Journal of Computer Security. To appear. 40 / 41

slide-41
SLIDE 41

Bibliography

References IV

Lowe, G. (1996). Breaking and fixing the Needham-Schroeder public-key protocol using FDR. In Tools and Algorithms for the Construction and Analysis of Systems (TACAS’96), volume 1055 of LNCS, pages 147–166. Springer-Verlag. Millen, J. and Shmatikov, V. (2001). Constraint solving for bounded-process cryptographic protocol analysis. In 8th ACM Conference on Computer and Communications Security (CCS’01). 41 / 41