Computer Security:
Computer Security:
Principles and Practice
Principles and Practice
First Edition First Edition
by William Stallings and Lawrie Brown by William Stallings and Lawrie Brown
Lecture slides by Lawrie Brown Lecture slides by Lawrie Brown
Chapter 21 – Internet Security
Chapter 21 – Internet Security
Internet Security Protocols
Internet Security Protocols
and Standards
and Standards
Secure Sockets Layer (SSL) / Transport Secure Sockets Layer (SSL) / Transport
Layer Security (TLS) Layer Security (TLS)
IPv4 and IPv6 SecurityIPv4 and IPv6 Security
S/MIME (Secure/Multipurpose Internet S/MIME (Secure/Multipurpose Internet
Secure Sockets Layer (SSL)
Secure Sockets Layer (SSL)
transport layer security servicetransport layer security service originally developed by Netscapeoriginally developed by Netscape version 3 designed with public inputversion 3 designed with public input
subsequently became Internet standard subsequently became Internet standard
RFC2246: Transport Layer Security (TLS) RFC2246: Transport Layer Security (TLS)
use TCP to provide a reliable end-to-end serviceuse TCP to provide a reliable end-to-end service may be provided in underlying protocol suitemay be provided in underlying protocol suite
SSL Record Protocol Services
SSL Record Protocol Services
message integritymessage integrity
using a MAC with shared secret keyusing a MAC with shared secret key
similar to HMAC but with different paddingsimilar to HMAC but with different padding
confidentialityconfidentiality
using symmetric encryption with a shared using symmetric encryption with a shared
secret key defined by Handshake Protocol secret key defined by Handshake Protocol
AES, IDEA, RC2-40, DES-40, DES, 3DES, AES, IDEA, RC2-40, DES-40, DES, 3DES,
Fortezza, RC4-40, RC4-128 Fortezza, RC4-40, RC4-128
SSL Record Protocol
SSL Record Protocol
SSL Change Cipher Spec
SSL Change Cipher Spec
Protocol
Protocol
one of 3 SSL specific protocols which use one of 3 SSL specific protocols which use
the SSL Record protocol the SSL Record protocol
a single messagea single message
SSL Alert Protocol
SSL Alert Protocol
conveys SSL-related alerts to peer entityconveys SSL-related alerts to peer entity severityseverity
• warning or fatalwarning or fatal
specific alertspecific alert
• fatal: unexpected message, bad record mac, fatal: unexpected message, bad record mac,
decompression failure, handshake failure, illegal decompression failure, handshake failure, illegal parameter
parameter
• warning: close notify, no certificate, bad certificate, warning: close notify, no certificate, bad certificate, unsupported certificate, certificate revoked,
unsupported certificate, certificate revoked, certificate expired, certificate unknown
certificate expired, certificate unknown
SSL Handshake Protocol
SSL Handshake Protocol
allows server & client to:allows server & client to:
authenticate each otherauthenticate each other
to negotiate encryption & MAC algorithmsto negotiate encryption & MAC algorithms to negotiate cryptographic keys to be usedto negotiate cryptographic keys to be used
comprises a series of messages in phasescomprises a series of messages in phases
1.
1. Establish Security CapabilitiesEstablish Security Capabilities
2.
2. Server Authentication and Key ExchangeServer Authentication and Key Exchange
3.
3. Client Authentication and Key ExchangeClient Authentication and Key Exchange
4.
IP Security
IP Security
various application security mechanismsvarious application security mechanisms
eg. S/MIME, PGP, Kerberos, SSL/HTTPSeg. S/MIME, PGP, Kerberos, SSL/HTTPS
security concerns cross protocol layerssecurity concerns cross protocol layers
hence would like security implemented by hence would like security implemented by
the network for all applications the network for all applications
authentication & encryption security authentication & encryption security
features included in next-generation IPv6 features included in next-generation IPv6
IPSec
IPSec
general IP Security mechanismsgeneral IP Security mechanisms
providesprovides
authenticationauthentication confidentialityconfidentiality
key managementkey management
applicable to use over LANs, across public applicable to use over LANs, across public
Benefits of IPSec
Benefits of IPSec
in a firewall/router provides strong security in a firewall/router provides strong security
to all traffic crossing the perimeter to all traffic crossing the perimeter
in a firewall/router is resistant to bypassin a firewall/router is resistant to bypass
is below transport layer, hence transparent is below transport layer, hence transparent
to applications to applications
can be transparent to end userscan be transparent to end users
IP Security Architecture
IP Security Architecture
mandatory in IPv6, optional in IPv4mandatory in IPv6, optional in IPv4 have two security header extensions:have two security header extensions:
Authentication Header (AH)Authentication Header (AH)
Encapsulating Security Payload (ESP)Encapsulating Security Payload (ESP)
Key Exchange functionKey Exchange function
VPNs want both authentication/encryptionVPNs want both authentication/encryption
hence usually use ESPhence usually use ESP
specification is quite complexspecification is quite complex
Security Associations
Security Associations
a one-way relationship between sender & a one-way relationship between sender &
receiver that affords security for traffic flow receiver that affords security for traffic flow
defined by 3 parameters:defined by 3 parameters:
Security Parameters Index (SPI)Security Parameters Index (SPI) IP Destination AddressIP Destination Address
Security Protocol IdentifierSecurity Protocol Identifier
has a number of other parametershas a number of other parameters
seq no, AH & EH info, lifetime etcseq no, AH & EH info, lifetime etc
Authentication Header (AH)
Authentication Header (AH)
provides support for data integrity & provides support for data integrity &
authentication of IP packets authentication of IP packets
end system/router can authenticate user/append system/router can authenticate user/app prevents address spoofing attacks by tracking prevents address spoofing attacks by tracking
sequence numbers sequence numbers
based on use of a MACbased on use of a MAC
HMAC-MD5-96 or HMAC-SHA-1-96HMAC-MD5-96 or HMAC-SHA-1-96
Encapsulating Security
Encapsulating Security
Key Management
Key Management
handles key generation & distributionhandles key generation & distribution typically need 2 pairs of keystypically need 2 pairs of keys
2 per direction for AH & ESP2 per direction for AH & ESP
manual key managementmanual key management
sysadmin manually configures every systemsysadmin manually configures every system
automated key managementautomated key management
automated system for on demand creation of automated system for on demand creation of
keys for SA’s in large systems keys for SA’s in large systems
S/MIME (Secure/Multipurpose
S/MIME (Secure/Multipurpose
Internet Mail Extensions)
Internet Mail Extensions)
security enhancement to MIME emailsecurity enhancement to MIME email
original Internet RFC822 email was text onlyoriginal Internet RFC822 email was text only MIME provided support for varying content MIME provided support for varying content
types and multi-part messages types and multi-part messages
with encoding of binary data to textual formwith encoding of binary data to textual form S/MIME added security enhancementsS/MIME added security enhancements
have S/MIME support in many mail agentshave S/MIME support in many mail agents
S/MIME Functions
S/MIME Functions
enveloped dataenveloped data
encrypted content and associated keysencrypted content and associated keys
signed datasigned data
encoded message + signed digestencoded message + signed digest
clear-signed dataclear-signed data
cleartext message + encoded signed digestcleartext message + encoded signed digest
signed & enveloped datasigned & enveloped data
S/MIME Cryptographic
S/MIME Cryptographic
Algorithms
Algorithms
digital signatures: DSS & RSAdigital signatures: DSS & RSA
hash functions: SHA-1 & MD5hash functions: SHA-1 & MD5
session key encryption: ElGamal & RSAsession key encryption: ElGamal & RSA
message encryption: AES, 3DES, etcmessage encryption: AES, 3DES, etc MAC: HMAC with SHA-1MAC: HMAC with SHA-1
must map binary values to printable ASCIImust map binary values to printable ASCII
S/MIME Public Key Certificates
S/MIME Public Key Certificates
S/MIME has S/MIME has effective encryption and effective encryption and
signature services signature services
but also need to but also need to manage public-keysmanage public-keys S/MIME uses X.509 v3 certificatesS/MIME uses X.509 v3 certificates
each client has a list of trusted CA’s certseach client has a list of trusted CA’s certs and own public/private key pairs & certsand own public/private key pairs & certs
Summary
Summary
Secure Sockets Layer (SSL) / Transport Secure Sockets Layer (SSL) / Transport
Layer Security (TLS) Layer Security (TLS)
IPv4 and IPv6 SecurityIPv4 and IPv6 Security
S/MIME (Secure/Multipurpose Internet S/MIME (Secure/Multipurpose Internet