• No results found

Computer Science and Engineering IIT Bombay

N/A
N/A
Protected

Academic year: 2022

Share "Computer Science and Engineering IIT Bombay"

Copied!
36
0
0

Loading.... (view fulltext now)

Full text

(1)

Cryptographic Protocols and Formal Verification

G. Sivakumar

Computer Science and Engineering IIT Bombay

siva@iitb.ac.in

(2)

Exchanging Secrets

Goal

A and B to agree on a secret number. But, C can listen to all their conversation.

Solution?

A tells B: I’ll send you 3 numbers. Let’s use their LCM as the key.

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(3)

Exchanging Secrets

Goal

A and B to agree on a secret number. But, C can listen to all their conversation.

Solution?

A tells B: I’ll send you 3 numbers. Let’s use their LCM as the key.

(4)

Mutual Authentication

Goal

A and B to verify that both know the same secret number. No third party (intruder or umpire!)

Solution?

A tells B: I’ll tell you first 2 digits, you tell me the last two...

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(5)

Mutual Authentication

Goal

A and B to verify that both know the same secret number. No third party (intruder or umpire!)

Solution?

A tells B: I’ll tell you first 2 digits, you tell me the last two...

(6)

Zero-Knowledge Proofs

Goal

A to prove to B that she knows how to solve the cube. Without actually revealing the solution!

Solution?

A tells B: Close your eyes, let me solve it...

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(7)

Zero-Knowledge Proofs

Goal

A to prove to B that she knows how to solve the cube. Without actually revealing the solution!

Solution?

A tells B: Close your eyes, let me solve it...

(8)

Paper, Scissors, Rock Game

Goal

How to play over Internet? Using email, say?

Solution?

You mail me your choice. I’ll reply with mine.

Coin Toss

Simpler Version of problem?

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(9)

Paper, Scissors, Rock Game

Goal

How to play over Internet? Using email, say?

Solution?

You mail me your choice. I’ll reply with mine.

Coin Toss

Simpler Version of problem?

(10)

Paper, Scissors, Rock Game

Goal

How to play over Internet? Using email, say?

Solution?

You mail me your choice. I’ll reply with mine.

Coin Toss

Simpler Version of problem?

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(11)

Sharing a Dosa

Goal

All should get equal share of dosa. No envy factor. No trusted umpire.

Solution?

2 people case is easy- you cut, i choose!

(12)

Sharing a Dosa

Goal

All should get equal share of dosa. No envy factor. No trusted umpire.

Solution?

2 people case is easy- you cut, i choose!

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(13)

Sharing a Secret

Safety in numbers. Do not trust any one (or few) person(s).

Real World Examples

Pirates sharing a treasure map.

Who can authorize launching a missile?

From Computer Domain

Secure Storage (Archival)

Distributed storage of Logs

(14)

Online Voting Protocols

Are we ready for elections via Internet?

George Bush (Nov 2000, dimpled chads) Pervez Musharaf (April 2002)

Maharashtra (Oct 13, 2004) E-Voting Protocols Requirements

No loss of votes already cast (reliability) No forging of votes (authentication) No modification of votes cast (integrity) No multiple voting

No vote secrecy violation (privacy) No vulnerability to vote coercion

No vulnerability to vote selling or trading protocols (voter is an adversary)

No loss of ability to cast and accept more votes (availability, no denial of service)

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(15)

Other Desirable Properties

must not only be correct and secure, but also be seen to be so by skeptical (but educated and honest) outsiders.

Auditability:

Failure or procedural error can be detected and corrected, especially the loss of votes.

Verifiability: Should be able to prove My vote was counted

All boothes were counted

The number of votes in each booth is the same as the number of people who voted

No one I know who is ineligible to vote did so No one voted twice

...

without violating anonymity, privacy etc.

Zero Knowledge Proofs

(16)

Security Requirements

Informal statements (formal is much harder)

Confidentiality Protection from disclosure to unauthorized persons Integrity Assurance that information has not been modified unauthorizedly.

Authentication Assurance of identity of originator of information.

Non-Repudiation Originator cannot deny sending the message.

Availability Not able to use system or communicate when desired.

Anonymity/Pseudonomity For applications like voting, instructor evaluation.

Traffic Analysis Should not even know who is communicating with whom. Why?

Emerging Applications Online Voting, Auctions (more later)

And all this with postcards (IP datagrams)!

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(17)

Security Mechanisms

System Security: “Nothing bad happens to my computers and equipment”

virus, trojan-horse, logic/time-bombs, ...

Network Security:

Authentication Mechanisms “you are who you say you are”

Access Control Firewalls, Proxies “who can do what”

Data Security: “for your eyes only”

Encryption, Digests, Signatures, ...

(18)

Security Mechanisms

System Security: “Nothing bad happens to my computers and equipment”

virus, trojan-horse, logic/time-bombs, ...

Network Security:

Authentication Mechanisms “you are who you say you are”

Access Control Firewalls, Proxies “who can do what”

Data Security: “for your eyes only”

Encryption, Digests, Signatures, ...

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(19)

Security Mechanisms

System Security: “Nothing bad happens to my computers and equipment”

virus, trojan-horse, logic/time-bombs, ...

Network Security:

Authentication Mechanisms “you are who you say you are”

Access Control Firewalls, Proxies “who can do what”

Data Security: “for your eyes only”

Encryption, Digests, Signatures, ...

(20)

Cryptography and Data Security

sine qua non [without this nothing :-]

Historically who used first? (L & M) Code Language in joint families!

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(21)

One way Functions

Mathematical Equivalents

Factoring large numbers (product of 2 large primes)

Discrete Logarithms

(22)

One-way Functions

Computing f(x) = y is easy.

Eg. y = 4 x mod 13 (If x is 3, y is —?) n 4

n

mod 13 10

n

mod 13

1 4 10

2 3 9

3 12 12

4 9 3

5 10 4

6 1 1

7 4 10

.. . .. . .. .

Note: need not work with numbers bigger than 13 at all!

But given y = 11, finding suitable x is not easy!

Can do by brute-force (try all possibilities!) No method that is much better known yet!

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(23)

Network Security Mechanism Layers

Cryptograhphic Protocols underly all security mechanisms. Real

Challenge to design good ones for key establishment, mutual

authentication etc.

(24)

Motivation for Session keys

Combine Symmetric (fast) and Asymmetric (very slow) Methods using session (ephemeral) keys for the following additional reasons.

Limit available cipher text (under a fixed key) for cryptanalytic attack;

Limit exposure with respect to both time period and quantity of data, in the event of (session) key compromise;

Avoid long-term storage of a large number of distinct secret keys (in the case where one terminal communicates with a large number of others), by creating keys only when actually required;

Create independence across communications sessions or applications. No replay attacks.

How to establish session keys over insecure medium where adversary is listening to everything?

Can be done even without any public key! Randomization to rescue (like in CSMA/CD of Ethernet).

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(25)

Diffie-Hellman Key Establishment Protocol

(26)

Man-in-the-middle attack

Authentication was missing!

Can be solved if Kasparov and Anand know each other’s public key (Needham-Schroeder).

Yes, but different attack possible.

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(27)

Needham-Schroeder Protocol

(28)

Attack by Lowe (1995)

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(29)

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

Concern: active attacks masquerading, replay, man-in-middle, etc.

vague specifications

we have to guess what is wanted Ill-defined concepts

Protocol flaws rather than cryptosystem weaknesses

Formal Methods needed!

(30)

Need for Formal Methods

Countermeasure: formal design and analysis

Formal Modelling and Specification of Protocol Abstract encryption model, formal specification Specification of Required Properties

Verification of Properties

Inductive proofs, state-space search, authentication logics Generation of Counter-Example

Analysis can find flaws, suggest improvements, prove conditional correctness

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(31)

Formal Approaches Overview

Why so many approaches?

When all you have is a hammer, everything looks like a nail!

(32)

Specification of Protocol

Common Authentication Protocol Specification Language http://www.csl.sri.com/users/millen/capsl/

High-level message-list based language with abstract encryption operators

A -> B: {A}K

Declarations:

strong typing and abstract data type extensions initialization, named expressions

security goals

Actions between messages: tests, assignments

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(33)

CAPSL Example

PROTOCOL Short;

IMPORTS ClientServer;

VARIABLES

A,S: PKUser;

N: Nonce, FRESH, CRYPTO;

ASSUMPTIONS HOLDS A: S;

MESSAGES

A -> S: A,{A,N}SK(A);

S -> A: {S,N}PK(A);

GOALS

SECRET N: A, S;

END;

(34)

Emerging Picture

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

(35)

Tools for Security Analysis and Verification

(36)

References

Books

TCP/IP Illustrated by Richard Stevens, Vols 1-3, Addison-Wesley.

Applied Cryptography - Protocols, Algorithms, and Source Code in C by Bruce Schneier, Jon Wiley & Sons, Inc. 1996 Cryptography and Network Security: Principles and Practice by William Stallings (2nd Edition), Prentice Hall Press; 1998.

Practical Unix and Internet Security, Simson Garfinkel and Gene Spafford, O’Reilly and Associates, ISBN 1-56592-148-8.

Web sites

www.cerias.purdue.edu (Centre for Education and Research in Information Assurance and Security)

www.sans.org (System Administration, Audit, Network Security)

cve.mitre.org (Common Vulnerabilities and Exposures) csrc.nist.gov (Computer Security Resources Clearinghouse) www.vtcif.telstra.com.au/info/security.html

G. Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in

References

Related documents

Sivakumar Computer Science and Engineering IIT Bombay siva@iitb.ac.in Free/Open Source Software in Engineering Curriculum.. Open Access not only

Rhushabh Goradia and Piyush PorwalComputer Science and Engineering IIT Bombay rhushabh@cse.iitb.ac.in, porwalpiyush@cse.iitb.ac.in... Outline

Sivakumar சிவகுமா Computer Science and Engineering भारतीय ूौ ोिगकी सं ान मुंबई (IIT Bombay) siva@iitb.ac.in Big Data for Central Banking.?.

Memory locations accessed: local variables/arrays of functions Statically allocated in stack segment when function is called.. Quick Recap of

Choice of comparison operator crucially determines sorting order (increasing/decreasing), and also how equal elements

• Decide which half of array to recurse on based on output of comparison

• Recall how we accessed member data values of structures V3 p, *ptrP;. cin

Sivakumar சிவகுமா Computer Science and Engineering भारतीय ूौोिगकी संान मुंबई (IIT Bombay) siva@iitb.ac.in Cyber Crimes and Internet Security...