End-To-End Web Security-Protocols Overview
End-To-End Web Security-Protocols Overview
End-To-End Web Security-Protocols Overview
Ari Niemi
Department of Computer Science
University of Helsinki, Finland
ari.niemi@helsinki.fi
ABSTRACT
End-to-end web security solutions try to enhance the situation. A number of cryptographic protocols have been
proposed and specified to provide confidentiality, integrity,
authentication and availability on the Internet. They vary
for example in their locations with respect to the TCP/IP
protocol stack. Both lower layer and higher layer implementations have their pros and cons.
1.1
Confidentiality means that information is not made available, disclosed or readable to unauthorized parties. This
information can be for example data which is streaming on
the Internet or data which is stored in a computers memory.
Losses of privacy and information are possible consequences
when an attack against confidentiality is executed. Encryption is one countermeasure against threats of confidentiality.
Keywords
End-to-end web security, protocols, TCP/IP, cryptography,
data link layer, network layer, transport layer, application
layer, PPTP, IPSec, SSL, SET
1.
Security requirements
Integrity can be defined so that data can not be altered undetected. For example, when email is received, the receiver
notices if the email message has been modified after it has
been sent by the original sender. File system modification
is another type of attack against integrity of which a Trojan
horse installation is an example. One can use cryptographic
checksums to provide integrity.
INTRODUCTION
Availability is a property which means that a system is available, accessible and provides resources for authorized users
when they need it. A support web site of a company is an
example of a service which should be available for customers
all the time. Attacks against availability include flooding a
server with multiple continuous service requests and filling
up disk space. Firewalls and intrusion detection systems,
for instance, help to maintain availability. Software updates
play a great role also, because many denial of service attacks
are executed through bugs in program code.
With authentication, the claimed identity of a principal is
being verified. For example, a user of a company extranet
1
Host A
Application
Application
identical
message
Transport
Transport
identical
packet
Network
Network
identical
datagram
Data Link
identical
frame
Data Link
Physical Net
1.2
Host B
2.
The TCP/IP Internet Protocol Suite can be used to communicate across any set of interconnected networks. It is
being used on many corporate intranets as well as on the
Internet. The two main standards of TCP/IP are Transmission Control Protocol (TCP) [24] and Internet Protocol
(IP) [23].
Data link layer transmits IP datagrams over a specific network. Physical layer is the layer below the data link layer. It
consists of network hardware. Examples of protocols specified to operate on the data link layer include Ethernet (IEEE
802.3), Token Ring (IEEE 802.5) and Point-to-Point Protocol (PPP) [30] which is a protocol for dial-up networking.
The data link layer has not been very popular as a base for
implementing security. One reason might be that there are
so many different protocols in use at the data link layer.
Therefore, compatibility between different network protocols at the data link layer would cause problems. Even so,
there are few protocols that operate at this layer. These
include SILS which stands for Standards for Interoperable
LAN/MAN Security (IEEE 802.10) and Point-to-Point Tunneling Protocol (PPTP).
2.1
3.
NETWORK LAYER
There are two parallel connections in PPTP: a control connection and a PPTP tunnel. The control connection is
used to query status and to convey signaling information
between the client and the PPTP server. The PPTP tunnel
is used to exchange the actual data (PPP frames) between
the communicating entities. PPP uses an extended version
of Generic Routing Encapsulation (GRE) [11] to carry user
PPP frames. GRE packet is then encapsulated inside an
IP datagram which is routed through the Internet. Figure
2 shows an example of a GRE/PPTP packet. The PPP
payload part can be encrypted.
3.1
IP Security (IPSec)
IP header
GRE header
PPP header
IP datagram (PPP payload)
IPSec can be used in two modes, namely, transport and tunnel modes. Transport mode provides protection primarily
for upper layer protocols. It is used for end-to-end communication between two hosts. ESP encrypts and optionally
authenticates the IP payload but not the IP header. AH authenticates the IP payload and non-mutable portions of the
IP header. AH and ESP headers are inserted after the original IP header and before the IP payload. The ESP trailer
is inserted after the IP datagram and after that the optional ESP authentication data field can be placed. Tunnel
Data
TCP
4.
orig IP
header
AH
Data
TCP
TRANSPORT LAYER
Transport layer provides communication between application programs. For instance, Transmission Control Protocol
(TCP) [24] and User Datagram Protocol (UDP) [22] are
transport layer protocols. In TCP/IP, TCP provides a reliable end-to-end byte stream.
Authenticated
Encrypted
orig IP
header
ESP
hdr
ESP ESP
trlr auth
Data
TCP
new IP
header
AH
orig IP
header
Data
TCP
4.1
Authenticated
Encrypted
new IP
header
ESP
hdr
orig IP
header
TCP
Data
Secure Socket Layer (SSL) [9], a transport layer security protocol developed by Netscape Communications Corporation,
reached its version 3.0 in 1996. IETFs Transport Layer Security (TLS) [6] is based on SSL 3.0, and although the two
are not interoperable, implementations of TLS 1.0 are likely
to support SSL 3.0.
ESP ESP
trlr auth
Figure 3: AH and ESP datagram formats in transport and tunnel mode in the case of IPv4
An important and fundamental concept in the IPSec architecture is the security association (SA). It is a one-way relationship between a sender and a receiver which contains all
the necessary information for secured communication, such
as negotiated encryption algorithms being used, encryption
keys and their lifetimes, IPSec mode and source and destination addresses. For a two-way relationship, two SAs are
needed. This is also the case when both AH and ESP are
needed for communication. An SA is uniquely identified by
three parameters: SPI (Security Parameters Index), destination IP address and security protocol (AH or ESP). SAs
are kept in an SA database (SAD) and when a datagram is
sent, its destination address is looked for in the SAD. If an
entry is found, norms in that entry (i.e. SA) are followed
to prepare the datagram. On the receiving entity, a security policy database (SPD) is used to decide whether the
datagram is discarded or accepted.
The SSL session and the SSL connection are two important
concepts, which are defined in the SSL specification as follows:
A connection is a transport (in the OSI layering model
definition) that provides a suitable type of service. For
SSL, such connection are peer to peer relationships.
The connections are transient. Every connection is associated with one session.
A SSL session is an association between a client and
a server. Sessions are created by the Handshake Protocol. Sessions define a set of cryptographic security
SSL
Handshake
Protocol
SSL Change
Cipher Spec
Protocol
SSL Alert
Protocol
Application
Protocol
(e.g. HTTP)
CLIENT
SERVER
ClientHello
ServerHello
[Certificate]
[ServerKeyExchange]
[CertificateRequest]
ServerHelloDone
parameters, which can be shared among multiple connections. Sessions are used to avoid the expensive negotiation of new security parameters for each connection.
[Certificate]
ClientKeyExchange
[CertificateVerify]
ChangeCipherSpec
Finished
Data fragmentation, compression, authentication, encryption and preparing a header are functions of the SSL Record
Protocol. The Record Protocol receives data from upper
subprotocols and fragments that data into blocks (records)
of 214 bytes or less. After fragmentation, compression is
applied, but it is not obligatory and, in fact, the default
compression algorithm is null. By the SSL specification,
the compression must be lossless and may not increase the
content length by more than 1024 bytes. Next, a message
authentication code is calculated over compressed data. A
slightly modified version of the HMAC [16] algorithm is used
to provide the MAC for each compressed fragment. After
the creation of the MAC, the compressed fragment and the
MAC are encrypted using symmetric encryption. Available
algorithms include IDEA, 3DES and RC4 with key sizes
varying from 40 bits to 168 bits. With authentication and
encryption, the SSL Record Protocol provides confidentiality and integrity for SSL connections. The final task of the
Record Protocol is to prepare a header for a fragment. The
header includes four fields, which are Content type, Major version, Minor version and Compressed length. Content
type specifies the higher layer protocol that should process
the encrypted fragment. Version fields describe supported
SSL versions. Compressed length field indicates the length
of the compressed fragment in bytes.
ChangeCipherSpec
Finished
Figure 5: The messages in the SSL Handshake Protocol between the client and the server (messages in
square brackets are optional)
In the first step, the client sends a ClientHello message,
which includes clients SSL version number, a client generated random structure, session ID, cipher suite and compression method. Then the client waits for a ServerHello
message, which contains the same fields. If server authentication is required, a Certificate message is sent by the
server after the ServerHello message. The next message,
ServerKeyExchange does not have to be sent by the server
if the server has sent a certificate with fixed Diffie-Hellman
parameters or if RSA key exchange is to be used. Next, a
non-anonymous server can optionally request a certificate
from the client with the CertificateRequest message if it is
appropriate for the selected cipher suite. The final message
of this second step is ServerHelloDone, which is a required
message and indicates the end of this step.
In the beginning of the third step, the client sends a Certificate message to the server if server requested client authentication. Next is the ClientKeyExchange message, which is
a required message. The content of it depends on the type
of key exchange algorithm selected by the server. In the
end of step three, the client may optionally send a CertificateVerify message to provide explicit verification of clients
certificate. The fourth and last step begins with a ChangeCipherSpec message from the client to the server and after
that, the client sends a Finished message. The Finished
message is protected with the just-negotiated algorithms,
keys and secrets. In response to these, the server sends its
5.
Merchant authentication
Interoperability
APPLICATION LAYER
Confidentiality guarantees that cardholder account and payment information is secure as it travels through the network.
Integrity means that transaction data cannot be altered unremarked. Concerning authentication, both the cardholder
and the merchant must be able to verify each other. Interoperability points out that SET must be applicable on
different hardware and software platforms with no preferences on any vendor or etc. However, SET provides only
one choice for each cryptographic algorithm.
5.1
Merchant
Cardholder
Internet
Secure Electronic Transaction (SET) [29] is a security specification for credit card payments on the Internet. It is a
series of security protocols and formats that enables users to
make use of the existing credit card payment infrastructure
on the Internet. It was announced 1996 by Visa International and MasterCard International. Many other companies took also part to the development of the standard (including IBM, Microsoft, Netscape and VeriSign). The SET
specification is divided into three books and it contains 971
pages.
Internet
Certificate
authority
Issuer
Payment
network
Payment
gateway
Acquirer
1. Provide confidentiality of payment information and enable confidentiality of order information that is transmitted along with the payment information.
2. Ensure the integrity of all transmitted data.
3. Provide authentication that a cardholder is a legitimate user of a branded payment card account.
4. Provide authentication that a merchant can accept
branded payment card transactions through its relationship with an acquiring financial institution.
5. Ensure the use of the best security practices and system design techniques to protect all legitimate parties
in an electronic commerce transaction.
6. Create a protocol that neither depends on transport
security mechanisms nor prevents their use.
7. Facilitate and encourage interoperability among software and network providers.
6.
SUMMARY
7.
REFERENCES
[4] M. Crispin. Internet Message Access Protocol version 4rev1, RFC 2060. IETF Internet Working
Group, December 1996.