4Ba2 WWW Security Project

Secure HTTP & Secure Socket Layer

This section discusses two of the current mechanisms which are used to provide a secure channel for communication between a client and a server. These mechanisms may provide some or all of: signing , authentication or encryption for requests and responses between the parties involved. These protocols overcome the limitations in the original HTTP specification but it should be noted that they are not implemented in all browsers or in all servers. There is usually are large premium to pay when purchasing a server which supports secure transactions and because there is no standard clients must support all of the popular protocols.

Secure HTTP

Secure HTTP (S-HTTP) is a protocol proposed by CommerceNet which is a group of businesses who are interested in using the Internet for business purposes and so require secure transactions. The encryption mechanisms used for the transport of messages is described elsewhere in the project.

S-HTTP only works with the HTTP protocol but provides support for many different encrypted message formats. Negotiation between the client and the server takes place until an encrypted format for the message is agreed upon. It should be noted that when we say 'message' we mean any communication between the client and the server.The protocol supports the following features:

Signing of messages
If signing of messages is required the signature may be sent with the message or the other party may be required to obtain and verify the signature itself.

Encryption of messages
Messages may be encrypted using either the receiver's public key and decrypted on the other end with the receiver's private key or we may use a pre-arranged session key which is sent with the message.

Authentication of messages
A message can be authenticated by the receiver because a Message Authentication Code (MAC) is computed and sent with the message. This MAC is a keyed hash which is computed over the document using a shared key.

As mentioned above this protocol is not a standard and is not implemented by all browsers or clients, SHTTP is implemented for the Open Marketplace Server marketed by Open Market, Inc on the server side, and Secure HTTP Mosaic by Enterprise Integration Technologies on the client side. The protocol does allow a certain amount of flexibility between the client and the server using its negotiation mechanism but a drawback of the protocol is that it only applies to messages sent and received using the HTTP protocol.


Secure Sockets Layer

The Secure Sockets Layer (SSL) is a protocol proposed by Netscape Communications. It is a protocol which is used above the transport layer between a client and server so it can be used to support other application protocols (eg: HTTP, FTP, NNTP).

This is a brief outline of the negotiation between the client and the server:

     Client                                          Server
     ClientHello             -------->
            
                                                     ServerHello
                                                     Certificate*
                                                     ServerKeyExchange*
                                                     CertificateRequest*
                             <--------               ServerHelloDone
     Certificate*
     ClientKeyExchange
     CertificateVerify*
     ChangeCipherSpec
     [Begin new CipherSpec]
     Finished                -------->
                                                     ChangeCipherSpec
                                                     [Begin new CipherSpec]
                             <--------               Finished
     Application Data        <------->               Application Data

SSL also provides a negotiation mechansim between the parties as described above in SHTTP, we should note though that these negotiation steps may fail if either party cannot agree on a particular encryption method to use. All negotiation occurs before any application data is sent. The capabilities of the client and the server

Signing of messages
One way hash functions are used to sign messages, we may use RSA or DSS signing each provide a signature for the message based on the content.

Encryption of messages
Information may be block encrypted or stream encrypted. Stream encrypted data is generated by XORing the stream with a stream from a random number generator. Block encryption uses any of the block encryption mechanisms.

Authentication of messages
As with SHTTP, a MAC is generated for the message and sent with it to ensure that the message is authentic.

SSL is currently implemented commercially on several different browsers, including Netscape Navigator, Secure Mosaic, and Microsoft Internet Explorer, and many different servers, including ones from Netscape, Microsoft, IBM, Quarterdeck, OpenMarket and O'Reilly and Associates. Again the protocol is quite flexible due to the negotiation mechanism but a session may not be able to complete unless both ends provide support for certain common encryption schemes.

Attacks on the SSL

SSL uses public key encryption to exchange a session key between the client and the server, this session key is used to encrypt meesages for the remainder of the transaction. This session key is different for each session so if a session is discovered it only means that the transaction using this key can be decrypted. Due to export restrictions any browsers outside the US and Canada must use 40 bit session key, whereas the US and Canada use 128 bit session key. Obviously the longer the key the more difficult it is to guess the key. A 40 bit key was cracked using brute force in 1995 and more details of the crack and how it was done are here . There is a proposed change in US law which should allow encryption software using 56 bit encryption to be used but it has not been finalised yet.

References on security for this section