Chapter 06
Chapter 06
Web Web
Browse Step 1: HTTP Request Server
r
HTTP Request
HTTP Response
Web Web
Browser Step 1: HTTP Request Server
Web Web
Browse Step 1: HTTP Request Server
r
Contains
Step 3: Browser
interprets HTML page
and also executes the
HTML Page Small Program
program
….. …..
….. …..
TCP/IP
• Transmission Control Protocol/Internet
Protocol
5 (Highest) Application
4 Transport
3 Internet
2 Data link
1 (Lowest) Physical
TCP/IP Layers - Pictorially
Application Layer
Transport Layer
Internet Layer
Physical Layer
TCP/IP Concept
• All layers except physical layer
communicate with adjacent layers on the
same computer
Communication link
Application Application
Transport Transport
Network Network Network Network Network
Data Link Data Link Data Link Data Link Data Link
Physical Physical Physical Physical Physical
Data Exchange using TCP/IP
Layers
X Y
Transmission medium
Secure Socket Layer (SSL)
• World’s most widely used security
mechanism on the Internet
• It provides Authentication and
Confidentiality
• Secures communication between a client
and a server
• Located between the Application and
Transport Layers of TCP/IP protocol suite
Secure Socket Layer (SSL)
• SSL was first used by Netscape.
– To ensure security of data sent through HTTP,
LDAP or POP3.
• Uses TCP to provide reliable end-to-end
secure service.
• In general, SSL can be used for secure data
transfer for any network service running
over TCP/IP.
Position of SSL in TCP/IP
Application Layer
SSL Layer
Transport Layer
Internet Layer
Physical Layer
Data Exchange including SSL
X Y
Transmission medium
SSL Sub-Protocols
• Handshake Protocol
• Record Protocol
• Alert Protocol
SSL Handshake Message Format
Client hello Version, Random number, Session id, Cipher suite, Compression
method
Server hello Version, Random number, Session id, Cipher suite, Compression
method
Certificate Chain of X.509V3 certificates
Web
Web
Browser 1. Establish security capabilities Server
4. Finish
SSL Handshake – Phase 1
Web Web
Brows Step 1: Client hello Server
er
Step 1: Certificate
Web Web
Brows Step 2: Server key exchange Server
er
Web Web
Brows 2. Finished Server
er
Step 4: Finished
SSL Record Protocol
Application data
Fragmentation
Compression
Addition of MAC
Encryption
Append header
SSL Record Protocol
E
n
c
r
Plain text (optionally compressed)
y
p
t
e MAC (0, 16, or 20 bytes)
d
SHTTP
• Not as popular as SSL
• Almost obsolete
SHTTP and SSL Positions
Application Layer, SHTTP
SSL Layer
Transport Layer
Internet Layer
Physical Layer
Time Stamping Protocol (TSP)
• Digital version of a notary service
Clien TSA
t
Message
Digest
…
Time Stamping Protocol – Step 3
…
…
…
Secure Electronic Transaction
(SET)
• Used for securing credit card payments on
the Internet
PI H PIMD
H POMD E
+
OI H OIMD
Dual Signature
(DS)
SET Model
Please verify the Please verify the
cardholder’s certificate merchant’s certificate
Certificate
Authority Group
Certificate Certificate
Authority Authority
A B
Purchase Response
Merchant Cardholder
Purchase Request
Authorization Request
Payment
Gateway
Authorization Response
SSL versus SET
Issue SSL SET
Certification Two parties exchange certificates All the involved parties must be
certified by a trusted third party
Risk of merchant fraud Possible, since customer gives Unlikely, since customer gives
financial data to merchant financial data to payment
gateway
Risk of customer fraud Possible, no mechanisms exist if Customer has to digitally sign
a customer refuses to pay later payment instructions
Cus When the customer wants to make purchases using electronic money, he sends the necessary Mer
tom file(s) to the merchant. This data exchange is also encrypted. cha
er nt
Mer The merchant then sends the file(s) to the bank, which verifies them, and credits the Ban
cha merchant’s account with that much of money. k
nt
Electronic Money – Step 1
Bank Custom
er
$100 %^^A
Customer
%^^A $100
$10 Merchant 1
Customer spends
the money once STOP!!!
$10 Merchant 2
Bank
Customer spends
the same money
again
Email concept
• Consists of two main parts
– Header
– Body
• Securing emails
– PEM
– PGP
– S/MIME
Email Header and Body
From: John Smith ([email protected])
To: Cherry ([email protected]) Headers
Subject: Accepting the offer
Date: 4 March 2002
Dear Cherry,
Regards.
John
Simple Mail Transport Protocol
(SMTP)
• Protocol in TCP/IP Application Layer
• Simple to understand
Email Transmission using SMTP
Internet
Pull
Sender Receiver
Sender’s Receiver’s
SMTP server SMTP server
Email Example
S: 220 hotmail.com Simple Mail Transfer Service Ready
C: HELO yahoo.com
S: 250 hotmail.com
C: DATA
S: 354 Start mail input; end with <CR><LF><LF>
C: … actual contents of the message …
C: ……
C: ……
C: <CR><LF><LF>
S: 250 OK
C: QUIT
S: 221 hotmail.com Service closing transmission channel
PEM Security Features
1. Canonical Conversion
2. Digital Signature
3. Encryption
4. Base 64 encoding
Base-64 Encoding Concept
010101 010000 111110 001011 Each 24-bit divided into four 6-bit
blocks
2. Compression
3. Encryption
4. Enveloping
5. Base 64 encoding
Lempel-Ziv Algorithm (Zip)
Multipart Signed A clear signed message consisting of the message and the
digital signature.
Enveloped data Consists of encrypted content of any type, and the encryption key
encrypted with the receiver’s public key.
Signed data Consists of a message digest encrypted with the sender’s private key.
The content and the digital signature are both Base-64 encoded.
Clear-signed data Similar to Signed data. However, only the digital signature is Base-64
encoded.
Signed and Signed-only and Enveloped-only entities can be combined, so that the
Enveloped data Enveloped data can be signed, or the Signed/Clear-signed data can be
enveloped.
Wireless Security
• Wireless communication protocols are
becoming popular
HTTP Web
Request (Origin)
WAP
server
Request
WAP HTTP
Response Response
WAP Gateway
WAP Security
• Wireless Transport Layer Security (WTLS)
Web
(Origin)
server
Wireless Interne
Operator t
Network
WAP WAP
Client WTLS Gateway SSL
Security Security
3-D Secure
Issuer Domain Interoperability Domain
Acquirer Domain
1
Cardholder Merchant
6
Plug in
10
7
9 2
8 Visa/MasterCard Directory 5
3
Access
Control
4
12
Authentication History
Acquirer
Visa /MasterCard Net
Issuer
PGP – Key Ring
Alice’s key ring, where she Alice’s key ring, where she
holds her own public- holds only the public keys of the
private key pairs. other PGP users in the system
PGP Certificates
Digital Certificate
Atul
User: Jui
…
Issued by: Atul
Jui
Digital Certificate
Anita
User: Jui
…
Issued by: Anita
Introducer Trust
Digital Certificate
Digital Certificate
Anita
User: Jui
Trust: Partial
…
Issued by: Anita
Digital Certificate
Atul
User: Jui
Trust: Full
… Jui
Issued by: Atul
Digital Certificate
Anita
User: Jui C1
Trust: Partial
… C2
Issued by: Anita
Result: When Jui sends the two certificates (issued by Atul and Anita to her) to Harsh, Harsh adds them
to his database of certificates. It is actually the ring of public keys of other users, as discussed earlier.
Apart from adding them there, Harsh records the fact that it does not want to trust Jui’s certificate issued
by Atul (since Harsh does not trust Atul), but wants to trust Jui’s certificate issued by Anita (since Harsh
trusts Anita).