JFK Protocol in Applied Pi Calculus CS 395T. Proving Security u“Real” protocol Process-calculus specification of the actual protocol u“Ideal” protocol.

Slides:



Advertisements
Similar presentations
Universally Composable Symbolic Analysis of Cryptographic Protocols
Advertisements

Security attacks. - confidentiality: only authorized parties have read access to information - integrity: only authorized parties have write access to.
SSL CS772 Fall Secure Socket layer Design Goals: SSLv2) SSL should work well with the main web protocols such as HTTP. Confidentiality is the top.
Authentication and Digital Signatures CSCI 5857: Encoding and Encryption.
Modeling Insider Attacks on Group Key Exchange Protocols Jonathan Katz Ji Sun Shin University of Maryland.
Apr 2, 2002Mårten Trolin1 Previous lecture On the assignment Certificates and key management –Obtaining a certificate –Verifying a certificate –Certificate.
CS 395T Computational Soundness of Formal Models.
Session 4 Asymmetric ciphers.
CNS2010handout 10 :: digital signatures1 computer and network security matt barrie.
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
Dr Alejandra Flores-Mosri Message Authentication Internet Management & Security 06 Learning outcomes At the end of this session, you should be able to:
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Co-operative Private Equality Test(CPET) Ronghua Li and Chuan-Kun Wu (received June 21, 2005; revised and accepted July 4, 2005) International Journal.
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
CMSC 414 Computer and Network Security Lecture 17 Jonathan Katz.
Receipt-freeness and coercion-resistance: formal definitions and fault attacks Stéphanie Delaune / Steve Kremer / Mark D. Ryan.
CMSC 414 Computer and Network Security Lecture 16 Jonathan Katz.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering.
CMSC 414 Computer and Network Security Lecture 22 Jonathan Katz.
Modelling and Analysing of Security Protocol: Lecture 1 Introductions to Modelling Protocols Tom Chothia CWI.
1 © IBM, A Reactively Secure Dolev-Yao-style Cryptographic Library DIMACS, June 2004 Michael Backes, Birgit Pfitzmann, Michael Waidner IBM Research,
CMSC 414 Computer and Network Security Lecture 19 Jonathan Katz.
EEC 688/788 Secure and Dependable Computing Lecture 7 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Just Fast Keying (JFK) Protocol 18739A: Foundations of Security and Privacy Anupam Datta CMU Fall
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
CMSC 414 Computer and Network Security Lecture 6 Jonathan Katz.
Protocol Composition Logic Arnab Roy joint work with A. Datta, A. Derek, N. Durgin, J.C. Mitchell, D. Pavlovic CS259: Security Analysis of Network Protocols,
Internet Security CSCE 813 IPsec. CSCE Farkas2 Reading Today: – Oppliger: IPSec: Chapter 14 – Stalllings: Network Security Essentials, 3 rd edition,
Chapter 9 Cryptographic Protocol Cryptography-Principles and Practice Harbin Institute of Technology School of Computer Science and Technology Zhijun Li.
Feb 19, 2002Mårten Trolin1 Previous lecture Practical things about the course. Example of cryptosystem — substitution cipher. Symmetric vs. asymmetric.
Process Calculus and Security 18739A: Foundations of Security and Privacy Anupam Datta Fall
Universally Composable Symbolic Analysis of Security Protocols Jonathan Herzog (Joint work with Ran Canetti) 7 June 2004 The author's affiliation with.
Slide 1 Vitaly Shmatikov CS 380S Oblivious Transfer and Secure Multi-Party Computation With Malicious Parties.
1 Message Authentication and Hash Functions Authentication Requirements Authentication Functions Message Authentication Codes Hash Functions Security of.
CMSC 414 Computer and Network Security Lecture 13 Jonathan Katz.
Alexander Potapov.  Authentication definition  Protocol architectures  Cryptographic properties  Freshness  Types of attack on protocols  Two-way.
0x1A Great Papers in Computer Security
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
Page 1 Secure Communication Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Programming Satan’s Computer
Security in Process Calculi CS 259 Vitaly Shmatikov.
1 Section 10.9 Internet Security Association and Key Management Protocol ISAKMP.
The Spi Calculus A Calculus for Cryptographic Protocols Presented By Ramesh Yechangunja.
Lecture 14 ISAKMP / IKE Internet Security Association and Key Management Protocol / Internet Key Exchange CIS CIS 5357 Network Security.
ECE 454/CS 594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall.
CS526: Information Security Prof. Sam Wagstaff September 16, 2003 Cryptography Basics.
Basic Cryptography 1. What is cryptography? Cryptography is a mathematical method of protecting information –Cryptography is part of, but not equal to,
Using Cryptography for Network Security Common problems: –Authentication - A and B want to prove their identities to one another –Key-distribution - A.
Cryptography and Network Security (CS435) Part Eight (Key Management)
Password Mistyping in Two-Factor Authenticated Key Exchange Vladimir KolesnikovCharles Rackoff Bell LabsU. Toronto ICALP 2008.
1 Reasoning about Concrete Security in Protocol Proofs A. Datta, J.Y. Halpern, J.C. Mitchell, R. Pucella, A. Roy.
Chapter 3 (B) – Key Management; Other Public Key Cryptosystems.
Security in Process Calculi CS 395T. Overview uPi calculus Core language for parallel programming Modeling security via name scoping uApplied pi calculus.
Lecture 16: Security CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9.
Digital Signatures, Message Digest and Authentication Week-9.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
Game-based composition for key exchange Cristina Brzuska, Marc Fischlin (University of Darmstadt) Nigel Smart, Bogdan Warinschi, Steve Williams (University.
Authenticated Key Exchange I. Definitions I. MAP I. matching conversations II. oracles II. (I)KA II. AKEP2 III. AKEP2 Security I. Session Keys II. Perfect.
Key Management Network Systems Security Mort Anvari.
Lecture 9 Overview. Digital Signature Properties CS 450/650 Lecture 9: Digital Signatures 2 Unforgeable: Only the signer can produce his/her signature.
1 Secure Key Exchange: Diffie-Hellman Exchange Dr. Rocky K. C. Chang 19 February, 2002.
Fall 2006CS 395: Computer Security1 Key Management.
Cryptographic Hash Function. A hash function H accepts a variable-length block of data as input and produces a fixed-size hash value h = H(M). The principal.
Cryptographic Hash Function
Authenticated encryption
Process Calculus and Security
Just Fast Keying (JFK) Protocol
An Executable Model for Security Protocol JFKr
Chapter -7 CRYPTOGRAPHIC HASH FUNCTIONS
Presentation transcript:

JFK Protocol in Applied Pi Calculus CS 395T

Proving Security u“Real” protocol Process-calculus specification of the actual protocol u“Ideal” protocol Achieves the same goal as the real protocol, but is secure by design Uses unrealistic mechanisms, e.g., private channels Represents the desired behavior of real protocol uTo prove the real protocol secure, show that no attacker can tell the difference between the real protocol and the ideal protocol Proof will depend on the model of attacker observations

Example: Challenge-Response uChallenge-response protocol A  B{i} k B  A{i+1} k uThis protocol is secure if it is indistinguishable from this “ideal” protocol A  B{random 1 } k B  A{random 2 } k

Example: Authentication uAuthentication protocol A  B{i} k B  A{i+1} k A  B“Ok” uThis protocol is secure if it is indistinguishable from this “ideal” protocol A  B{random 1 } k B  A{random 2 } k B  A random 1, random 2 on a magic secure channel A  B“Ok” if numbers on real & magic channels match

Security as Observational Equivalence uNeed to prove that two processes are obser- vationally equivalent from attacker’s viewpoint uComplexity-theoretic model Prove that two systems cannot be distinguished by any probabilistic polynomial-time adversary [Beaver ’91, Goldwasser-Levin ’90, Micali-Rogaway ’91] uAbstract process-calculus model Cryptography is modeled by abstract functions Prove testing equivalence between two processes Proofs are easier, but it is nontrivial to show computational completeness [Abadi-Rogaway ’00]

Main Ideas 1.The adversary is the environment in which the protocol executes Intuition: the network is insecure, active attacker may be the man-in-the-middle on every wire and will interact with the protocol in unpredictable ways 2.The protocol is secure if no test performed by the environment can distinguish it from the ideal functionality Ideal functionality is a “magic” protocol that is secure by design and performs the same functionality as the actual protocol By contrast, in finite-state checking the adversary is a set of explicit rules

Applied Pi Calculus: Terms M, N ::= x Variable | n Name | f(M 1,...,M k ) Function application uStandard functions pair(), encrypt(), hash(), … uSimple type system for terms Integer, Key, Channel  Integer , Channel  Key 

Applied Pi Calculus: Processes P,Q ::= nil empty process | ū  N .P send term N on channel u | u(x).P receive from channel P and assign to x | !P replicate process P | P|Q run processes P and Q in parallel | ( n)P restrict name n to process P | if M = N conditional then P else Q

Reductions  silent (i.e., unobservable) computation ā  M .P | a(x).Q  P | Q[M/x] P sends M to Q on internal channel a if M = M then P else Q  P if M = N then P else Q  Q  ground M, N s.t. M  N in eq theory  writing to an observable channel c ā  M .P | a(x).Q  let {y=M} in (P | a(x).Q) ( n)ā  U  y.ā  y   reading from an observable channel c let {y=M} in (P | a(x).Q)  P | Q[M/y,y/x] a(U) a(y) “free-floating” let records values known to attacker

JFKr Protocol I R N i, x i x i =g dic N i, N r, x r, g r, t r x r =g dr t r =hash Kr (x r,N r,N i,IP i ) N i, N r, x i, x r, t r, e i, h i e i =enc Ke (ID i,ID’ r,sa i,sig Ki (N r,N i,x r,x i,g r )) x i dr =x r di =x K a,e,v =hash x (N i,N r,{a,e,v}) h i =hash Ka (“i”,e i ) e r, h r e r =enc Ke (ID r,sa r,sig Kr (x r,N r,x i,N i )) h r =hash Ka (“r”,e r ) DH group

Initiator Process ! init A (ID’ r,sa i ).[Control] Environment starts the initiator N i.Create fresh nonce N i c  1(N i,x i ) .Send message 1 with N i and x i c(2(=N i,N r,x r,g r,t r )).Wait for message 2 (received N i must be equal to previously sent N i ) $  N i .[Control] Annonce start of key computation let K a,e,v =hash x r d i (N i,N r,{a,e,v}) inCompute shared Diffie-Hellman keys let s i =sig Ki (N r,N i,x r,x i,g r ) inSign previously exchanged information let e i =enc Ke (ID i,ID’ r, sa i,s i ) inEncrypt with the newly established shared key let h i =hash Ka (“i”,e i ) inCompute message authentication code (MAC) c  3(N i,N r,x i,x r,t r,e i,h i ) .Send message 3 c(4(e r,h r )).Wait for message 4 if h r =hash Ka (“r”,e r ) thenCheck message authentication code let (ID r,sa r,s r )=decrypt Ke (e r ) inDecrypt with shared key if VerifySig ID r,s r (x r,N r,x i,N i ) thenVerify signature using R’s public key connect A  ID r,ID’ r,sa i,sa r,K v  [Control] Announce completion of protocol __ ______ __ [Abadi, Blanchet, Fournet ESOP ’ see website]

Responder Process for Message 1 ! c(1(N i,x i )).Wait for message 1 N r.Create fresh nonce N r let t r =hash K r (x r,N r, N i ) in Compute anti-DoS cookie c  2(N i,N r,x r,g r,t r )  Send message 2 __

Responder Process for Message 3 ! c(3(N i,N r,x i,x r,t r,e i,h i )). Wait for message 3 if t r =hash K r (x r,N r, N i ) then Re-compute and compare anti-DoS cookie if t r hasn’t been accepted before thenCheck for freshness to prevent replay $  N i,N r .[Control] Announce start of key computation and allocation of session state let K a,e,v =hash x i d r (N i,N r,{a,e,v}) in Compute shared Diffie-Hellman keys if h i =hash Ka (“i”,e i ) in Check message authentication code let (ID i, ID’ r,sa i,s i )=decrypt Ke (e i ) in Decrypt with shared key if ID i  S i B thenCheck if initiator is on the authorized list if VerifySig ID i,s i (N i,N r,x i,x r,g r ) then Verify signature using I’s public key accept A  ID i,ID’ r,sa i,sa r,K v .[Control] Announce acceptance of message 3 let s r =sig Kr (x r,N r,x i,N i )) in Sign previously exchanged information let e r =enc Ke (ID r,sa r,s r ) inEncrypt with shared key let h r =hash Ka (“r”,e r ) in Compute message authentication code (MAC) c  4(e r,h r )  Send message 4 __ _____ __ Note: active attacker may read/write communication channel c

Features of the Model uTwo separate processes for responder To counter denial of service attacks, responder is stateless until he receives message 3 Responder process for message 1 must be independent from responder process for message 3 uResponder must keep a database of all cookies accepted after message 3 to avoid replay attacks u“Control” messages on special channels announce protocol checkpoints “Completed verification”, “started key computation”… Not part of specification, only to help model properties

Linearization uParallel composition of responder to message 1 and responder to message 3 is observationally indistinguishable from a single stateful process R 1 A | R 3 A  ! c(1(N i,x i )). N r,t r. c  2(N i,N r,x r,g r,t r ) . ?c(3(=N i,=N r,x i,=x r,=t r,e i,h i )). let K a,e,v =hash x i d r (N i,N r,{a,e,v}) in … (then as in R 3 A ) _ Anti-DoS cookie must appear new and random to external observer This is the actual process executed by responder This is what the responder’s behavior must look like to any external observer

Protection From Denial of Service uInitiator: For any trace S  S’, for each output $  N i , there are successive actions init A (…), c  1(N i …) , c(2(N i …)) –Initiator starts his Diffie-Hellman computation only with a nonce that he previously sent to someone in message 1 and received back in message 2 uResponder: For any trace S  S’, for each output $  N i,N r , there are successive actions c(1(N i …)), c  2(N i,N r …) , c(3(N i,N r …)) –Responder starts his Diffie-Hellman computation and allocates session state only after receiving the same nonce that he sent to ostensible initiator in message 2  _ _ _ _ 

Assume S  S’. For any principals A,B, DH exponentials x i,x r, and terms ID’ r,sa i there exists S 3 such that S’ S 3 and either ID A  S B i and S 3  let  4 in S’ or ID A  S B i and S 3  let  3 in S’ Secrecy for Established Key  ____ init A ( ID’ r,sa i ) [1,2,3] Observable execution of S’ must include start of initiator and send/receive of first 3 messages K v.accept B ( ID a,ID’ r,sa i,sa r,K v ) [4] connect A ( ID b,ID’ r,sa i,sa r,K v ) ____ Positive outcome: execution is not observably different from “magic” protocol in which parties agree on a new key K v without communicating Exports N i,N r,t r … to environment Negative outcome: if initiator is not authorized, execution is not observably different from a protocol in which responder simply stops after message 3

Assume S  S’. The actions in  are such that 1.For each accept B ( ID a,ID’ r,sa i,sa r,K v ), ID A  S B i and there is distinct init A ( ID’ r,sa i ) 2.For each connect A ( ID b,ID’ r,sa i,sa r,K v ), there is distinct init A ( ID’ r,sa i ) and accept B ( ID a,ID’ r,sa i,sa r,K v ) Authentication for Control Actions  _____ If responder announces completion of protocol, initiator is on the authorized list and previously initiated this instance of the protocol ______ _____ If initiator announces completion of protocol, then he initiated this instance and responder has announced successful completion, too Authentication is a correspondence property (some event happens only if another event happened previously)

Assume S S’. 1. contains a series of transitions that match in the same order except possibly for arguments x i in 1 st input on c and t r in 2 nd input and 3 rd output on c 2.Let  be  ’ without these transitions. Then (let  4 in S)  S’ Authentication for Complete Sessions  Protocol executed, and initiator announced successful completion Responder must have announced successful completion, too Values received by initiator must be equal to values sent by responder Values received by responder must be equal to values sent by initiator (except for unauthenticated fields x i and t r ) connect A ( ID b,ID’ r,sa i,sa r,K v ) ____  init A ( ID’ r,sa i ) [1,2,3] accept B ( ID a,ID’ r,sa i,sa r,K v ) ___ [4] See appendix B.1 of [ABF04] on how this may reveal identities of communicating parties ’’ Technical point: variable assignment  4 contains all values revealed by protocol messages Correspondence property!

Detailed Proofs uSee tech report on Bruno Blanchet’s website uSome observational equivalences are proved by hand, some using automated verifier ProVerif Verification scripts available on the website uProVerif is a general-purpose tool for security protocol analysis The ProVerif paper is on the paper assignment list (hint! hint!)

uStandard process-calculus notions of equivalence such as bisimulation are not adequate for cryptographic protocols Different ciphertexts leak no information to the attacker who does not know the decryption keys u( k)c  senc(M,k)  and ( k)c  senc(N,k)  send different messages, but they should be treated as equivalent when proving security In each case, a term is encrypted under a fresh key No test by the attacker can tell these apart Equivalence in Process Calculus --

Testing Equivalence uIntuitively, two processes are equivalent if no environment can distinguish them uA test is a process R and channel name w Informally, R is the environment and w is the channel on which the outcome of the test is announced uA process P passes a test (R,w) if P | R may produce an output on channel w There is an interleaving of P and R that results in R being able to perform the desired test uTwo processes are equivalent if they pass the same tests

Advantages and Disadvantages uProving testing equivalence is hard To prove security, need to quantify over all possible attacker processes and all tests they may perform In applied pi calculus, can use “labeled bisimilarity” –Instead of arbitrary evaluation contexts, reason only about inputs and outputs (labeled transitions) on certain channels uTesting equivalence is a congruence Congruence = equivalence in any context Can compose protocols like building blocks uEquivalence is the “right” notion of security Similar to definitions in complexity-theoretic crypto

Structural Equivalence P | nil  P P | Q  Q | P P | (Q | R)  (P | Q) | R !P  P | !P ( m)( n)P  ( n)( m)P ( n)nil  nil ( n)(P | Q)  P | ( n)Q if n is not a free name in P P[M/x]  P[N/x] if M=N in the equational theory

Static Equivalence uFrames are static knowledge exported by a process to the execution environment Assignment of values to variables –{x=M, y=enc k (M,x), …} Attacker (i.e., environment) learns these values uTwo frames  and  are statically equivalent if they map the same variables to equal values –Dom(  )=Dom(  ) and  terms M, N (M=N)  iff (M=N)  uTwo processes are statically equivalent if they export the same knowledge to the environment –A  s B if their frames are statically equivalent

Labeled Bisimilarity  Labeled bisimilarity is the largest symmetric relation R on closed processes s.t. A R B implies 1.A  s B 2.If A  A’, then B  * B’ and A’ R B’ for some B’ 3.If A  A’ and freevars(  )  dom(A) and boundnames(  )  freenames(B) = , then B  *   * B’ and A’ R B’ for some B’ uWhy labeled bisimilarity? Congruence:  context C[], A  l B implies C[A]  l C[B] Easier to check than direct observational equivalence: only care about steps that export values to environment  