Proving Security Protocols Correct. Lawrence C. Paulson Computer Laboratory

Similar documents
Proving Properties of Security Protocols by Induction

Verification of the TLS Handshake protocol

BAN Logic A Logic of Authentication

A Logic of Authentication

A Logic of Authentication. Borrows, Abadi and Needham TOCS 1990, DEC-SRC 1989

Notes on BAN Logic CSG 399. March 7, 2006

Strand Spaces Proving Protocols Corr. Jonathan Herzog 6 April 2001

Encoding security protocols in the cryptographic λ-calculus. Eijiro Sumii Joint work with Benjamin Pierce University of Pennsylvania

Protocol Insecurity with a Finite Number of Sessions and Composed Keys is NP-complete

Models and analysis of security protocols 1st Semester Security Protocols Lecture 6

Verification of a Diffie-Hellman Password-based Authentication Protocol by Extending the Inductive Method

On the Automatic Analysis of Recursive Security Protocols with XOR

Analysing privacy-type properties in cryptographic protocols

Verification of Security Protocols in presence of Equational Theories with Homomorphism

Time-Bounding Needham-Schroeder Public Key Exchange Protocol

Exam Security January 19, :30 11:30

A process algebraic analysis of privacy-type properties in cryptographic protocols

Analyzing the IETF ACE-OAuth Protocol

Term Rewriting applied to Cryptographic Protocol Analysis: the Maude-NPA tool

ENEE 457: Computer Systems Security 09/19/16. Lecture 6 Message Authentication Codes and Hash Functions

A Formal Analysis for Capturing Replay Attacks in Cryptographic Protocols

KEY DISTRIBUTION 1 /74

Lecture 1: Introduction to Public key cryptography

CryptoVerif: A Computationally Sound Mechanized Prover for Cryptographic Protocols

Automatic, computational proof of EKE using CryptoVerif

Lecture 7: Specification Languages

Computational Logic and the Quest for Greater Automation

APPLICATIONS OF BAN-LOGIC JAN WESSELS CMG FINANCE B.V.

COS433/Math 473: Cryptography. Mark Zhandry Princeton University Spring 2017

NSL Verification and Attacks Agents Playing Both Roles

A decidable subclass of unbounded security protocols

Control Flow Analysis of Security Protocols (I)

Lecture 1: Perfect Secrecy and Statistical Authentication. 2 Introduction - Historical vs Modern Cryptography

Elliptic Curves. Giulia Mauri. Politecnico di Milano website:

Symbolic Protocol Analysis with Products and Diffie-Hellman Exponentiation

An Efficient Cryptographic Protocol Verifier Based on Prolog Rules

2. Cryptography 2.5. ElGamal cryptosystems and Discrete logarithms

Finite Models for Formal Security Proofs

Practice Assignment 2 Discussion 24/02/ /02/2018

A Semantics for a Logic of Authentication. Cambridge, MA : A; B

MSR by Examples. Iliano Cervesato. ITT Industries, NRL Washington DC.

Automatic Verification of Complex Security Protocols With an Unbounded Number of Sessions

Fundamentals of Modern Cryptography

Probabilistic Model Checking of Security Protocols without Perfect Cryptography Assumption

CPSC 467: Cryptography and Computer Security

Lecture Notes, Week 6

A Calculus for Control Flow Analysis of Security Protocols

Typed MSR: Syntax and Examples

CODING AND CRYPTOLOGY III CRYPTOLOGY EXERCISES. The questions with a * are extension questions, and will not be included in the assignment.

Automata-based analysis of recursive cryptographic protocols

MSR by Examples. Iliano Cervesato. ITT Industries, NRL Washington DC.

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

CPSC 467: Cryptography and Computer Security

A one message protocol using cryptography, where K AB is a symmetric key shared between A and B for private communication. A B : {M} KAB on c AB

CPSC 467b: Cryptography and Computer Security

Analysing Layered Security Protocols

CS-E4320 Cryptography and Data Security Lecture 11: Key Management, Secret Sharing

Lecture th January 2009 Fall 2008 Scribes: D. Widder, E. Widder Today s lecture topics

Decidable Analysis of Cryptographic Protocols with Products and Modular Exponentiation

A Resolution Strategy for Verifying Cryptographic Protocols with CBC Encryption and Blind Signatures

Private Key Cryptography. Fermat s Little Theorem. One Time Pads. Public Key Cryptography

Lecture Notes, Week 10

The Maude-NRL Protocol Analyzer Lecture 3: Asymmetric Unification and Indistinguishability

Probabilistic Polynomial-Time Process Calculus for Security Protocol Analysis. Standard analysis methods. Compositionality

Automated Validation of Internet Security Protocols. Luca Viganò

Quantum Cryptography

Models for an Adversary-Centric Protocol Logic

CPSA and Formal Security Goals

On-the-fly Model Checking of Security Protocols

Cryptography and Security Final Exam

LCF + Logical Frameworks = Isabelle (25 Years Later)

Quantum Wireless Sensor Networks

Strand Spaces: Why is a Security Protocol Correct?

A progress report on using Maude to verify protocol properties using the strand space model

Extending Dolev-Yao with Assertions

Discrete Logarithm Problem

Dan Boneh. Introduction. Course Overview

Provable Anonymity ABSTRACT. Categories and Subject Descriptors. General Terms. Keywords

CPSC 467: Cryptography and Computer Security

Selections:! Internet voting with over-the-shoulder coercion-resistance. Jeremy Clark

14 Diffie-Hellman Key Agreement

SIGNATURE SCHEMES & CRYPTOGRAPHIC HASH FUNCTIONS. CIS 400/628 Spring 2005 Introduction to Cryptography

Proving secrecy is easy enough

Lecture 28: Public-key Cryptography. Public-key Cryptography

L7. Diffie-Hellman (Key Exchange) Protocol. Rocky K. C. Chang, 5 March 2015

1 Recommended Reading 1. 2 Public Key/Private Key Cryptography Overview RSA Algorithm... 2

TUM INSTITUT FÜR INFORMATIK. Stream Based Specification of Cryptographic Protocols and Their Composition Properties. Maria Spichkova, Jan Jürjens

Lecture 10: Zero-Knowledge Proofs

Model Checking Security Protocols Using a Logic of Belief

Solutions to the Midterm Test (March 5, 2011)

CPSC 467: Cryptography and Computer Security

Elliptic Curves and an Application in Cryptography

CPSC 467b: Cryptography and Computer Security

Public-key cryptography and the Discrete-Logarithm Problem. Tanja Lange Technische Universiteit Eindhoven. with some slides by Daniel J.

Computing on Encrypted Data

CRYPTOGRAPHY AND NUMBER THEORY

Do we have a quorum?

Attacks on DES , K 2. ) L 3 = R 2 = L 1 f ( R 1, K 2 ) R 4 R 2. f (R 1 = L 1 ) = L 1. ) f ( R 3 , K 4. f (R 3 = L 3

Authentication Tests and the Structure of Bundles

MSR 3.0: The Logical Meeting Point of Multiset Rewriting and Process Algebra. Iliano Cervesato. ITT Industries, NRL Washington, DC

Transcription:

Proving Security Protocols Correct Lawrence C. Paulson Computer Laboratory

How Detailed Should a Model Be? too detailed too simple concrete abstract not usable not credible ``proves'' everything ``attacks'' everything publications 1 L. C. Paulson

Case Study: the Plight of Monica and Bill 2 L. C. Paulson

An Internet Security Protocol (TLS) client A,Na,Sid,Pa client hello Nb,Sid,Pb server hello cert(b,kb) server certificate server cert(a,ka) client certificate {PMS} Kb client key exchange {Hash(Nb,B,PMS)} Ka -1 certificate verify M = PRF(PMS,Na,Nb) Finished = Hash(M,messages) {Finished} clientk(na,nb,m) client finished {Finished} serverk(na,nb,m) server finished 3 L. C. Paulson

Why Are Security Protocols Often Wrong? they are TRIVIAL programs built from simple primitives, BUT they are complicated by concurrency a hostile environment a bad user controls the network obscure concepts vague specifications we have to guess what is wanted 4 L. C. Paulson

Typical Protocol Goals Authenticity: who sent it? Integrity: has it been altered? Secrecy: who can receive it? Anonymity Non-repudiation... all SAFETY properties 5 L. C. Paulson

What Are Session Keys? used for a single session not safeguarded forever distributed using long-term keys could eventually become compromised can only be trusted if FRESH 6 L. C. Paulson

Freshness, or Would You Eat This Fish? wine: six years old fish:? weeks old 7 L. C. Paulson

session key Packaging a Session Key for Bill { K, A, Nb } Kb sealed using Bill's key person it's shared with nonce specified by Bill: proof of freshness 8 L. C. Paulson

A Bad Variant of the Otway-Rees Protocol S 2: Na, A, B, { Na, A, B } Ka, Nb, { Na, A, B } Kb 3: Na, { Na, Kab } Ka, { Nb, Kab } Kb 1: Na, A, B, { Na, A, B } Ka B A 4: Na, { Na, Kab } Ka 9 L. C. Paulson

A Splicing Attack with Interleaved Runs 1. A C B : Na, A, B, { Na, A, B } Ka 1. C A : Nc, C, A, { Nc, C, A } Kc 2. A C S : Nc, C, A, { Nc, C, A } Kc, Na, { Nc, C, A } Ka 2. C A S : Nc, C, A, { Nc, C, A } Kc, Na, { Nc, C, A } Ka 3. S C A : Nc, { Nc, Kca } Kc, { Na, Kca } Ka 4. C B A : Na, { Na, Kca } Ka Alice thinks the key Kca is shared with Bill, but it's shared with Carol! 10 L. C. Paulson

A Bad Variant of the Yahalom Protocol S 3: { B, Kab, Na, Nb } Ka, { A, Kab } Kb 2: B, Nb, { A, Na } Kb A 1: A, Na 4: { A, Kab } Kb, { Nb } Kab B 11 L. C. Paulson

1. C A B : A, Nc A Replay Attack 2. B C S : B, Nb, { A, Nc } Kb 4. C A B : { A, K } Kb, { Nb } K Carol has broken the old key, K. She makes Bill think it is shared with Alice. 12 L. C. Paulson

Verification Method I: Authentication Logics BAN logic: Burrows, Abadi, Needham (1989) Short proofs using high-level primitives: Nonce N is fresh Key Kab is good Agent S can be trusted good for freshness not-so-good for secrecy or splicing attacks 13 L. C. Paulson

Verification Method II: State Enumeration Specialized tools General model-checkers (Meadows) (Lowe) Model protocol as a finite-state system automatically finds splicing attacks freshness is hard to model Try using formal proof! 14 L. C. Paulson

Why An Operational Model? good fit to informal protocol proofs: inductive simple foundations readable protocol specifications easily explained to security experts easily mechanized using Isabelle 15 L. C. Paulson

An Overview of Isabelle uses higher-order logic as a logical framework generic treatment of inference rules logics supported include ZF set theory & HOL powerful simplifier & classical reasoner strong support for inductive definitions 16 L. C. Paulson

Overview of the Model Traces of events A sends B message X A receives X A stores X A powerful attacker is an accepted user attempts all possible splicing attacks has the same specification in all protocols 17 L. C. Paulson

Agents and Messages agent A, B,... = Server Friend i Spy message X, Y,... = Agent A Nonce N Key K { X, X } compound message Crypt KX free algebras: we assume PERFECT ENCRYPTION 18 L. C. Paulson

Functions over Sets of Messages parts H: message components Crypt KX X analz H: accessible components Crypt KX, K 1 X synth H: expressible messages X, K Crypt KX RELATIONS are traditional, but FUNCTIONS give us an equational theory 19 L. C. Paulson

Operational Definition: analz H Crypt KX analz H X analz H K 1 analz H X H X analz H { X, Y } analz H X analz H { X, Y } analz H Y analz H Typical derived law: analz G analz H analz(g H) 20 L. C. Paulson

Operational Definition: synth H X H X synth H X synth H Y synth H { X, Y } synth H Agent A synth H X synth H K H Crypt KX synth H agent names can be guessed nonces & keys cannot be! 21 L. C. Paulson

A Few Equations parts(parts H) = parts H analz(synth H) = analz H synth H transitivity cut elimination Symbolic Evaluation: analz({crypt KX} H) = {Crypt KX} analz({x} H) {Crypt KX} analz H if K 1 analz H otherwise 22 L. C. Paulson

What About Freshness? 23 L. C. Paulson

Modelling Attacks and Key Losses If X synth(analz(spies evs)) may add Says Spy BX (Fake rule) If the server distributes session key K may add Notes Spy { Na, Nb, K } (Oops rule) Nonces show the TIME of the loss 24 L. C. Paulson

Overview of Results facts proved by induction & classical reasoning simplifying analz H: case analysis, big formulas handles REAL protocols: TLS, Kerberos,... lemmas reveal surprising protocol features failed proofs can suggest attacks Proofs require days or weeks of effort Generalizing induction formulas is hard! 25 L. C. Paulson

The Recursive Authentication Protocol designed in industry (APM Ltd) novel recursive structure: variable length VERIFIED by Paulson assuming perfect encryption ATTACKED by Ryan and Schneider using the specified encryption (XOR) Doesn t proof give certainty? Not in the real world! 26 L. C. Paulson

So Then, How Detailed Should a Model Be? detailed enough to answer the relevant questions abstract enough to fit our budget model-checking is almost free (thanks to Lowe, Roscoe, Schneider) formal proofs give more, but cost more 27 L. C. Paulson

Don t let theory displace reality