TLS Protocol Enablement for Key Recovery

TLS Protocol Enablement for Key Recovery

COSEv19no1.qxd 11/04/00 18:41 Page 100 Computers & Security, 19 (2000) 100-104 SSL/TLS Protocol Enablement for Key Recovery Timothy G. Shoriak (I...

29KB Sizes 0 Downloads 78 Views

COSEv19no1.qxd

11/04/00

18:41

Page 100

Computers & Security, 19 (2000) 100-104

SSL/TLS Protocol Enablement for Key Recovery Timothy G. Shoriak (IBM)

This document describes an approach for modifying the SSL/TLS (TLS) protocol to allow transmission of Key Recovery Block (KRBs) before communication takes place between clients and servers using strong encryption techniques. From a TLS perspective “strong encryption” implies use of a session key with the secret portion being larger than 40 bits.

1. Introduction There are two scenarios that must be considered before transmitting a KRB.The first is when both the lient and server are capable of sending and/or receiving a KRB. This draft proposes the addition of new TLS cipher specs to allow this to happen.The second scenario will allow a combination of a Key Recovery (KR) enabled peer and a non-KR enabled peer.This solution will allow the TLS handshake to complete while ensuring that a KRB is sent when the strong encryption is used. It is assumed that the reader of this document is familiar with how the TLS protocol functions. See the References section for a pointer to the TLS protocol.

2. Requirements, Goals and Issues This section describes the goals of allowing KRB transmission in the TLS Protocol.

100

2.1 Requirements and Goals Allow encrypted data to be transmitted between a client and a server while allowing authorized entities access to session cryptographic keys required to decrypt data. In addition to the intended receiver, there are two main groups that require the ability to decrypt data that is not targeted at them. The two groups are Law Enforcement Agencies and appropriate organizations. The primary goal is to easily allow an authorized entity the ability to decrypt data without unintentional disclosure of the decrypted data to other parties. The authorization should also prevent any non-authorized entities from compromising security.

2.2 Issues Make the modifications to the TLS Protocol as simple as possible in order to allow interoperability between KR enabled peers while not mandating compliance of existing clients/servers already using TLS.

3. KR With Clients/Servers That Are Not KR Enabled This section will outline the two KRB transmission methods.

0167-4048/00$20.00 © 2000 Elsevier Science Ltd. All rights reserved.

COSEv19no1.qxd

11/04/00

18:41

Page 101

Computers & Security, Vol. 19, No. 1

3.1 TLS handshake overview The TLS handshake is how cryptographic attributes are negotiated for a TLS session and connections for a TLS session. There are a series of TLS handshake messages that are exchanged during this handshake.A brief explanation of the messages pertinent to KR follows: 1. Client Hello — this is the message which initiates a TLS handshake for a connection. It contains a list of cipher specs that the client can support.A cipher spec defines the encryption algorithm with the session key size and Message Authentication Code (MAC) algorithm. Also contained in the client hello is a session identifier. This is used when attempting to reuse cryptographic attributes negotiated during a previous connection. If a new session is desired the session identifier would not be sent in this message. 2. Server Hello — the server compares the list of cipher specs sent by the client with the list that the server supports and chooses a single cipher spec to be used for the connection. The server tells the client by placing selected cipher in the Server Hello message. If the server ‘remembered’ the session identifier contained in the Client Hello the server would return it back to the client in the Server Hello message. 3. Certificate Request — optionally sent by the server to request that a client send a certificate to be used for client authentication by the server. 4. Certificate — contains the certificate used for peer authentication.This is optionally sent by the client when a server requests it for client authentication. For the server a Certificate handshake message is always sent when a new TLS session is being created. 5. Client Key Exchange — sent by the client when creating a new TLS session. The content of this message is the pre-master secret encrypted with the public key from the server’s certificate. This message is not sent when a TLS session is being resumed. 6. Server Key Exchange — used for sending a temporary public key to the client to be used to

encrypt the premaster secret. This is used when the server’s public keysize exceeds 512 bit and an export cipher spec is negotiated for the TLS connection. 7. Certificate Verify — used during the verification process of the client’s certificate.This is optionally sent when client authentication is requested by the server. 8. Client/Server Finished — this is the first message that uses the newly negotiated cipher specification. It is the last handshake message sent by both the client and the server. It contains an encrypted hash of all of the handshake messages. The purpose of this message is not only to test the selected cipher spec but to also guarantee that none of the handshake messages have been tampered with. Both the client and server create the hash of the handshake messages and compare to the peer hash of the handshake messages.

3.2 Scenario 1: Sending the KRB Within the TLS Handshake This method of sending KR data to a client requires modification to the TLS handshake message flow. This document covers modification to TLS using both RSA and Diffie-Hellman (DH) key exchange methods. Currently there are 9 RSA and 17 DH cipher specs. Of these only 9 can be exported outside of the United States due to export laws. It may also be desirable for weaker cipher specs to make use of KR.These new cipher specs are defined by a new family of cipher specs similar to the existing RSA and DH with the addition of KR data. If the client and server negotiated one of the KR cipher specs a KRB would be sent within the TLS handshake. The KRB would be sent via a new TLS record with a content type for KR data. The new record type would have the value of 0xE9. The KRB record would be sent before the server/client would send the Finished message. A KRB record would contain the bulk read/write keys and the TLS session identifier.

101

COSEv19no1.qxd

11/04/00

18:41

Page 102

SSL/TLS Protocol Enablement for Key Recovery/T. Shoriak

3.2.1 Existing TLS RSA Cipher Specs TLS_RSA_WITH_NULL_MD5 = {0x00,0x01} TLS_RSA_WITH_NULL_SHA = {0x00,0x02} TLS_RSA_EXPORT_WITH_RC4_40_MD5 = {0x00,0x03} TLS_RSA_WITH_RC4_128_MD5 = {0x00,0x04} TLS_RSA_WITH_RC4_128_SHA = {0x00,0x05} TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 = {0x00,0x06} TLS_RSA_WITH_IDEA_CBC_SHA = {0x00,0x07} TLS_RSA_EXPORT_WITH_DES40_CBC_40_SHA = {0x00,0x08} TLS_RSA_WITH_DES_CBC_SHA = {0x00,0x09} TLS_RSA_WITH_3DES_EDE_CBC_SHA = {0x00,0x0A} 3.2.2 New TLS RSA Cipher Specs for KR TLS_RSA_WITH_NULL_MD5_KR = {0xE9,0x01} TLS_RSA_WITH_NULL_SHA_KR = {0xE9,0x02} TLS_RSA_EXPORT_WITH_RC4_40_MD5_KR = {0xE9,0x03} TLS_RSA_WITH_RC4_128_MD5_KR = {0xE9,0x04} TLS_RSA_WITH_RC4_128_SHA_KR = {0xE9,0x05} TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5_KR = {0xE9,0x06} TLS_RSA_WITH_IDEA_CBC_SHA_KR = {0xE9,0x07} TLS_RSA_EXPORT_WITH_DES40_CBC_40_SHA_KR = {0xE9,0x08} TLS_RSA_WITH_DES_CBC_SHA_KR = {0xE9,0x09} TLS_RSA_WITH_3DES_EDE_CBC_SHA_KR = {0xE9,0x0A} 3.2.3 Existing TLS DH Cipher Specs TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA = {0x00,0x0B} TLS_DH_DSS_WITH_DES_CBC_SHA = {0x00,0x0C} TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA = {0x00,0x0D} TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA = {0x00,0x0E} TLS_DH_RSA_WITH_DES_CBC_SHA = {0x00,0x0F} TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA = {0x00,0x10} TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA = {0x00,0x11} TLS_DHE_DSS_WITH_DES_CBC_SHA = {0x00,0x12} TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA = {0x00,0x13} TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA = {0x00,0x14} TLS_DHE_RSA_WITH_DES_CBC_SHA = {0x00,0x15} TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA = {0x00,0x16} TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 = {0x00,0x17} TLS_DH_anon_WITH_RC4_128_MD5 = {0x00,0x18} TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA = {0x00,0x19} TLS_DH_anon_WITH_DES_CBC_SHA = {0x00,0x1A} TLS_DH_anon_WITH_3DES_EDE_CBC_SHA = {0x00,0x1B}

102

COSEv19no1.qxd

11/04/00

18:41

Page 103

Computers & Security, Vol. 19, No. 1

3.2.4 New TLS DH Cipher Specs for KR TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA_KR = {0xE9,0x0B} TLS_DH_DSS_WITH_DES_CBC_SHA_KR = {0x E9,0x0C} TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA_KR = {0x E9,0x0D} TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA_KR = {0x E9,0x0E} TLS_DH_RSA_WITH_DES_CBC_SHA_KR = {0x E9,0x0F} TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA_KR = {0x E9,0x10} TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA_KR = {0x E9,0x11} TLS_DHE_DSS_WITH_DES_CBC_SHA_KR = {0x E9,0x12} TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA_KR = {0x E9,0x13} TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA_KR = {0x E9,0x14} TLS_DHE_RSA_WITH_DES_CBC_SHA_KR = {0x E9,0x15} TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA_KR = {0x E9,0x16 TLS_DH_anon_EXPORT_WITH_RC4_40_MD5_KR = {0xE9,0x17} TLS_DH_anon_WITH_RC4_128_MD5_KR = {0x E9,0x18} TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA_KR = {0x E9,0x19} TLS_DH_anon_WITH_DES_CBC_SHA_KR = {0x E9,0x1A} TLS_DH_anon_WITH_3DES_EDE_CBC_SHA_KR = {0x E9,0x1B}

3.2.5 TLS Record Type Definitions struct { unit16 KR_data_length; TLS_KRB KR_data<1..65536>; } TLS_KR_data enum { change_cipher_spec(20), alert(21), handshake(22), application data(23), key_recovery_data(233 /*0x’E9’*/) } ContentType struct{ uint8 major, minor; /* 0x31 for TLS */ } ProtocolVersion struct { ContentType type; ProtocolVersion version; uint16 length; opaque fragment[SSLPlaintext.length]; }SSLPlaintext;

3.3 Sending the KRB Out of Band After the TLS handshake has progressed to the point when the bulk encryption keys have been created, KRBs should be generated and sent to the peer connection. The KRB record would be sent before the Finished message is sent. Many implementations of SSL have not been able to accept unknown SSL handshake messages. An alternate channel will be used to send KRBs when the handshake results in a non-KR cipher spec being negotiated. The alternate channel is a UDP socket to port 9 (Discard server). If there is an error in transmitting KRB data to the peer the TLS handshake should send a warning TLS alert from the originating client/server to the peer which could not successfully receive the KRB. An alternate channel outside of the TLS handshake was chosen due to previous experience from existing SSL V3 implementations. Many implementations could not handle unknown messages during a handshake often resulting in terminal errors of the peer receiving the foreign data. It is thought that many TLS implementations will originate from modified SSLV3

103

COSEv19no1.qxd

11/04/00

18:41

Page 104

SSL/TLS Protocol Enablement for Key Recovery/T. Shoriak

implementations still raising the question of how unknown data will be handled. Sending data on an alternate channel should prevent errors of this type.

3.4 Which Method to Use This table indicates which method TLS should use to send KRA data to peer connections: Client KR enabled yes no yes no

104

Server KR enabled yes yes no no

KRB transmission type Intra-protocol out of band out of band none

4.0 References TLS Protocol - draft-ietf-tls-protocol-01.txt SSL Protocol - Netscape Corporation IBM Keyworks - http://www.ibm.com/security