Key Exchange Protocols J. Mitchell CS 259. Next few lectures uToday 1/17 Brief cryptography background Key exchange protocols and properties uThursday.

Slides:



Advertisements
Similar presentations
Key Exchange Protocols J. Mitchell CS 259. Next few lectures uToday Key exchange protocols and properties uThursday Cathy Meadows: GDOI uNext Tues Contract-signing.
Advertisements

Key Management Protocols and Compositionality John Mitchell Stanford TECS Week2005.
L8. Reviews Rocky K. C. Chang, May Foci of this course 2 Rocky K. C. Chang  Understand the 3 fundamental cryptographic functions and how they are.
Encipherment Using Modern Symmetric-Key Ciphers. 8.2 Objectives ❏ To show how modern standard ciphers, such as DES or AES, can be used to encipher long.
CS 483 – SD SECTION BY DR. DANIYAL ALGHAZZAWI (3) Information Security.
Spring 2000CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
1 Network Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Chapter 13 IPsec. IPsec (IP Security)  A collection of protocols used to create VPNs  A network layer security protocol providing cryptographic security.
Session 5 Hash functions and digital signatures. Contents Hash functions – Definition – Requirements – Construction – Security – Applications 2/44.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 29 Cryptography and Network.
CNS2010handout 10 :: digital signatures1 computer and network security matt barrie.
ECOMMERCE TECHNOLOGY SUMMER 2002 COPYRIGHT © 2002 MICHAEL I. SHAMOS Cryptographic Security.
Chapter 5 Cryptography Protecting principals communication in systems.
ECOMMERCE TECHNOLOGY FALL 2003 COPYRIGHT © 2003 MICHAEL I. SHAMOS Cryptography.
Kemal AkkayaWireless & Network Security 1 Department of Computer Science Southern Illinois University Carbondale CS 591 – Wireless & Network Security Lecture.
CMSC 414 Computer and Network Security Lecture 22 Jonathan Katz.
EEC-484/584 Computer Networks Lecture 16 Wenbing Zhao
McGraw-Hill©The McGraw-Hill Companies, Inc., Security PART VII.
Just Fast Keying (JFK) Protocol 18739A: Foundations of Security and Privacy Anupam Datta CMU Fall
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Spring 2003CS 4611 Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Computer Networking Lecture 21: Security and Cryptography Thanks to various folks from , semester’s past and others.
Cryptography April 20, 2010 MIS 4600 – MBA © Abdou Illia.
Hash Functions Nathanael Paul Oct. 9, Hash Functions: Introduction Cryptographic hash functions –Input – any length –Output – fixed length –H(x)
Fall 2010/Lecture 311 CS 426 (Fall 2010) Public Key Encryption and Digital Signatures.
TCP/IP Protocol Suite 1 Chapter 28 Upon completion you will be able to: Security Differentiate between two categories of cryptography schemes Understand.
1 CS 194: Distributed Systems Security Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer Sciences.
Network Security. Contents Security Requirements and Attacks Confidentiality with Conventional Encryption Message Authentication and Hash Functions Public-Key.
Computer Science CSC 774Dr. Peng Ning1 CSC 774 Advanced Network Security Topic 2. Review of Cryptographic Techniques.
Chapter 8.  Cryptography is the science of keeping information secure in terms of confidentiality and integrity.  Cryptography is also referred to as.
CN8816: Network Security1 Confidentiality, Integrity & Authentication Confidentiality - Symmetric Key Encryption Data Integrity – MD-5, SHA and HMAC Public/Private.
Sorting Out Digital Certificates Bill blog.codingoutloud.com ··· Boston Azure ··· 13·Dec·2012 ···
8. Data Integrity Techniques
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.
Network Security. An Introduction to Cryptography The encryption model (for a symmetric-key cipher).
10/1/2015 9:38:06 AM1AIIS. OUTLINE Introduction Goals In Cryptography Secrete Key Cryptography Public Key Cryptograpgy Digital Signatures 2 10/1/2015.
Key Exchange Protocols J. Mitchell CS Next few lectures uToday 1/17 Some possible projects Key exchange protocols and properties uTuesday 1/19.
Cryptography, Authentication and Digital Signatures
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
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.
EE515/IS523 Think Like an Adversary Lecture 4 Crypto in a Nutshell Yongdae Kim.
4 th lecture.  Message to be encrypted: HELLO  Key: XMCKL H E L L O message 7 (H) 4 (E) 11 (L) 11 (L) 14 (O) message + 23 (X) 12 (M) 2 (C) 10 (K) 11.
Module 3 – Cryptography Cryptography basics Ciphers Symmetric Key Algorithms Public Key Algorithms Message Digests Digital Signatures.
Chapter 31 Cryptography And Network Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Cryptography Wei Wu. Internet Threat Model Client Network Not trusted!!
Wireless LAN Security. Security Basics Three basic tools – Hash function. SHA-1, SHA-2, MD5… – Block Cipher. AES, RC4,… – Public key / Private key. RSA.
Network Security David Lazăr.
IPsec IPsec (IP security) Security for transmission over IP networks –The Internet –Internal corporate IP networks –IP packets sent over public switched.
Lecture 16: Security CDK4: Chapter 7 CDK5: Chapter 11 TvS: Chapter 9.
Lecture 2: Introduction to Cryptography
Cryptography 1 Crypto Cryptography 2 Crypto  Cryptology  The art and science of making and breaking “secret codes”  Cryptography  making “secret.
15-499Page :Algorithms and Applications Cryptography I – Introduction – Terminology – Some primitives – Some protocols.
INFORMATION SECURITY MANAGEMENT P ROTECTION M ECHANISMS - C RYPTOGRAPHY.
Group 9 Chapter 8.3 – 8.6. Public Key Algorithms  Symmetric Key Algorithms face an inherent problem  Keys must be distributed to all parties but kept.
Key Management Network Systems Security Mort Anvari.
INFORMATION SECURITY MANAGEMENT P ROTECTION M ECHANISMS - C RYPTOGRAPHY.
Cryptography Hyunsung Kim, PhD University of Malawi, Chancellor College Kyungil University February, 2016.
@Yuan Xue CS 285 Network Security Secure Socket Layer Yuan Xue Fall 2013.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
Key Management Protocols and Compositionality John Mitchell Stanford TECS Week2005.
Reviews Rocky K. C. Chang 20 April 2007.
Security through Encryption
Review of Cryptography: Symmetric and Asymmetric Crypto Advanced Network Security Peter Reiher August, 2014.
Presentation transcript:

Key Exchange Protocols J. Mitchell CS 259

Next few lectures uToday 1/17 Brief cryptography background Key exchange protocols and properties uThursday 1/19 Wireless security: i Choose your project partner uNext Tues 1/24 Password authentication protocols uNext Thurs 1/26 Contract-signing protocols uProject presentation #1 2/2 Talk about protocols for a while before looking at more tools

uEncryption scheme: functions to encrypt, decrypt data key generation algorithm uSecret key vs. public key Public key: publishing key does not reveal key -1 Secret key: more efficient, generally key = key -1 uHash function, MAC Map input to short hash; ideally, no collisions MAC (keyed hash) used for message integrity uSignature scheme Functions to sign data, verify signature Basic Concepts in Cryptography

Cryptosystem uA cryptosystem consists of five parts A set P of plaintexts A set C of ciphertexts A set K of keys A pair of functions encrypt: K  P  C decrypt: K  C  P such that for every key k  K and plaintext p  P decrypt(k, encrypt(k, p)) = p

What is a “secure” cryptosystem? uOne idea If enemy intercepts ciphertext, cannot recover plaintext uIssues in making this precise What else might your enemy know? –The kind of encryption function you are using –Some plaintext-ciphertext pairs from last year –Some information about how you choose keys What do we mean by “cannot recover plaintext” ? –Ciphertext contains no information about plaintext –No efficient computation could make a reasonable guess –Cannot use ciphertext for any nontrivial purpose

Passive Adversary ChallengerAttacker m 0, m 1 E(m i ) guess 0 or 1

Chosen ciphertext CCA1 ChallengerAttacker m 0, m 1 E(m i ) guess 0 or 1 c D(c)

Chosen ciphertext CCA2 ChallengerAttacker m 0, m 1 E(m i ) guess 0 or 1 c D(c) c  E(m i ) D(c)

uDifferent keys to encrypt and decrypt encrypt(key, message) decrypt(key -1, encrypt(key, message)) = message uEncryption key does not help decrypt Cannot compute m from encrypt(key, m) and key, unless you have key -1 Public-key Cryptosystem key pair

Example: RSA uArithmetic modulo pq Generate secret primes p, q Generate secret numbers a, b with x ab  x mod pq uPublic encryption key  n, a  Encrypt(  n, a , x) = x a mod n uPrivate decryption key  n, b  Decrypt(  n, b , y) = y b mod n uMain properties This works Cannot compute b from n,a –Apparently, need to factor n = pq n

Cryptographic hash functions uLength-reducing function h Map arbitrary strings to strings of fixed length uOne way (“preimage resistance”) Given y, hard to find x with h(x)=y uCollision resistant Hard to find any distinct m, m’ with h(m)=h(m’) uAlso useful: 2 nd preimage resistance Given x and y=h(x) hard to find x’  x with h(x’)=h(x) Collision resistance  2 nd preimage resistance

Iterated hash functions uRepeat use of block cipher or custom function Pad input to some multiple of block length Iterate a length-reducing function f –f : 2 2k -> 2 k reduces bits by 2 –Repeat h 0 = some seed h i+1 = f(h i, x i ) Some final function g completes calculation Pad to x=x 1 x 2 …x k f g xixi f(x i-1 ) x

Applications of one-way hash uPassword files (one way) uDigital signatures (collision resistant) Sign hash of message instead of entire message uData integrity Compute and store hash of some data Check later by recomputing hash and comparing uKeyed hash for message authentication MAC – Message Authentication Code

Digital Signatures uPublic-key encryption Alice publishes encryption key Anyone can send encrypted message Only Alice can decrypt messages with this key uDigital signature scheme Alice publishes key for verifying signatures Anyone can check a message signed by Alice Only Alice can send signed messages

Properties of signatures uFunctions to sign and verify Sign(Key -1, message) Verify(Key, x, m) = uResists forgery Cannot compute Sign(Key -1, m) from m and Key Resists existential forgery: given Key, cannot produce Sign(Key -1, m) for any random or otherwise arbitrary m true if x = Sign(Key -1, m) false otherwise

uEncryption scheme: functions to encrypt, decrypt data key generation algorithm uSecret key vs. public key Public key: publishing key does not reveal key -1 Secret key: more efficient, generally key = key -1 uHash function, MAC Map input to short hash; ideally, no collisions MAC (keyed hash) used for message integrity uSignature scheme Functions to sign data, verify signature Basic Concepts in Cryptography

Key Management uOut of band Can set up some keys this way (Kerberos) uPublic-key infrastructure (PKI) Leverage small # of public signing keys uProtocols for session keys Generate short-lived session key Avoid extended use of important secret Don’t use same key for encryption and signing Forward secrecy Cryptography reduces many problems to key management

Key Distribution: Kerberos Idea Client KeyCenter Server Shared symmetric key Kc Shared symmetric key Ks {Kcs, {Kcs} Ks } Kc {Kcs} Ks { msg } Kcs Key Center generates session key Kcs and distributes using shared long-term keys

Public-Key Infrastructure Certificate Authority ClientServer Known public signature verification key Ka Sign(Ka, Ks), Sign(Ks, msg) Certificate Sign(Ka, Ks) Ks Server certificate can be verified by any client that has CA key Ka Certificate authority is “off line”

Key Exchange uParties may have initial information uGenerate and agree on session key Authentication – know ID of other party Secrecy – key not known to any others Avoid replay attack Forward secrecy Avoid denial of service Identity protection – disclosure to others Other properties you can think of???

Diffie-Hellman Key Exchange uAssume finite group G =  S,   Generator g so every x  S is x = g n Example: integers modulo prime p uProtocol g a mod p g b mod p A B Alice, Bob share g ab mod p not known to anyone else

Diffie-Hellman Key Exchange Authentication? Secrecy? Replay attack Forward secrecy? Denial of service? Identity protection? g a mod p g b mod p A B

IKE subprotocol from IPSEC A, (g a mod p) B, (g b mod p) Result: A and B share secret g ab mod p Signatures provide authentication, as long as signature verification keys are known AB m1 m2, signB(m1,m2) signA(m1,m2)

IPSec: Network Layer Security uAuthentication Header (AH) Access control and authenticate data origins replay protection No confidentiality uEncapsulated Secure Payload (ESP) Encryption and/or authentication uInternet Key management (IKE) Determine and distribute secret keys Oakley + ISAKMP Algorithm independent uSecurity policy database (SPD) discarded, or bypass

IKE: Many modes uMain mode Authentication by pre-shared keys Auth with digital signatures Auth with public-key encryption Auth with revised public-key encryption uQuick mode Compress number of messages Also four authentication options

Aug 2001 Position Statement u In the several years since the standardization of the IPSEC protocols (ESP, AH, and ISAKMP/IKE), … several security problems…, most notably IKE. uFormal and semi-formal analyses by Meadows, Schneier et al, and Simpson, have shown … security problems in IKE stem directly from its complexity. uIt seems … only a matter of time before serious *implementation* problems become apparent, again due to the complex nature of the protocol, and the complex implementation that must surely follow. uThe Security Area Directors have asked the IPSEC working group to come up with a replacement for IKE.

How to study complex protocol

General Problem in Security uDivide-and-conquer is fundamental Decompose system requirements into parts Develop independent software modules Combine modules to produce required system uCommon belief: Security properties do not compose Difficult system development problem

Example protocol Protocol P1 A  B : {message} KB A  B : KA -1 uThis satisfies basic requirements Message is transmitted under encryption Revealing secret key KA -1 does not reveal message

Similar protocol Protocol P2 B  A : {message’} KA B  A : KB -1 uTransmits msg securely from B to A Message is transmitted under encryption Revealing secret key KB -1 does not reveal message

Composition P1; P2 uSequential composition of two protocols A  B : {message} KB A  B : KA -1 B  A : {message’} KA B  B : KB -1 uDefinitely not secure Eavesdropper learns both keys, decrypts messages

STS family m=g x, n=g y k=g xy STS 0H STS a STS aH STS H STS 0 STS PH JFK 1 distribute certificates cookie open responder JFK 0 symmetric hash JFK protect identities RFK STS P

Example uConstruct protocol with properties: Shared secret Authenticated Identity Protection DoS Protection uDesign requirements for IKE, JFK, IKEv2 (IPSec key exchange protocol)

Component 1 uDiffie-Hellman A  B: g a B  A: g b Shared secret (with someone) –A deduces: Knows(Y, g ab)  (Y = A) ۷ Knows(Y,b) Authenticated Identity Protection DoS Protection

Component 2 uChallenge Response: A  B: m, A B  A: n, sig B {m, n, A} A  B: sig A {m, n, B} Shared secret (with someone) Authenticated –A deduces: Received (B, msg1) Λ Sent (B, msg2) Identity Protection DoS Protection

Composition uISO protocol: A  B: g a, A B  A: g b, sig B {g a, g b, A} A  B: sig A {g a, g b, B} Shared secret: gab Authenticated Identity Protection DoS Protection m := g a n := g b

Refinement uEncrypt signatures: A  B: g a, A B  A: g b, E K {sig B {g a, g b, A}} A  B: E K {sig A {g a, g b, B}} Shared secret: gab Authenticated Identity Protection DoS Protection

Transformation uUse cookie: JFK core protocol A  B: g a, A B  A: g b, hash KB {g b, g a } A  B: g a, g b, hash KB {g b, g a } E K {sig A {g a, g b, B}} B  A: g b, E K {sig B {g a, g b, A}} Shared secret: gab Authenticated Identity Protection DoS Protection (Here B must store b in step 2, but we’ll fix this later…)

Cookie transformation uTypical protocol Client sends request to server Server sets up connection, responds Client may complete session or not (DOS) uCookie version Client sends request to server Server sends hashed data back –Send message #2 later after client confirms Client confirms by returning hashed data Need extra step to send postponed message

Cookie in JFK uProtocol susceptible to DOS A  B: g a, A B  A: g b, E K {sig B {g a, g b, A}} A  B: E K {sig A {g a, g b, B}} uUse cookie: JFK core protocol A  B: g a, A B  A: g b, hash KB {g b, g a } A  B: g a, g b, hash KB {g b, g a }, eh2 B  A: g b, eh1 eh1 eh2

Efficiency: Reuse D-H key uCostly to compute g a, g b, g ab uSolution Keep medium-term g a, g b (change ~10 min) Replace g a by pair g a, nonce uJFKi, JFKr protocols (except cert or grpinfo, …) A  B: Na, g a, A B  A: Nb, g b, hash KB {Nb, Na, g b, g a } A  B: Na, Nb, g a, g b, hash KB {Nb, Na, g b, g a }, E K {sig A {Na, Nb, g a, g b, B}} B  A: g b, E K {sig B {Na, Nb, g a, g b, A}} Note: B does not need to store any short-term data in step 2

Conclusion uMany protocol properties Authentication Secrecy Prevent replay Forward secrecy Denial of service Identity protection uSystematic understanding is possible But be careful; easy to make mistakes State of the art: need to analyze complete protocol

Block cipher modes (for DES, AES, …) uECB – Electronic Code Book mode Divide plaintext into blocks Encrypt each block independently, with same key uCBC – Cipher Block Chaining XOR each block with encryption of previous block Use initialization vector IV for first block uOFB – Output Feedback Mode Iterate encryption of IV to produce stream cipher uCFB – Cipher Feedback Mode Output block y i = input x i encyrpt K (y i-1 ) +

Electronic Code Book (ECB) Plain Text t CipCiphe r Texher T Block Cipher Problem: Identical blocks encrypted identically No integrity check

Cipher Block Chaining (CBC) Plain Text t CipCiphe r Texher T Block Cipher IV Block Cipher Advantages: Identical blocks encrypted differently Last ciphertext block depends on entire input

Comparison (for AES, by Bart Preneel) Similar plaintext blocks produce similar ciphertext (see outline of head) No apparent pattern