The Spi Calculus A Calculus for Cryptographic Protocols Presented By Ramesh Yechangunja.

Slides:



Advertisements
Similar presentations
Security attacks. - confidentiality: only authorized parties have read access to information - integrity: only authorized parties have write access to.
Advertisements

CS470, A.SelcukCryptographic Authentication1 Cryptographic Authentication Protocols CS 470 Introduction to Applied Cryptography Instructor: Ali Aydin Selcuk.
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.
Interlock Protocol - Akanksha Srivastava 2002A7PS589.
Digital Signatures and Hash Functions. Digital Signatures.
Deeper Security Analysis of Web-based Identity Federation Apurva Kumar IBM Research – India.
CS457 – Introduction to Information Systems Security Cryptography 1b Elias Athanasopoulos
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
Session 4 Asymmetric ciphers.
Distributed Systems CS Security – Part I Lecture 21, Nov 28, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
CMSC 414 Computer (and Network) Security Lecture 21 Jonathan Katz.
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.
Spi Calculus Gokhan Gokoz Chad R. Meiners. What Spi Calculus Is Spi calculus is a form of pi calculus extended to support cryptography. Pi calculus is.
CMSC 414 Computer and Network Security Lecture 16 Jonathan Katz.
Cryptography (continued). Enabling Alice and Bob to Communicate Securely m m m Alice Eve Bob m.
Analysis of Key Agreement Protocols Brita Vesterås Supervisor: Chik How Tan.
Modelling and Analysing of Security Protocol: Lecture 1 Introductions to Modelling Protocols Tom Chothia CWI.
CSE331: Introduction to Networks and Security Lecture 20 Fall 2002.
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.
CMSC 414 Computer and Network Security Lecture 23 Jonathan Katz.
Cryptography April 20, 2010 MIS 4600 – MBA © Abdou Illia.
Chapter 9 Cryptographic Protocol Cryptography-Principles and Practice Harbin Institute of Technology School of Computer Science and Technology Zhijun Li.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Slide 1 Vitaly Shmatikov CS 380S Oblivious Transfer and Secure Multi-Party Computation With Malicious Parties.
A Cryptography Tutorial Jim Xu College of Computing Georgia Tech
Foundations of Cryptography Rahul Jain CS6209, Jan – April 2011
CS5204 – Fall Cryptographic Security Presenter: Hamid Al-Hamadi October 13, 2009.
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Cryptography, Authentication and Digital Signatures
Formal Analysis of Security Protocols Dr. Changyu Dong
Lecture 14 ISAKMP / IKE Internet Security Association and Key Management Protocol / Internet Key Exchange CIS CIS 5357 Network Security.
Cryptography and Network Security (CS435) Part Fourteen (Web Security)
Security: An Overview of Cryptographic Techniques /440 With slides from: Debabrata Dash, Nick Feamster, Gregory Kesden, Vyas Sekar and others.
A Survey of Authentication Protocol Literature: Version 1.0 Written by John Clark and Jeremy Jacob Presented by Brian Sierawski.
Chapter 31 Cryptography And Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
© UCL Crypto group oct.-15 On the Perfect Encryption Assumption in the Study of Security Protocols O. Pereira and J.-J. Quisquater UCL Crypto Group
CMSC 414 Computer and Network Security Lecture 5 Jonathan Katz.
ISEP / Fakulta Elektrotecknika 1 Project Of Telecommunication Subject: Describe following “ MAC - Message Authentication Code " modes: Describe following.
IPsec IPsec (IP security) Security for transmission over IP networks –The Internet –Internal corporate IP networks –IP packets sent over public switched.
Cryptography Lecture 2 Arpita Patra. Summary of Last Class  Introduction  Secure Communication in Symmetric Key setting >> SKE is the required primitive.
From Coulouris, Dollimore, Kindberg and Blair Distributed Systems: Concepts and Design Edition 5, © Addison-Wesley 2012 Exercises for Chapter 11: Security.
1 Reasoning about Concrete Security in Protocol Proofs A. Datta, J.Y. Halpern, J.C. Mitchell, R. Pucella, A. Roy.
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.
CS 4244: Internet Programming Security 1.0. Introduction Client identification and cookies Basic Authentication Digest Authentication Secure HTTP.
6 June Lecture 2 1 TU Dresden - Ws on Proof Theory and Computation Formal Methods for Security Protocols Catuscia Palamidessi Penn State University,
CRYPTOGRAPHY. TOPICS OF SEMINAR Introduction & Related Terms Categories and Aspects of cryptography Model of Network Security Encryption Techniques Public.
Cryptographic Hash Functions and Protocol Analysis
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
NEW DIRECTIONS IN CRYPTOGRAPHY Made Harta Dwijaksara, Yi Jae Park.
A Cost-Based Framework for Analysis of Denial of Service in Networks Author: Catherine Meadows Presenter: Ajay Mahimkar.
October 7, 2003Serguei A. Mokhov, 1 Cryptographic Protocols and Possible Attacks SOEN321- Information-Systems Security Revision:
KERBEROS SYSTEM Kumar Madugula.
Fall 2006CS 395: Computer Security1 Key Management.
9.2 SECURE CHANNELS JEJI RAMCHAND VEDULLAPALLI. Content Introduction Authentication Message Integrity and Confidentiality Secure Group Communications.
Security attacks.
Process Calculus and Security
Topic 11: Authenticated Encryption + CCA-Security
The Inductive Approach to Verifying Cryptographic Protocols
Cryptography Lecture 10.
Protocol Verification by the Inductive Method
The Secure Sockets Layer (SSL) Protocol
Topic 13: Message Authentication Code
Protocol Verification by the Inductive Method
Cryptography Lecture 9.
Cryptography Lecture 23.
Presentation transcript:

The Spi Calculus A Calculus for Cryptographic Protocols Presented By Ramesh Yechangunja

Introduction Developed by Martin Abadi and Andrew D.Gordon at the Systems Research Center, it is an extension of the Pi Calculus with cryptographic primitives designed for describing and analyzing cryptographic protocols.

Features Reliance on the powerful scoping constructs of the pi calculus Radical definition of the environment as an arbitrary spi calculus process Representation of security properties, both integrity and secrecy, as equivalences

Basics Channels may be restricted, so that only certain processes may communicate on them. (Similar to CSP) The scope of the restriction may change during computation. This is termed scope extrusion. (Different from the earlier process calculi)

ā‹N›.P is ready to output on channel a. If an interaction occurs, term N is communicated on a and then process P runs.An output process ā‹N›.P is ready to output on channel a. If an interaction occurs, term N is communicated on a and then process P runs. An input process a(x).P is ready to input from channel a. If an interaction occurs in which N is communicated on a, then process P[N/x] runs.An input process a(x).P is ready to input from channel a. If an interaction occurs in which N is communicated on a, then process P[N/x] runs.

A composition P|Q behaves as processes P and Q running in parallel. A restriction (vn)P is a process that makes a new, private name n, and then behaves as P. (x,y) = M in P behaves as P[N/x][L/y] if term M is the pair (N,L). Otherwise, the process is stuck.A pair splitting process let (x,y) = M in P behaves as P[N/x][L/y] if term M is the pair (N,L). Otherwise, the process is stuck.

In addition spi calculus introduces primitives for shared-key cryptography The term {M} N represents the ciphertext obtained by encrypting M under the key N. The process case L of {x} N in P attempts to decrypt the term L with the key N. If L is a ciphertext of the form {M} N, then the process behaves as P[M/x]. Otherwise, the process is stuck.

A first cryptographic example Consider two principals A and B that share a key K AB with a public channel c AB. The protocol is simply that A sends a message M under K AB to B, on c AB. Message 1 A→B: {M} K AB on c AB In the spi calculus, we write A(M) ≜ c AB ‹{M} K AB ›

- B ≜ c AB (x).case x of {y} K AB in F(y) Inst(M) ≜ (vK)(A(M)|B) Inst(M) ≜ (vK)(A(M)|B) Security properties are expressed as equivalences. We use the following specification: A(M) ≜ c AB ‹{M} K AB › B spec (M) ≜ c AB (x).case x of {y} K AB in F(M) B spec (M) ≜ c AB (x).case x of {y} K AB in F(M) Inst spec (M) ≜ (vK AB )(A(M)|B spec (M)) Inst spec (M) ≜ (vK AB )(A(M)|B spec (M))

- We obtain the properties: Inst(M) ≃ Inst spec (M), for all M Authenticity: Inst(M) ≃ Inst spec (M), for all M Inst(M) ≃ Inst(M’) if F(M) ≃ F(M’), Secrecy: Inst(M) ≃ Inst(M’) if F(M) ≃ F(M’), for all M,M’ for all M,M’

An example with key establishment We consider the Wide Mouthed Frog protocol. 1. New key K AB under K AS 2. New key K AB under K SB 3.data under new key K AB S AB

The protocol is Message 1 A→S: {K AB } K AS on c AS Message 2 S→B: {K AB } K SB on c SB Message 3 A→B: {M} K AB on c AB In the spi calculus, we can express it as: A(M) ≜ (vK AB )( c AS ‹{K AB } K AS ›. c AB ‹{M} K AB ›) S ≜ c AS (x).case x of {y} K AS in c SB ‹{y} K SB › S ≜ c AS (x).case x of {y} K AS in c SB ‹{y} K SB › B ≜ c SB (x).case x of {y} K SB in B ≜ c SB (x).case x of {y} K SB in c AB (z).case z of {w} y in F(w) c AB (z).case z of {w} y in F(w) Inst(M) ≜ (vK AS ) (vK SB )( A(M)|S|B)

A complete authentication example ( with a flaw) Consider a system with a server and n other principals. Each principal has an input channel which is public, namely, C1, C2,…,Cn and Cs. The server shares a pair of keys with each other principal, K s i and K i s. We extend the previous example to this n+1 principals: Message 1 A→S: A,{B,K AB } K AS on c S Message 2 S→B: {A,K AB } K SB on c B Message 3 A→B: A,{M} K AB on c B

- An instance of the protocol is determined by a choice of parties and by the message sent i.e. an instance I is the triple (i,j,M). i – source address j - destination address Given an instance (i,j,M), the following process corresponds to role of A: Send(i,j,M) ≜ (vK)(c S ‹(i,{j,K} K iS )›| c j ‹(i,{M} K )›) The following process corresponds to the role of B: Recv(j) ≜ c j (y cipher ).case y cipher of {x A,x key } K Sj in c j (z A,z cipher ).[x A, z A ] c j (z A,z cipher ).[x A, z A ] case z cipher of {z plain } x key in F(x A, j, z plain ) case z cipher of {z plain } x key in F(x A, j, z plain )

- The server S is the same for all instances: S ≜ c j (x A,x cipher ).  i  1..n [x A is i] case x cipher of {x B,x key } K iS in  i  1..n [x A is i] case x cipher of {x B,x key } K iS in  j  1..n [x B is j] c j ‹ {x A,x key } K S j ›  j  1..n [x B is j] c j ‹ {x A,x key } K S j ›  i  1..k P i where  i  1..k P i is the k-way composition P 1 |…|P k Finally we define a whole system, parameterized on a list of instances of the protocol: Sys(I 1,…, I m ) ≜ (vK s i )(vK i s ) (Send(I 1 ) |…| Send(I m ) | (Send(I 1 ) |…| Send(I m ) | !S !S !Recv(1) |…| !Recv(n) ) !Recv(1) |…| !Recv(n) )

- Unfortunately, the protocol is vulnerable to a replay attack that invalidates the authenticity. An attacker can replay messages of one instance and get them mistaken for messages of the other instance.

A complete authentication example (repaired) The previous protocol is improved by adding nonce handshakes as protection against replay attacks. The new protocol is: Message 1 A→S: A on c S Message 2 S→A: N S on c A Message 3 A→S: A,{A,A,B,K AB, N S } K AS on c S Message 4 S→B: * on c B Message 5 B→S: N B on c S Message 6 S→B: {S,A,B,K AB, N B } K S B on c B Message 7 A→B: A,{M } K AB on c B

- In spi calculus, nonces are represented as newly created names. Send(i,j,M) ≜ c S ‹i›| c i (x nonce ). c i (x nonce ). (vK)(c S ‹(i,{i,i,j,K,x nonce } K iS )›| c j ‹(i,{M} K )›) (vK)(c S ‹(i,{i,i,j,K,x nonce } K iS )›| c j ‹(i,{M} K )›) S ≜ c S (x A ).  i  1..n [x A is i] (vN S ) (c i ‹N S ›| S ≜ c S (x A ).  i  1..n [x A is i] (vN S ) (c i ‹N S ›| c S (x’ A,x cipher ).[x’ A is i] c S (x’ A,x cipher ).[x’ A is i] case x cipher of {y A,z A, x B, x key, x nonce } K iS in case x cipher of {y A,z A, x B, x key, x nonce } K iS in  j  1..n [y A is i][z A is i][x B is j][x nonce is N S ]  j  1..n [y A is i][z A is i][x B is j][x nonce is N S ] (c j ‹*›| c S (y nonce ). c j ‹{S,i,j, x key,y nonce } K S j ›)) (c j ‹*›| c S (y nonce ). c j ‹{S,i,j, x key,y nonce } K S j ›))

- Recv(j) ≜ c j (w). (vN B ) (c S ‹N B ›| c j (y cipher ). c j (y cipher ). case y cipher of {x S, x A, x B, x key, y nonce } K S j in case y cipher of {x S, x A, x B, x key, y nonce } K S j in  j  1..n [x S is S][x A is i][x B is j][y nonce is N B ]  j  1..n [x S is S][x A is i][x B is j][y nonce is N B ] c j (z A,z cipher ).[ z A is x A ] c j (z A,z cipher ).[ z A is x A ] case z cipher of {z plain } x key in F(i, j, z plain )) case z cipher of {z plain } x key in F(i, j, z plain )) Sys(I 1,…, I m ) ≜ (vK s i )(vK i s ) (Send(I 1 ) |…| Send(I m ) | (Send(I 1 ) |…| Send(I m ) | !S !S !Recv(1) |…| !Recv(n) ) !Recv(1) |…| !Recv(n) )

- The authenticity property is obtained: Sys(I 1,…, I m ) Sys spec (I 1,…, I m ) Sys(I 1,…, I m ) ≃ Sys spec (I 1,…, I m ) I 1,…, I m for any instances I 1,…, I m This holds good because of the nonces. Sys(I 1,…, I m ) Sys spec (J 1,…, J m ) Secrecy: Sys(I 1,…, I m ) ≃ Sys spec (J 1,…, J m ) (I 1, J 1 ),… (I m, J m ) if each pair (I 1, J 1 ),… (I m, J m ) is indistinguishable.

Conclusion Harder to write protocols but very detailed. Main advantage is its formal precision May not be a good tool for finding flaws but yields more convincing proofs of correctness Protocols prone to attacks are developed without explicit specifications for an attacker. Such precise treatments have not been done before.