Fun with Crypto – keys and protocols some Bishop, some Jim, some RA.

Slides:



Advertisements
Similar presentations
Internet Protocol Security (IP Sec)
Advertisements

Chapter 14 – Authentication Applications
Authentication Applications. will consider authentication functions will consider authentication functions developed to support application-level authentication.
Spring 2012: CS419 Computer Security Vinod Ganapathy SSL, etc.
Internet Security CSCE 813 IPsec
CIS 725 Key Exchange Protocols. Alice ( PB Bob (M, PR Alice (hash(M))) PB Alice Confidentiality, Integrity and Authenication PR Bob M, hash(M) M, PR Alice.
Csci5233 Computer Security1 Bishop: Chapter 10 (Cont.) Key Management: Certificates.
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Associate Professor, SIS Lecture 8 Nov 2, 2010 Key Management Network Security.
Chapter 5 Network Security Protocols in Practice Part I
ECE 454/CS 594 Computer and Network Security Dr. Jinyuan (Stella) Sun Dept. of Electrical Engineering and Computer Science University of Tennessee Fall.
Henric Johnson1 Ola Flygt Växjö University, Sweden IP Security.
IP Security. Overview In 1994, Internet Architecture Board (IAB) issued a report titled “Security in the Internet Architecture”. This report identified.
CSCE 715: Network Systems Security Chin-Tser Huang University of South Carolina.
Encryption and Firewalls Chapter 7. Learning Objectives Understand the role encryption plays in firewall architecture Know how digital certificates work.
CSCI283 Fall 2005 GWU All slides from Bishop’s slide set Public Key Infrastructure (PKI)
CSCI283 Fall 2005 GWU All slides from Bishop’s slide set Stream Ciphers.
November 1, 2004Introduction to Computer Security ©2004 Matt Bishop Slide #9-1 Chapter 9: Key Management Session and Interchange Keys Key Exchange Cryptographic.
1 Digital Signatures CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute April 12, 2004.
Chapter 9: Key Management
1 Key Management CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute April 1, 2004.
Computer Security1 Bishop: Chapter 9 Key Management.
TCP/IP Protocol Suite 1 Chapter 28 Upon completion you will be able to: Security Differentiate between two categories of cryptography schemes Understand.
Slide #9-1 Chapter 9: Key Management Session and Interchange Keys Key Exchange Cryptographic Key Infrastructure Storing and Revoking Keys Digital Signatures.
Network Security. Contents Security Requirements and Attacks Confidentiality with Conventional Encryption Message Authentication and Hash Functions Public-Key.
What is in Presentation What is IPsec Why is IPsec Important IPsec Protocols IPsec Architecture How to Implement IPsec in linux.
Csci5233 Computer Security1 Bishop: Chapter 10 Key Management: Digital Signature.
SYSTEM ADMINISTRATION Chapter 13 Security Protocols.
Csci5233 Computer Security1 Bishop: Chapter 10 (Cont.) Key Management: Storage & Revoking.
Cryptography, Authentication and Digital Signatures
Digital Signatures. Public Key Cryptography Public Key Cryptography Requirements 1.It must be computationally easy to encipher or decipher a message.
CSCE 715: Network Systems Security
1 IS 2150 / TEL 2810 Information Security & Privacy James Joshi Associate Professor, SIS Lecture 2 Sept 4, 2013 Key Management Network Security.
Certificate-Based Operations. Module Objectives By the end of this module participants will be able to: Define how cryptography is used to secure information.
1 Chapter 9: Key Management All algorithms we have introduced are based on one assumption: keys have been distributed. But how to do that? Key generation,
1 IS 2150 / TEL 2810 Introduction to Security James Joshi Assistant Professor, SIS Lecture 10 Nov 8, 2007 Hash Functions Key Management.
1 Digital Certificates (X.509, OpenPGP), Security Protocols James Joshi, Associate Professor University of Pittsburgh.
Karlstad University IP security Ge Zhang
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.
IPsec Introduction 18.2 Security associations 18.3 Internet Security Association and Key Management Protocol (ISAKMP) 18.4 Internet Key Exchange.
IP Security.  In CERTs 2001 annual report it listed 52,000 security incidents  the most serious involving:  IP spoofing intruders creating packets.
IPSec ● IP Security ● Layer 3 security architecture ● Enables VPN ● Delivers authentication, integrity and secrecy ● Implemented in Linux, Cisco, Windows.
Courtesy of Professors Chris Clifton & Matt Bishop INFSCI 2935: Introduction of Computer Security1 Nov 4, 2003 Introduction to Computer Security Lecture.
X.509 Topics PGP S/MIME Kerberos. Directory Authentication Framework X.509 is part of the ISO X.500 directory standard. used by S/MIME, SSL, IPSec, and.
Chapter 32 Internet Security Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Security fundamentals Topic 5 Using a Public Key Infrastructure.
IP security Ge Zhang Packet-switched network is not Secure! The protocols were designed in the late 70s to early 80s –Very small network.
PGP & IP Security  Pretty Good Privacy – PGP Pretty Good Privacy  IP Security. IP Security.
IPSec and TLS Lesson Introduction ●IPSec and the Internet key exchange protocol ●Transport layer security protocol.
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.
1 Lecture 13 IPsec Internet Protocol Security CIS CIS 5357 Network Security.
Cryptography and Network Security (CS435) Part Thirteen (IP Security)
Csci5233 Computer Security1 Bishop: Chapter 10 Key Management.
Slide #9-1 Chapter 9: Key Management Session and Interchange Keys Key Exchange Cryptographic Key Infrastructure Storing and Revoking Keys Digital Signatures.
IPSec is a suite of protocols defined by the Internet Engineering Task Force (IETF) to provide security services at the network layer. standard protocol.
1 IPSec: An Overview Dr. Rocky K. C. Chang 4 February, 2002.
Network Layer Security Network Systems Security Mort Anvari.
K. Salah1 Security Protocols in the Internet IPSec.
1IS2150/TEL2810: Introduction to Computer Security Nov 1, 2005 Introduction to Computer Security Lecture 8 Key Management.
Prof. Reuven Aviv, Nov 2013 Public Key Infrastructure1 Prof. Reuven Aviv Tel Hai Academic College Department of Computer Science Public Key Infrastructure.
Cryptography and Network Security Chapter 14 Fifth Edition by William Stallings Lecture slides by Lawrie Brown.
Key management issues in PGP
Chapter 5 Network Security Protocols in Practice Part I
IPSecurity.
Public Key Infrastructure (PKI)
Chapter 9: Key Management
Presentation transcript:

Fun with Crypto – keys and protocols some Bishop, some Jim, some RA

June 15 introseccrypto2-2 Keys and protocols Keys, notation, session keys certs and digital signatures Key infrastructure, storage protocols – how we use keys Needham-Schroder/Kerberos stream/block ciphers crypto protocol examples, PEM (dead), IPSEC

June 15 introseccrypto2-3 can you export this t-shirt?

June 15 introseccrypto2-4 Basic Notation X  Y : { Z || W } k X,Y X sends Y the message produced by concatenating Z and W enciphered by key k X,Y, which is shared by users X and Y: A  T : { Z } k A || { W } k A,T A sends T a message consisting of the concatenation of Z enciphered using k A, A’s key, and W enciphered using k A,T, the key shared by A and T r 1, r 2 nonces (nonrepeating random numbers) e – encipher, d - decipher

June 15 introseccrypto2-5 Cryptographic Key Infrastructure Goal: bind identity to key Classical: not possible as all keys are shared Use protocols to agree on a shared key Public key: bind identity to public key Crucial as people will use key to communicate with principal whose identity is bound to key Erroneous binding means no secrecy between principals Assume principal identified by an acceptable name

June 15 introseccrypto2-6 Certificates – public key/name a cert is a signed public key Create token (message) containing Identity of principal (here, Alice) Corresponding public key Timestamp (when issued) Other information (perhaps identity of signer) signed by trusted authority (here, Cathy) C A = { e A || Alice || T } d C

June 15 introseccrypto2-7 Use Bob gets Alice’s certificate SOMEHOW If he knows Cathy’s public key, he can decipher the certificate When was certificate issued? Is the principal Alice? Now Bob has Alice’s public key Problem: Bob needs Cathy’s public key to validate certificate Problem pushed “up” a level Problem is real though Solution space: some distributed protocol tree to get CERTs OR a CERT (a message or file on a computer) has needed CERTS provided with it (a CERT chain)

June 15 introseccrypto2-8 Certificate Signature Chains Create certificate Generate hash of certificate sign hash with issuer’s private key Validate signature Obtain issuer’s public key Decipher enciphered hash Recompute hash from certificate and compare Problem: getting issuer’s public key

June 15 introseccrypto2-9 X.509 certificate format Some certificate components in X.509v3: Version Serial number Signature algorithm identifier: hash algorithm Issuer’s name; uniquely identifies issuer Interval of validity Subject’s name; uniquely identifies subject Subject’s public key Signature: enciphered hash

June 15 introseccrypto2-10 Issuers Certification Authority (CA): entity that issues certificates Multiple issuers pose validation problem Alice’s CA is Cathy; Bob’s CA is Don; how can Alice validate Bob’s certificate? Have Cathy and Don cross-certify Each issues certificate for the other Have a hierarchical cert. authority Cathy and Don have Eduard as a CA

June 15 introseccrypto2-11 CA tree Alice has CA1 Bob has CA2 CA1 and CA2 have CA3 Alice gets CERT from Bob, must validate Bob with CA2 (no trust) then validate CA2 with CA3 (hierarchical trust relationship)

June 15 introseccrypto2-12 Signing with PGP Single certificate may have multiple signatures associated with it Notion of “trust” embedded in each signature Range from “untrusted” to “ultimate trust” Signer defines meaning of trust level (no standards!) with a hierarchy eventually you come to a CA that must trust itself … Called “self-signing” PGP has notion of “web of trust”, no CA hierarchy

June 15 introseccrypto2-13 PGP Web of trust - Validating Certificates Alice needs to validate Bob’s OpenPGP cert Does not know Fred, Giselle, or Ellen Alice gets Giselle’s cert Knows Henry slightly, but his signature is at “casual” level of trust Alice gets Ellen’s cert Knows Jack, so uses his cert to validate Ellen’s, then hers to validate Bob’s Bob Fred Giselle Ellen Irene Henry Jack Arrows show signatures Self signatures not shown

June 15 introseccrypto2-14 Storing Keys Multi-user or networked systems: attackers may defeat access control mechanisms Encipher file containing key – consider these problems Attacker can monitor keystrokes to decipher files Key will be resident in memory that attacker may be able to read (o.s. swap also possible) Use physical devices like “smart card” Key never enters system Card can be stolen, so have 2 devices combine bits to make single key attacks against smart keys exist

June 15 introseccrypto2-15 Key Revocation – timeout or CRL Certificates may be invalidated before expiration Usually due to compromised key May be due to change in circumstance (e.g., someone leaving company) Problems Entity revoking certificate authorized to do so Revocation information circulates to everyone fast enough Network delays, infrastructure problems may delay information there is very little real experience with cert. revocation other than timestamp timeout

June 15 introseccrypto2-16 Digital Signature Construct that authenticated origin, contents of message in a manner provable to a disinterested third party (“judge”) Sender cannot deny having sent message (service is “nonrepudiation”) Limited to technical proofs Inability to deny one’s cryptographic key was used to sign One could claim the cryptographic key was stolen or compromised Legal proofs, etc., probably required; not dealt with here Alice’s box with cert was hacker by Malach, Malach made bank transactions …

June 15 introseccrypto2-17 Common Error Classical: Alice, Bob share key k Alice sends m || { m } k to Bob This is a digital signature?WRONG This is not a digital signature Why? Third party cannot determine whether Alice or Bob generated message

June 15 introseccrypto2-18 conventional wisdom with public key crypto we sign with our private key, they verify with their public key obviously they can’t have our private key they encrypt with our public key, send us M, we decrypt with our private key RSA fits this model if they encrypted with our private key, and we decrypted with our public key the world would be a tad cockeyed

June 15 introseccrypto2-19 RSA Digital Signatures Use private key to encipher message Protocol for use is critical Key points: Never sign random documents, and when signing, always sign hash and never document Mathematical properties can be turned against signer Sign message first, then encipher Changing public keys causes forgery

June 15 introseccrypto2-20 session keys, and key exchange protocols (KMP) typically it is not a good idea to use the same key over and over again an adversary has better odds of cracking Ki with a greater number of messages therefore we may choose to generate “session-keys” based on previous shared secrets – and discard them at some point based on too much time or too many messages protocols exist for generating keys and setting them up between both sides (Alice and Bob) goal is typically generation of encryption or MD keys

June 15 introseccrypto2-21 simple session key – courtesy of public-key crypto Alice wants to send a message m to Bob Assume public key encryption Alice generates a random cryptographic key k s and uses it to encipher m To be used for this message only Called a session key She enciphers k s with Bob;s public key k B k B enciphers all session keys Alice uses to communicate with Bob Called an interchange key Alice sends { m } k s { k s } k B

June 15 introseccrypto2-22 Benefits Limits amount of traffic enciphered with single key Standard practice, to decrease the amount of traffic an attacker can obtain Prevents some attacks Example: Alice will send Bob message that is either “BUY” or “SELL”. Eve computes possible ciphertexts { “BUY” } k B and { “SELL” } k B. Eve intercepts enciphered message, compares, and gets plaintext at once

June 15 introseccrypto2-23 Key Exchange Algorithms Goal: Alice, Bob get shared key Key cannot be sent in clear Attacker can listen in Key can be sent enciphered, or derived from exchanged data plus data not known to an eavesdropper (DH) Alice, Bob may trust third party (Kerberos) All cryptosystems, protocols publicly known secrets in keys Anything transmitted is assumed available to attacker

June 15 introseccrypto2-24 Simple Symmetric-key exchange Protocol, Cathy is trusted 3 rd party Alice Cathy { request for session key to Bob } k A Alice Cathy { k s } k A || { k s } k B Alice Bob { k s } k B

June 15 introseccrypto2-25 Problems How does Bob know he is talking to Alice? Replay attack: Eve records message from Alice to Bob, later replays it; Bob may think he’s talking to Alice, but he isn’t Session key reuse: Eve replays message from Alice to Bob, so Bob re-uses session key Protocols must provide authentication and defense against replay

June 15 introseccrypto2-26 Needham-Schroeder AliceCathy Alice || Bob || r 1 AliceCathy { Alice || Bob || r 1 || k s || { Alice || k s } k B } k A AliceBob { Alice || k s } k B AliceBob { r 2 } k s AliceBob { r 2 – 1 } k s

June 15 introseccrypto2-27 Kerberos Authentication system Based on Needham-Schroeder with Denning-Sacco modification Central server plays role of trusted third party (“Cathy”) Ticket session-key with timestamp Authenticator (DNS like) Identifies sender

June 15 introseccrypto2-28 Idea User u authenticates to Kerberos server Obtains ticket T u,TGS for ticket granting service (TGS) TGS is Kerberos form of single sign-on User u wants to use service s: User sends authenticator A u, ticket T u,TGS to TGS asking for ticket for service TGS sends ticket T u,s to user User sends A u, T u,s to server as request to use s Details follow

June 15 introseccrypto2-29 Ticket Credential saying issuer has identified ticket requester, note 3-way binding below Example ticket issued to user u for service s T u,s = s || { u || u’s address || valid time || k u,s } k s where: session key: k u,s for user and service time: is interval for which ticket valid identity: u’s address may be IP address or something else

June 15 introseccrypto2-30 Authenticator Credential containing identity of sender of ticket Used to confirm sender is entity to which ticket was issued Example: authenticator user u generates for service s A u,s = { u || generation time || k t } k u,s where: k t is alternate session key Generation time is when authenticator generated Note: more fields, not relevant here

June 15 introseccrypto2-31 Protocol userCathy user || TGS userCathy { k u,TGS } k u || T u,TGS userTGS service || A u,TGS || T u,TGS userTGS user || { k u,s } k u,TGS || T u,s userservice A u,s || T u,s userservice { t + 1 } k u,s

June 15 introseccrypto2-32 Analysis First two steps get user ticket to use TGS User u can obtain session key only if u knows key shared with Cathy Next four steps show how u gets and uses ticket for service s Service s validates request by checking sender (using A u,s ) is same as entity ticket issued to Step 6 optional; used when u requests confirmation

June 15 introseccrypto2-33 Problems Relies on synchronized clocks If not synchronized and old tickets, authenticators not cached, replay is possible Bellovin poked homes in K4 in famous paper so now we have K5 which uses ASN.1 (ouch ouch ouch)

June 15 introseccrypto2-34 Public Key Key Exchange Here interchange keys known e A, e B Alice and Bob’s public keys known to all d A, d B Alice and Bob’s private keys known only to owner Simple protocol k s is desired session key Alice Bob { k s } e B

June 15 introseccrypto2-35 Problem and Solution Vulnerable to forgery or replay Because e B known to anyone, Bob has no assurance that Alice sent message Simple fix uses Alice’s private key k s is desired session key Alice Bob { { k s } d A } e B

June 15 introseccrypto2-36 Notes Can include message enciphered with k s Assumes Bob has Alice’s public key, and vice versa If not, each must get it from public server If keys not bound to identity of owner, attacker Eve can launch a man-in-the-middle attack (next slide; Cathy is public server providing public keys) Solution to this (binding identity to keys) discussed later as public key infrastructure (PKI)

June 15 introseccrypto2-37 Man-in-the-Middle Attack AliceCathy send Bob’s public key Eve Cathy send Bob’s public key Eve Cathy eBeB Alice eEeE Eve Alice Bob { k s } e E Eve Bob { k s } e B Eve intercepts request Eve intercepts message

June 15 introseccrypto2-38 Key Mgmt - Key Points Key management critical to effective use of cryptosystems Different levels of keys (session vs. interchange) Keys need infrastructure to identify holders, allow revoking Key escrowing complicates infrastructure Ultimately we still may need manual dissemination of something; e.g., root self-signed certificates Digital signatures provide integrity of origin and content Much easier with public key cryptosystems than with classical cryptosystems

June 15 introseccrypto2-39 common problems with ciphers Using cipher requires knowledge of environment, and threats in the environment, in which cipher will be used Is the set of possible messages small? Do the messages exhibit regularities that remain after encipherment? Can an active wiretapper rearrange or change parts of the message?

June 15 introseccrypto2-40 Attack #1: Precomputation Set of possible messages M small Public key cipher f used Idea: precompute set of possible ciphertexts f(M), build table (m, f(m)) When ciphertext f(m) appears, use table to find m Also called forward searches

June 15 introseccrypto2-41 message entropy space may be small Digitized sound Seems like far too many possible plaintexts Initial calculations suggest 2 32 such plaintexts Analysis of redundancy in human speech reduced this to about 100,000 (≈ 2 17 ) This is small enough to worry about precomputation attacks

June 15 introseccrypto2-42 Misordered Blocks Alice sends Bob message Message is LIVE ( ) Enciphered message is Eve intercepts it, rearranges blocks Now enciphered message is Bob gets enciphered message, deciphers it He sees EVIL

June 15 introseccrypto2-43 Notes Digitally signing each block won’t stop this attack Two approaches: Cryptographically hash the entire message and sign it Place sequence numbers in each block of message, so recipient can tell intended order Then you sign each block

June 15 introseccrypto2-44 Statistical Regularities If plaintext repeats, ciphertext may too Example using DES: input (in hex): corresponding output (in hex): ef7c 4bb2 b4ce 6f3b Fix: cascade blocks together (chaining) this is why DES-CBC is used

June 15 introseccrypto2-45 What These Mean Use of strong cryptosystems, well-chosen (or random) keys not enough to be secure Other factors: Protocols directing use of cryptosystems Ancillary information added by protocols Implementation (not discussed here) Maintenance and operation (not discussed here)

June 15 introseccrypto2-46 Networks and Cryptography ISO/OSI model Conceptually, each host has peer at each layer Peers communicate with peers at same layer

June 15 introseccrypto2-47 Link and End-to-End Protocols Link Protocol End-to-End (or E2E) Protocol

June 15 introseccrypto2-48 Encryption Link encryption Each host enciphers message so host at “next hop” can read it Message can be read at intermediate hosts End-to-end encryption Host enciphers message so host at other end of communication can read it Message cannot be read at intermediate hosts

June 15 introseccrypto2-49 Examples secure shell protocol end to end, therefore good password form does not send password in clear (unlike traditional telnet) PPP Encryption Control Protocol Host gets message, deciphers it Figures out where to forward it Enciphers it in appropriate key and forwards it Link protocol – not end to end

June 15 introseccrypto2-50 Cryptographic Considerations Link encryption Each host shares key with neighbor should be per host pair BUT often per network (broadcast network in particular) increasing tendency to have per host or per site certificate using SSL (yes public-key crypto) End-to-end Each host shares key with destination Can be set on per-host or per-host-pair basis Message cannot be read at intermediate nodes

June 15 introseccrypto2-51 Traffic Analysis Link encryption Can protect headers of packets Possible to hide source and destination Note: may be able to deduce this from traffic flows End-to-end encryption Cannot hide IP packet headers Intermediate nodes need to route packet Attacker can read source, destination Can’t hide L3 on Internet (can’t route without it) if application encryption, not hiding L4 TCP/UDP port numbers either

June 15 introseccrypto2-52 Example Protocols Privacy-Enhanced Electronic Mail (PEM) Applications layer protocol PEM is not used in real world was breakthru of sorts in IETF/crypto history typically might use PGP/SSL at this point is often tunneled in some sense IP Security (IPSEC) Network layer protocol

June 15 introseccrypto2-53 Goals of PEM 1. Confidentiality Only sender and recipient(s) can read message 2. Origin authentication Identify the sender precisely 3. Data integrity Any changes in message are easy to detect 4. Non-repudiation of origin Whenever possible …

June 15 introseccrypto2-54 Message Handling System MTA UA MTA UA MTA UA User Agents ( client) Message Transfer Agents end to end proxy gateway

June 15 introseccrypto2-55 Design Principles Do not change related existing protocols Cannot alter SMTP Do not change existing software Need compatibility with existing software Make use of PEM optional Available if desired, but still works without them Some recipients may use it, others not Enable communication without prearrangement Out-of-band authentication, key exchange problematic

June 15 introseccrypto2-56 Basic Design: Keys Two keys Interchange keys tied to sender, recipients and is static (for some set of messages) Like a public/private key pair Must be available before messages sent Data exchange keys generated for each message a session key, session being the message

June 15 introseccrypto2-57 Basic Design: Sending Alice Bob { m } k s || { k s } k B Confidentiality m message k s data exchange key k B Bob’s interchange key

June 15 introseccrypto2-58 Basic Design: Integrity Alice Bob m { h(m) } k A Integrity and authentication: m message h(m) hash of message m —Message Integrity Check (MIC) k A Alice’s interchange key Non-repudiation: if k A is Alice’s private key, this establishes that Alice’s private key was used to sign the message

June 15 introseccrypto2-59 Basic Design: Everything Alice Bob { m } k s || { h(m) } k A || { k s } k B Confidentiality, integrity, authentication: Notations as in previous slides If k A is private key, get non-repudiation too

June 15 introseccrypto2-60 Practical Considerations Limits of SMTP Only ASCII characters, limited length lines Use encoding procedure 1. Map local char representation into canonical format – Format meets SMTP requirements 2. Compute and encipher MIC over the canonical format; encipher message if needed 3. Map each 6 bits of result into a character; insert newline after every 64th character 4. Add delimiters around this ASCII message

June 15 introseccrypto2-61 PEM vs. PGP Use different ciphers PGP originally used IDEA cipher PEM used DES in CBC mode Use different certificate models PGP uses general “web of trust” PEM uses hierarchical certification structure fatal flaw … no such beastie Inet-wide Handle end of line differently PGP remaps end of line if message tagged “text”, but leaves them alone if message tagged “binary” PEM always remaps end of line

June 15 introseccrypto2-62 IPsec Network layer security Provides confidentiality, integrity, authentication of endpoints, replay detection Protects all messages sent along a path dest router firewall router firewall src IP inside enterprise IP+IPsecIP security gateways

June 15 introseccrypto2-63 IPsec Tunnel Mode Encapsulate IP packet (IP header and IP data) Use IP to send IPsec-wrapped packet Note: inner IP header protected typically end to router, or router to router encapsulated data body IP header between 2 routers IP ESP {previous IP packet}

June 15 introseccrypto2-64 IPsec Protocols Authentication Header (AH) integrity, authentication weak anti-replay Encapsulating Security Payload (ESP) Confidentiality + anti-replay in current version hash is also available one either uses AH or ESP, but not both IKE = Oakley (DH more or less) + ISAKMP ISAKMP is a metaprotocol for KMP design

June 15 introseccrypto2-65 IPsec Architecture Security Policy Database (SPD) Says how to handle messages (discard them, add security services, forward message unchanged) SPD associated with network interface SPD determines appropriate entry from packet attributes Including source, destination, transport protocol

June 15 introseccrypto2-66 Example Goals Discard SMTP packets from host Forward packets from without change SPD entries src , dest to , port 25, discard src , dest to , port 25, bypass dest to , port 25, apply IPsec Note: entries scanned in order If no match for packet, it is discarded

June 15 introseccrypto2-67 IPsec Architecture Security Association (SA) Association between peers for security services Identified uniquely by dest address, security protocol (AH or ESP), unique 32-bit number (security parameter index, or SPI) Unidirectional (routing is 2 one-way problems) Can apply different services in either direction SA uses either ESP or AH; if both required, 2 SAs needed

June 15 introseccrypto2-68 SA Database (SAD) Entry describes SA; some fields for all packets: AH algorithm identifier, keys When SA uses AH ESP encipherment algorithm identifier, keys When SA uses confidentiality from ESP ESP authentication algorithm identifier, keys When SA uses authentication, integrity from ESP SA lifetime (time for deletion or max byte count) IPsec mode (tunnel, transport, either)

June 15 introseccrypto2-69 SAD Fields Antireplay (inbound only) When SA uses antireplay feature Sequence number counter (outbound only) Generates AH or ESP sequence number Sequence counter overflow field Stops traffic over this SA if sequence counter overflows Aging variables Used to detect time-outs

June 15 introseccrypto2-70 Which to Use: Gnu PGP, IPSEC? What do the security services apply to? If applicable to one application and application layer mechanisms available, use that PGP/SSL for electronic mail IPSEC is VPN, can cover ALL applications, but maybe not end to end might be host to IPSEC server inside enterprise router to router between enterprises

June 15 introseccrypto2-71 study questions what session-key algorithms did we talk about? miss any major ones? is crypto the problem with network protocols using it (or the packaging)? people have a hard time with keys, why? public-key crypto shared secrets (in symmetric or MD algorithms) what does single sign-on mean? and do you think it will ever happen?