Analysis Techniques. Protocol Verification by the Inductive Method. Analysis using theorem proving. Recall: protocol state space.

Similar documents
CS 395T. Analyzing SET with Inductive Method

Mechanized Proofs for a Recursive Authentication Protocol

E-commerce security: SSL/TLS, SET and others. 4.1

Mechanising BAN Kerberos by the Inductive Method

Computer Networks & Security 2016/2017

Analysis of an E-voting Protocol using the Inductive Method

Chapter 8 Web Security

Mechanized Proofs of Security Protocols: Needham-Schroeder with Public Keys

Overview. Symbolic Protocol Analysis. Protocol Analysis Techniques. Obtaining a Finite Model. Decidable Protocol Analysis. Strand Space Model

Spring 2010: CS419 Computer Security

E-commerce security: SSL/TLS, SET and others. 4.2

Computer Networking. What is network security? Chapter 7: Network security. Symmetric key cryptography. The language of cryptography

CS 395T. Symbolic Constraint Solving

Relations Between Secrets: Two Formal Analyses of the Yahalom Protocol

Module: Cryptographic Protocols. Professor Patrick McDaniel Spring CMPSC443 - Introduction to Computer and Network Security

How Formal Analysis and Verification Add Security to Blockchain-based Systems

Information Security. message M. fingerprint f = H(M) one-way hash. 4/19/2006 Information Security 1

UNIT - IV Cryptographic Hash Function 31.1

SSL/TLS & 3D Secure. CS 470 Introduction to Applied Cryptography. Ali Aydın Selçuk. CS470, A.A.Selçuk SSL/TLS & 3DSec 1

Cryptography & Key Exchange Protocols. Faculty of Computer Science & Engineering HCMC University of Technology

The Inductive Approach to Verifying Cryptographic Protocols

What did we talk about last time? Public key cryptography A little number theory

Key Management. Digital signatures: classical and public key Classic and Public Key exchange. Handwritten Signature

KEY AGREEMENT PROTOCOLS. CIS 400/628 Spring 2005 Introduction to Cryptography. This is based on Chapter 13 of Trappe and Washington

Background. Network Security - Certificates, Keys and Signatures - Digital Signatures. Digital Signatures. Dr. John Keeney 3BA33

Cryptographic Checksums

Chapter 9: Key Management

CSC 5930/9010 Modern Cryptography: Public-Key Infrastructure

14. Internet Security (J. Kurose)

Design and Analysis of Protocols The Spyce Way

A Remote Biometric Authentication Protocol for Online Banking

Towards Verifying Voter Privacy Through Unlinkability

CS 395T. Formal Model for Secure Key Exchange

Implementing Cryptography: Good Theory vs. Bad Practice

CS Computer Networks 1: Authentication

But where'd that extra "s" come from, and what does it mean?

Analysis Of SET In CPAL-ES

Fair Exchange Protocols

Bitcoin (Part I) Ken Calvert Keeping Current Seminar 22 January Keeping Current 1

Security: Focus of Control

Information Security & Privacy

Crypto Background & Concepts SGX Software Attestation

Fair exchange and non-repudiation protocols

Kurose & Ross, Chapters (5 th ed.)

S. Erfani, ECE Dept., University of Windsor Network Security

Principles of Security Part 4: Authentication protocols Sections 1 and 2

CS530 Authentication

Security protocols and their verification. Mark Ryan University of Birmingham

Bitcoin and Blockchain

Overview. Cryptographic key infrastructure Certificates. May 13, 2004 ECS 235 Slide #1. Notation

Outline More Security Protocols CS 239 Computer Security February 4, 2004

Formal Methods for Assuring Security of Computer Networks

Formal methods for software security

Introduction to Security

Public-Key Infrastructure NETS E2008

1.264 Lecture 27. Security protocols Symmetric cryptography. Next class: Anderson chapter 10. Exercise due after class

Digital Certificates Demystified

P2_L8 - Hashes Page 1

Verfying the SSH TLP with ProVerif

Elements of Cryptography and Computer and Networking Security Computer Science 134 (COMPSCI 134) Fall 2016 Instructor: Karim ElDefrawy

Issues. Separation of. Distributed system security. Security services. Security policies. Security mechanism

Diffie-Hellman. Part 1 Cryptography 136

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ

Cryptography and Network Security

Chapter 6: Security of higher layers. (network security)

Crypto meets Web Security: Certificates and SSL/TLS

Chapter 13. Digital Cash. Information Security/System Security p. 570/626

Secure Reactive Systems, Day 3: Reactive Simulatability Property Preservation and Crypto. Examples

Lecture 10, Zero Knowledge Proofs, Secure Computation

A ROLE-BASED SPECIFICATION OF THE SET PAYMENT TRANSACTION PROTOCOL

CS 161 Computer Security

Outline More Security Protocols CS 239 Computer Security February 6, 2006

Security: Focus of Control. Authentication

An Executable Model for JFKr

Verification of Security Protocols

Cryptographic Protocols 1

Cryptographically Sound Security Proofs for Basic and Public-key Kerberos

CSCI 454/554 Computer and Network Security. Topic 5.2 Public Key Cryptography

Cristina Nita-Rotaru. CS355: Cryptography. Lecture 17: X509. PGP. Authentication protocols. Key establishment.

Lecture 7 - Applied Cryptography

Lecture 15 PKI & Authenticated Key Exchange. COSC-260 Codes and Ciphers Adam O Neill Adapted from

On the Internet, nobody knows you re a dog.

Outline Key Management CS 239 Computer Security February 9, 2004

Computer Security. 08r. Pre-exam 2 Last-minute Review Cryptography. Paul Krzyzanowski. Rutgers University. Spring 2018

Extensions of BAN. Overview. BAN Logic by Heather Goldsby Michelle Pirtle

ICS 180 May 4th, Guest Lecturer: Einar Mykletun

Outline. CSCI 454/554 Computer and Network Security. Introduction. Topic 5.2 Public Key Cryptography. 1. Introduction 2. RSA

Security in ECE Systems

Lecture 30. Cryptography. Symmetric Key Cryptography. Key Exchange. Advanced Encryption Standard (AES) DES. Security April 11, 2005

Formal Methods for Security Protocols

CS 425 / ECE 428 Distributed Systems Fall 2017

Encryption. INST 346, Section 0201 April 3, 2018

A Derivation System for Security Protocols and its Logical Formalization

Security & Privacy. Larry Rudolph. Pervasive Computing MIT SMA 5508 Spring 2006 Larry Rudolph

CIS 4360 Secure Computer Systems Applied Cryptography

Outline. Public Key Cryptography. Applications of Public Key Crypto. Applications (Cont d)

Mechanized Proofs for a Recursive Authentication Protocol 1

The automatic security protocol verifier ProVerif

CSC 774 Network Security

Glenda Whitbeck Global Computing Security Architect Spirit AeroSystems

Transcription:

CS 259 Protocol Verification by the Inductive Method Analysis Techniques Crypto Protocol Analysis Formal Models Dolev-Yao (perfect cryptography) Computational Models John Mitchell Modal Logics Model Checking Process Calculi Inductive Proofs Random oracle Probabilistic process calculi Probabilistic I/O automata BAN logic Spi-calculus Finite processes, finite attacker Finite processes, infinite attacker Recall: protocol state space Analysis using theorem proving [Paulson]...... Participant + attacker actions define a state transition graph A path in the graph is a trace of the protocol Graph can be Finite if we limit number of agents, size of message, etc. Infinite otherwise Correctness instead of bugs Use higher-order logic to reason about possible protocol executions No finite bounds Any number of interleaved runs Algebraic theory of messages No restrictions on attacker Mechanized proofs Automated tools can fill in parts of proofs Proof checking can prevent errors in reasoning Inductive proofs Define set of traces Given protocol, a trace is one possible sequence of events, including attacks Prove correctness by induction For every state in every trace, no security condition fails Works for safety properties only Proof by induction on the length of trace Two forms of induction Usual form for n Nat. P(n) Base case: P(0) Induction step: P(x) P(x+1) Conclusion: n Nat. P(n) Minimial counterexample form Assume: x [ P(x) y<x. P(y) ] Prove: contraction Conclusion: n Nat. P(n) Both equivalent to the natural numbers are well-ordered 1

Use second form Given set of traces Choose shortest sequence to bad state Assume all steps before that OK Derive contradiction Consider all possible steps Sample Protocol Goals Authenticity: who sent it? Fails if A receives message from B but thinks it is from C Integrity: has it been altered? Fails if A receives message from B but message is not what B sent Secrecy: who can receive it? Fails if attacker knows message that should be secret Anonymity Fails if attacker or B knows action done by A All states are good Bad state These are all safety properties Inductive Method in a Nutshell Work by Larry Paulson Stanford Phd 1981 Informal Protocol Description Theorem is correct Abstract trace model Correctness theorem about traces Try to prove the theorem Attacker inference rules same for all protocols! Isabelle theorem prover General tool; protocol work since 1997 Papers describing method Many case studies Verification of SET protocol (6 papers) Kerberos (3 papers) TLS protocol Yahalom protocol, smart cards, etc http://www.cl.cam.ac.uk/users/lcp/papers/protocols.html Isabelle Automated support for proof development Higher-order logic Serves as a logical framework Supports ZF set theory & HOL Generic treatment of inference rules Powerful simplifier & classical reasoner Strong support for inductive definitions 2

Agents and Messages agent A,B, = Server Friend i Spy msg X,Y, = Agent A Nonce N Key K { X, Y } Crypt X K Protocol semantics Traces of events: A sends X to B Operational model of agents Algebraic theory of messages (derived) A general attacker Proofs mechanized using Isabelle/HOL Typed, free term algebra, Define sets inductively Traces Set of sequences of events Inductive definition involves implications if ev 1,, ev n evs, then add ev to evs Information from a set of messages parts H : parts of messages in H analz H : information derivable from H synth H : msgs constructible from H Protocol events in trace Several forms of events A sends B message X A receives X A stores X A B {A,N A } pk(b) B A {N B,N A } pk(a) A B {N B } pk(b) If ev is a trace and Na is unused, add Says A B Crypt(pk B){A,Na} If Says A B Crypt(pk B){A,X} ev and Nb is unused, add Says B A Crypt(pk A){Nb,X} If Says...{X,Na}... ev, add Says A B Crypt(pk B){X} Dolev-Yao Attacker Model Attacker Capabilities: Analysis Attacker is a nondeterministic process Attacker can Intercept any message, decompose into parts Decrypt if it knows the correct key Create new message from data it has observed Attacker cannot Gain partial knowledge Perform statistical tests Stage timing attacks, analz H is what attacker can learn from H X H X analz H {X,Y} analz H X analz H {X,Y} analz H Y analz H Crypt X K analz H & K -1 analz H X analz H 3

Attacker Capabilities: Synthesis synth H is what attacker can create from H X H X synth H X synth H & Y synth H {X,Y} synth H X synth H & K synth H Crypt X K synth H infinite set! Equations and implications analz(analz H) = analz H synth(synth H) = synth H analz(synth H) = analz H synth H synth(analz H) =??? Nonce N synth H Nonce N H Crypt K X synth H Crypt K X H or X synth H & K H Attacker and correctness conditions If X synth(analz(spies evs)), add Says Spy B X X is not secret because attacker can construct it from the parts it learned from events If Says B A {N b,x} pk(a) evs & Says A B {N b } pk(b) evs, Then Says A B {N b } pk(b) evs If B thinks he s talking to A, then A must think she s talking to B Secure Electronic Transactions (SET) Cardholders and Merchants register They receive electronic credentials Proof of identity Evidence of trustworthiness Payment goes via the parties banks Merchants don t need card details Bank does not see what you buy Isabelle verification by Larry Paulson, Giampaolo Bella, and Fabio Massacci SET Certificate Hierarchy Dual Signatures (idea used in SET) Root CA (SET Co) Brand CA (MasterCard, Visa) Geo-Political CA (optional) (only for VISA) MESSAGE 1 PRIVATE KEY DIGEST 1 HASH 1 & 2 WITH SHA DIGEST 2 NEW DIGEST MESSAGE 2 CONCATENATE DIGESTS TOGETHER HASH WITH SHA TO CREATE NEW DIGEST SIGN NEW DIGEST WITH SIGNER S PRIVATE KEY Cardholder CA (Banesto) Cardholder Merchant CA (Banesto) Merchant Payment Gateway CA (MasterCard, Banesto in VISA) Payment Gateway SOURCE: INZA.COM DUAL SIGNATURE Link two messages sent to different receivers Each receiver can only read one message Alice checks (message1, digest2, dual sig) Bob checks (message2, digest1, dual sig) 4

Verifying the SET Protocols Several sub-protocols Complex cryptographic primitives Many types of principals Cardholder, Merchant, Payment Gateway, CAs Dual signatures: partial sharing of secrets 1000 pages of specification and description The upper limit of realistic verification SET terminology Issuer cardholder s bank Acquirer merchant s bank Payment gateway pays the merchant Certificate authority (CA) issues electronic credentials Trust hierarchy top CAs certify others Players Processor SOURCE: Michael I Shamos Processor 3. Acquiring Bank s Processor direct connections to MC /VI obtains authorization from Issuer returns response to merchant five digit number that must be stored SOURCE: Michael I Shamos 4. Issuing Bank / Processor receives auth request verifies available funds places hold on funds Card Associations 2.Card Authorization via dial, lease line, satellite 9. Acquiring Bank funds merchant 8. MC / VI debit issuers / credit acquirers Authorizations Batch Settlement Issuing Bank Issues card Extends credit Assumes risk of card Cardholder reporting Consumer Merchant Merchant Bank (Acquirer) Sets up merchant Extends credit Assumes risk of merchant Funds merchant 1. Customer pays with card card swiped mag data read (get signature) 5. Merchant stores authorizations and sales conducted captures sales (at end of day) submits batch for funding 6. Acquiring Bank / Processor scans settlement file verifies authorizations match captured data prepares file for MC/VI prepares funding file records txs for reporting 7. Issuing Bank / Processor receives settlement file from MC / VI funds MC / VI matches txs to auths post txs to cardholder records transactions for reporting SET Documentation The 5 sub-protocols of SET Business Description General overview 72 pages Programmer s Guide Message formats & English description of actions 619 pages Formal Protocol Definition Message formats & the equivalent ASN.1 definitions 254 pages Cardholder registration Merchant registration Purchase request Payment authorization Payment capture Will look at these two briefly Total: 945 pages 5

Cardholder Registration SET messages Two parties Cardholder C Certificate authority CA C delivers credit card number C completes registration form Inserts security details Discloses his public signature key Outcomes C s bank can vet the registration CA associates C s signing key with card details Message 5 in Isabelle Secrecy of Session Keys Three keys, created for digital envelopes Dependency: one key protects another Main theorem on this dependency relation Generalizes an approach used for simpler protocols (Yahalom) Similarly, prove secrecy of Nonces Purchase Phase Use SET Dual Signature 3-way agreement with partial knowledge Cardholder shares Order Information (OI) only with Merchant Cardholder shares Payment Information (PI) only with Payment Gateway Cardholder signs hashes of OI, PI Non-repudiation All parties sign messages 6

Messages The Purchase Request message Complications in SET proofs Massive redundancy Caused by hashing and dual signature E.g. 9 copies of purchase amount in one message! Multi-page subgoals Insufficient redundancy (no explicitness), failure of one agreement property Many digital envelopes Inductive Method: Pros & Cons Advantages Reason about infinite runs, message spaces Trace model close to protocol specification Can prove protocol correct Disadvantages Does not always give an answer Failure does not always yield an attack Still trace-based properties only Labor intensive Must be comfortable with higher-order logic Caveat Quote from Paulson (J Computer Security, 2000) The Inductive Approach to Verifying Cryptographic Protocols The attack on the recursive protocol [40] is a sobering reminder of the limitations of formal methods Making the model more detailed makes reasoning harder and, eventually, infeasible. A compositional approach seems necessary Reference [40] P.Y.A. Ryan and S.A. Schneider, An attack on a recursive authentication protocol: A cautionary tale. Information Processing Letters 65, 1 (January 1998) pp 7 10. 7