case study: using pvs to analyze security protocols

21
Case Study: Using PVS to Analyze Security Protocols Kyle Taylor

Upload: mieko

Post on 14-Jan-2016

24 views

Category:

Documents


0 download

DESCRIPTION

Case Study: Using PVS to Analyze Security Protocols. Kyle Taylor. Overview. Using PVS: Specify Communication Specify Encryption Specify Intruder Specify Protocol Analyze Results. What is PVS. General Prototype Verification System Inductive Theorem Prover - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Case Study: Using PVS to Analyze Security Protocols

Case Study: Using PVS to Analyze Security Protocols

Kyle Taylor

Page 2: Case Study: Using PVS to Analyze Security Protocols

Overview

Using PVS:– Specify Communication– Specify Encryption– Specify Intruder– Specify Protocol– Analyze Results

Page 3: Case Study: Using PVS to Analyze Security Protocols

What is PVS

General– Prototype Verification System– Inductive Theorem Prover– Augments classical higher-order logic with an

advanced type system– Implemented in Common Lisp– Based upon 20 years of experience– Emacs Interface

Page 4: Case Study: Using PVS to Analyze Security Protocols

What is PVS Cont.

Intended for the formalization of requirements and high level design

Functional Specification Language– Haskell, Lisp, ML

PVS consists of– Specification language– Predefined theories– Proof Checker

Page 5: Case Study: Using PVS to Analyze Security Protocols

PVS Specification Language

Type checking is undecidable because of constrained types

– Generates proof obligations for the theorem prover Assumptions Definitions Axioms Conjectures Theorems Lemmas

Page 6: Case Study: Using PVS to Analyze Security Protocols

PVS Proof Checker

Provides a collection of powerful primitive inference procedures– Propositional and quantified rules– Induction– Rewriting– Decision procedures for linear arithmatic

Requires Interactive proving– Contains automated proof strategies

Page 7: Case Study: Using PVS to Analyze Security Protocols

PVS and Security

PVS does not have built in security or communication primitives

The primitives need to be defined when a specification is developed

Luckily the definitions of the security primitives can be reused

Page 8: Case Study: Using PVS to Analyze Security Protocols

Communication and Encryption

Messages are defined as a function– Said(Sender: P, Receiver: P, Fields: F)

Fields are constructed by type coercion– Agent(Principle: P): F– Num(num: nat): F– Pkey(pkey: K): F– Con(field: F, field: F): F– Ped(pkey: K, field: F): F

Page 9: Case Study: Using PVS to Analyze Security Protocols

Communication and Encryption Cont

Encryption– Pub(principle: P): K– Priv(principle: P): K– Invkey(key: K): K

Axiom– Invkey(pub(A))=priv(A)

Page 10: Case Study: Using PVS to Analyze Security Protocols

Specifying Security

Parts(S)– All sub fields of a set S

Analz(S)– All sub fields of a set S that is accessible to an attacker

Synth(S)– The set of fields that is constructible for S

Secret()– Basic secrets

Initial()– Initial attacker knowledge

Page 11: Case Study: Using PVS to Analyze Security Protocols

Specifying a Protocol

Each protocol step is a function– The function accepts a Message and a Trace– The function returns a bool– The function constrains the Message and the Trace

Page 12: Case Study: Using PVS to Analyze Security Protocols

Specifying an Intruder

Done with a function– The function accepts a Message, a Trace, and a set

of initial knowledge– The function returns a bool– Constructs messages from a set of initial knowledge

and the set of derivable knowledge present in a trace

– Constructed message is from the intruder

Page 13: Case Study: Using PVS to Analyze Security Protocols

ffgg Protocol

1. AB: A

2. BA: B, N1, N2

3. AB: A, {N1, N2, M}PKB % {N1, X, Y}PKB

4. BA: N1, X, {X, Y, N1}PKB

Page 14: Case Study: Using PVS to Analyze Security Protocols

Ffgg Attack

AB: A (A)B’: A % masquerade B(A): N1, N2

B’(A): N’1, N’2 (B)A: N1, N’1 AB: {N1, N’1, M}PKB

B(A):N1, N’1, {N’1, M, N1}PKB

(A)B’: {N’1, M, N1}PKB

B’(A): N’1, M, {M, N1, N’1}PKB

Page 15: Case Study: Using PVS to Analyze Security Protocols

ffgg Specification

a1(E,H): bool=

EXISTS (A, B):

A /= B AND

E = Said(A, B, Con(Num(1), Agent(A)))

Page 16: Case Study: Using PVS to Analyze Security Protocols

ffgg Specification Cont

ffgg(Q: trace): RECURSIVE bool= CASES Q OF cons(E, H): ffgg(H) AND (Fake(E, H, initial) OR a1(E, H) OR b2(E, H) OR a3(E, H) OR b4(E, H)), null: TRUE ENDCASES MEASURE length

Page 17: Case Study: Using PVS to Analyze Security Protocols

ffgg Results

PVS derived a case enumerating a trace of the attack that the user would have to prove

Page 18: Case Study: Using PVS to Analyze Security Protocols

Discussion

Lessons Learned– Learning PVS is not trivial

Specification and prover are not intuitive

– Theorem proving has the ability to be very useful– Security is tricky

Limitations– Amount of background required of the user– Amount of training time required– Ambiguity of specification

Page 19: Case Study: Using PVS to Analyze Security Protocols

Future Work

Develop a theorem prover that is specifically designed for Security protocols (Athena?)

Provide a less powerful specification language to increase simplicity

Provide better separation of modules

Page 20: Case Study: Using PVS to Analyze Security Protocols

Conclusion

6 month estimate to learn PVS is very optimistic

One on one training with a PVS guru is a must Limited use due to ambiguity of specifications

Page 21: Case Study: Using PVS to Analyze Security Protocols

References

Millen, “A Necessarily Parallel Attack”, FMSP ‘99, http://www.csl.sri.com/users/millen/capsl/

Crow, Owre, Rushby, Shankar, Srivas, “A Tutorial Introduction to PVS” WIFT ’95, http://pvs.csl.sri.com/

Butler, “An elementary tutorial on formal specification and verification using PVS”, http://pvs.csl.sri.com/

Owre, Shankar, Rushby, “The PVS Specification Language”, http://pvs.csl.sri.com/

Owre, Shankar, Rushby, “Users Guide for the PVS Specification and Verification System”, http://pvs.csl.sri.com/