Secure Communications
Secure Communications
CCT7H4:Network
Security Book - Crypt Decrypt
(Java review)
Hence include an expiry date in the Check this list when you check the certificate
certificate
Check this list before a certificate can be renewed
Typical lifetime of a year for internet by extending its lifetime
applications
Expensive but vital complication, sometimes omitted....
Certificate Management
X.509 Certificate Format
in Java and OpenSSL
Widely supported (Microsoft, Verisign...)! Java provides a command line program: keytool to
generate and manage certificates and private keys
But not very appropriate....
stored in a database known as a keystore
Horrid structure details – eg names
OpenSSL also has command lines for certificates
X.509 names are like: C=US, O=companyname,
Lab session!
OU=researchdept, CN=Alice. Even worse at
detailed formal level ASN.1 and binary BER Only use to generate self signed certificates
Not easy to incorporate email or DNS names in Use of signing for code distribution
this scheme, leading to workarounds that tend
to expose security flaws OS generally have some similar native application
PKI in practice Pretty Good Privacy
Do you check certificates when prompted by
browser? PGP is a different approach to certificate
Browsers don't check expiry very carefully management
(due to many servers using expired Much less bureaucracy, users manage their
certificates following price increases) own certificates and do not rely on a CA
UoW certificates often outdated Certificates/keys just as strong as X.509 but
Internet Explorer library bug (didn't check use a different (incompatible) format
the CA tag) History: Zimmermann 1991 mainly for emails
Verisign mistake Web of Trust
A superset of usual socket API You want to be sure you are dealing with Amazon
(authentication)
Easy to port applications
Your credit card information must be protected in
IPSec transit (confidentiality and/or integrity)
Within the OS Amazon doesn’t care who you are, as long as you
have money (authentication need not be mutual)
All applications protected without modification
SSL Keys
Ciphers
Supported Master secret key is based on the three
random numbers RA, RB, S (sent encrypted)
Use to generate 3 session keys for each side
Encryption key
Integrity key (HMAC key)!
Initialization vector (for block cipher CBC)!
Use separate keys for sending and receiving - total
of 6 keys
Message
Authentication Codes (HMAC)!
Configuration options
Key Exchange
Efficient for authentication on secure channels (used RSA, Ephemeral Diffie Hellman,...
in both IPSec and SSL)
Authentication
Alice and Bob set up shared secret keys for integrity
RSA, DSA
Alice combines message M with the key and works
Symmetric Ciphers
out the digest h (called HMAC or keyed hash)
RC4, triple DES, AES, IDEA....
Alice sends M and h to Bob
Cryptographic Hash Function
Bob does the same to verify
HMAC-SHA, HMAC-MD5
Authentication in Normal Client Authentication
Deployment Generally not authenticated
Only server has a certificate For e-commerce, server can rely on the credit card
Server is authenticated to client Often use some kind of password system - separate
from SSL
PKI:
SSL does support client authentication
Client browser is configured with public keys of
organizations the browser vendor regards as Server sends a “certificate request” in step 2
trustworthy The client needs to have a certificate recognised
Server certificate is usually signed by one of by the server
these, if not, user is presented with a pop-up National grid service set up their own CA and use
this mechanism for authentication
Examine the credentials received to make sure that String[] supported = s.getSupportedCipherSuites();
you are talking to the host you think you are. Use for(String ciphertype : supported)
socket.getSession()and getPeerCertificates() System.out.println(ciphertype);
System.out.println(c);
SecureEchoServer.java and SecureEchoClient.java
IPSec IPSec: Uses
RFC2401 overview (other RFC's on details) 1998
Transparent to transport layer/users, so
At IP layer, especially relevant to Ipv6 politics supports various applications: remote login, e-
So available to TCP, UDP, ICMP etc mail, web access, file transfer etc
Open security architecture with extendable Remote users to safely access a network VPN
encryption and authorization services Two users transferring data
Implemented in security gateways (firewalls) and Interconnecting two networks
individual hosts
Defeats the purpose of having a standard! AH: Authentication Header ! integrity only
Phase 1 ! IKE security association (SA) Public key encryption (original version)
But no obvious need for two phases in IKE For each of these, two different “modes”
Main versus
IKE Phase 1 Summary
Aggressive Modes
Result of IKE phase 1 is
Main mode is usually intended to hide But phase 1 is expensive (in public key and/or
identities main mode cases)
Integrity only (no confidentiality) But routers must look at the IP header - it
exists to route packets!
Integrity-protect everything beyond IP
header and some fields of header AH protects immutable fields in IP header
ESP: Encapsulating Security Payload Cannot integrity protect all header fields
Protects everything beyond IP header ESP does not protect IP header at all
At one IETF meeting “someone from IPSec overly complex with flaws
Microsoft gave an impassioned speech
SSL built into web early on and primary use
about how AH was useless…”
remains secure web transactions
“…everyone in the room looked around
IPSec often used for VPN and required for IPv6
and said `Hmm. He’s right, and we hate AH
also, but if it annoys Microsoft let’s leave Reluctance to either retrofit applications for SSL
it in since we hate Microsoft more than or to consistently use IPSec due to complexity
we hate AH.” and interoperability issues