Docsity

EE 418 Network Security and Cryptography Lecture Notes, Lecture notes of Cryptography and System Security

Toggle sidebar
bg1
EE 418 Network Security and Cryptography
Lecture #18
December 6, 2016
Public Key Infrastructure. Authentication. Internet Security
Lecture notes prepared by Professor Radha Poovendran.
Tamara Bonaci
Department of Electrical Engineering
University of Washington, Seattle
Outline:
1. Review: Key Distribution and Management
2. Review: Public key infrastructure (PKI)
3. Introduction to Authentication
–Bellovin-Merritt Encrypted Key Exchange (EKE)
–Augmented Strong Password Protocols
–Secure Remote Password (SRP) Protocol
4. Internet Protocol Security (IPsec)
5. Secure Socket Layer (SSL) and Transport Layer Security (TLS)
1 Review: Introduction to Key Distribution and Management
Last week, we started our conversation about key distribution and management. We considered two main
problems that we need to address in order to ensure CIA security goals:
1. If Alice and Bob rely on symmetric-key cryptography, they have to share the same secret encryption-
decryption key. How to they established that shared secret key over an insecure communication channel?
2. On the other hand, if Alice and Bob rely on public key cryptography, then how do they know that the
public key that they obtain somewhere online indeed belongs to the person they are wanting to talk to?
On Tuesday, we focused on the first problem, related to symmetric-key cryptography, and we showed that
there are two possible approaches that Alice and Bob can take:
(a) Alice and Bob can use public key cryptography to establish a shared secret key that they can then use to
communicate securely using symmetric-key cryptography. (Diffie-Hellman protocol)
(b) Alice and Bob can rely a trusted third party, known as a key distribution center (KDC), to help them
establish a shared secret key. (Needham-Schroeder protocol)
2 Needham-Schroeder Protocol
The Needham-Schroeder (N-S) is a protocol that allows Alice and Bob to agree on a shared key using a key
distribution center (KDC). The steps in N-S are illustrated in Figure 1 and described as follows:
1. Before initiating the protocol, Alice is assumed to share a key with the KDC, denoted KA. Similarly,
Bob is assumed to share a key KBwith the KDC. Alice and Bob both have unique identifiers IDAand
IDBthat are known to each other and the KDC.
2. Alice contacts the KDC and requests a shared key to communicate with Bob by generating a random
nonce rAand sending a message IDA||I DB||rA.
3. The KDC generates a shared key KAB and a ticket tB=EKB(KAB||IDB). The KDC sends EKA(rA||I DB||KAB||tB)
to Alice.
4. Alice decrypts the message sent by the KDC and extracts tBand KAB. Alice checks to make sure that
the decrypted rAsent by the KDC matches the rAsent by Alice. Alice then transmits IDA||tBto Bob.
5. Bob decrypts tBusing KBand extracts KAB. Bob generates a random number rBand transmits
EKAB (rB) to Alice.
6. Alice decrypts Bob’s transmitted message using KAB. Alice computes EKAB (rB−1) and transmits this
message to Bob. By decrypting the message using KAB, Bob verifies that Alice knows the key KAB.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download EE 418 Network Security and Cryptography Lecture Notes and more Lecture notes Cryptography and System Security in PDF only on Docsity!

EE 418 Network Security and Cryptography

Lecture

December 6, 2016

Public Key Infrastructure. Authentication. Internet Security Lecture notes prepared by Professor Radha Poovendran. Tamara Bonaci Department of Electrical Engineering University of Washington, Seattle

Outline:

  1. Review: Key Distribution and Management
  2. Review: Public key infrastructure (PKI)
  3. Introduction to Authentication
    • Bellovin-Merritt Encrypted Key Exchange (EKE)
    • Augmented Strong Password Protocols
    • Secure Remote Password (SRP) Protocol
  4. Internet Protocol Security (IPsec)
  5. Secure Socket Layer (SSL) and Transport Layer Security (TLS)

1 Review: Introduction to Key Distribution and Management

Last week, we started our conversation about key distribution and management. We considered two main problems that we need to address in order to ensure CIA security goals:

  1. If Alice and Bob rely on symmetric-key cryptography, they have to share the same secret encryption- decryption key. How to they established that shared secret key over an insecure communication channel?
  2. On the other hand, if Alice and Bob rely on public key cryptography, then how do they know that the public key that they obtain somewhere online indeed belongs to the person they are wanting to talk to? On Tuesday, we focused on the first problem, related to symmetric-key cryptography, and we showed that there are two possible approaches that Alice and Bob can take:

(a) Alice and Bob can use public key cryptography to establish a shared secret key that they can then use to communicate securely using symmetric-key cryptography. (Diffie-Hellman protocol) (b) Alice and Bob can rely a trusted third party, known as a key distribution center (KDC), to help them establish a shared secret key. (Needham-Schroeder protocol)

2 Needham-Schroeder Protocol

The Needham-Schroeder (N-S) is a protocol that allows Alice and Bob to agree on a shared key using a key distribution center (KDC). The steps in N-S are illustrated in Figure 1 and described as follows:

  1. Before initiating the protocol, Alice is assumed to share a key with the KDC, denoted KA. Similarly, Bob is assumed to share a key KB with the KDC. Alice and Bob both have unique identifiers IDA and IDB that are known to each other and the KDC.
  2. Alice contacts the KDC and requests a shared key to communicate with Bob by generating a random nonce rA and sending a message IDA||IDB ||rA.
  3. The KDC generates a shared key KAB and a ticket tB = EKB (KAB ||IDB ). The KDC sends EKA (rA||IDB ||KAB ||tB ) to Alice.
  4. Alice decrypts the message sent by the KDC and extracts tB and KAB. Alice checks to make sure that the decrypted rA sent by the KDC matches the rA sent by Alice. Alice then transmits IDA||tB to Bob.
  5. Bob decrypts tB using KB and extracts KAB. Bob generates a random number rB and transmits EKAB (rB ) to Alice.
  6. Alice decrypts Bob’s transmitted message using KAB. Alice computes EKAB (rB − 1) and transmits this message to Bob. By decrypting the message using KAB , Bob verifies that Alice knows the key KAB.

𝑒𝑒𝐾𝐾𝐴𝐴 (𝑟𝑟𝐴𝐴 𝐼𝐼𝐷𝐷𝐵𝐵 ||𝑡𝑡𝐵𝐵𝐵𝐵𝐵𝐵� 𝑡𝑡𝐵𝐵𝐵𝐵𝐵𝐵

𝐼𝐼𝐷𝐷𝐴𝐴||𝐼𝐼𝐷𝐷𝐵𝐵||𝑟𝑟𝐴𝐴

KDC Alice Bob

Computes

Generates 𝐾𝐾𝐴𝐴𝐵𝐵

Extracts K (^) AB using K (^) A Chooses rB

Chooses rA

Extracts K (^) AB , tBob using K (^) A

𝐾𝐾𝐴𝐴𝐵𝐵

𝑒𝑒𝐾𝐾𝐴𝐴𝐴𝐴 (𝑟𝑟𝐵𝐵 �

𝑒𝑒𝐾𝐾𝐴𝐴𝐴𝐴 (𝑟𝑟𝐵𝐵 − 1 �

𝑡𝑡𝐵𝐵𝐵𝐵𝐵𝐵 = 𝑒𝑒𝐾𝐾𝐴𝐴 (𝐾𝐾𝐴𝐴𝐵𝐵||𝐼𝐼𝐷𝐷𝐴𝐴 �

Fig. 1. Establishing a shared key using a KDC with the Needham-Schroeder protocol.

2.1 Replay Attack on Needham-Schroeder

The N-S protocol was found to be vulnerable to a replay attack by Denning and Sacco in 1987. The steps of the attack are depicted in Figure 2:

  1. An attacker Eve eavesdrops on the N-S protocol and obtains the messages exchanged by Alice, Bob, and the KDC, including the ticket tB.
  2. The attacker obtains a key KAB generated during a previous execution of the N-S protocol.
  3. The attacker contacts Bob, pretending to be Alice, and transmits IDA||tB to Bob.
  4. Bob decrypts tB using KB and extracts the key KAB , which is known to the adversary. Bob generates a random number rB and transmits EKAB (rB ) to Alice.
  5. Since the attacker knows KAB , (s)he decrypts Bob’s transmitted message using KAB. The attacker transmits EKAB (rB − 1) to Bob.

2.2 Kerberos

Kerberos was developed at MIT in the 1980s to enable the use of a KDC without vulnerability to replay attack. Kerberos is described by IETF RFC 4120. The steps in Kerberos are depicted in Figure 3, and given as follows:

  1. Alice generates a random number rA and sends IDA||IDB ||rA to the KDC.
  2. The KDC computes tB = EKB (KAB ||IDA||L), where L is the lifetime of the secret key KAB. The KDC transmits y 1 = EKA (rA||IDB ||KAB ||L) and tB to Alice.
  3. Alice decrypts y 1 and obtains KAB. Alice computes y 2 = EKAB (IDA||time), where time is Alice’s current system time. Alice transmits y 2 ||tB to Bob.
  4. Bob decrypts tB and obtains KAB. If time > L, then the key has expired and Bob discards the key. Bob replies to Alice with EKAB (time + 1).

and vice versa. Otherwise, an attacker Eve could claim to be Alice and publish his/her own public key. Any messages for Alice encrypted by Bob could then be read by the attacker. A standard approach to public key management is the use of Public Key Infrastructure (PKI). A key component of PKI are Certificate Authorities (CAs), which are trusted third-parties used to verify public keys. Alice can verify Bob’s public key with the help of a CA through the following procedure, depicted in Figure 4:

  1. Alice sends a request to Bob for Bob’s public key.
  2. Bob sends a certificate C, which contains Bob’s public key P KB , Bob’s identity, and possibly other information including the expiration time of the key (see Section 3.1). Attached to C is a signature σ = SigP KCA (C), which is signed using the private key of the certificate authority.
  3. Alice verifies the signature σ on certificate C. If the verification is successful, then Alice accepts P KB as Bob’s public key.

Bob, PK (^) Bob

Sig (^) CA (PK (^) Bob )

Certificate Alice Bob Authority

Alice

Bob

PK (^) Bob , Sig (^) CA (PK (^) Bob ) Verifies PK (^) Bob

𝐸𝐸𝑃𝑃𝐾𝐾𝐵𝐵𝐵𝐵𝐵𝐵 (𝑚𝑚 �

Stores Sig (^) CA (PK (^) Bob )

Verifies PKBob belong to Bob

Fig. 4. Verifying Bob’s public key using a certificate authority (CA).

Thus, we can think of PKI as a secure system that generates, manages, and updates certificates in order to realize public key cryptography. Such a system consist of several important components:

  1. Certificate Issuance: Certificates to users are issued by a Certification Authority (CA) (most of the times there are more than one). Certificates are issued after the user has proven its identity by some conventional means (as we have discussed in the past).
  2. Certificate Revocation: Refers to the revocation of a certificate before the normal expiration time. Similar to canceling and reissuing a stolen credit card.
  3. Key backup: The private keys of all certified users are stored for the purpose of recovery in case of loss. Recovery can occur in a similar fashion that one recovers a forgotten password (by proving its identity to the CA).
  4. Timestamping: The times that certificates and keys are issued are recorded. These times can be used by different services for checking the validity of keys, certificates etc.

PKI are used to enable several services involving security, and privacy, and some examples of those services are:

  • Secure email protocols such as Secure Multipurpose Internet Mail Extensions (S-MIME) and Pretty Good Privacy (PGP). Secure web services such as Secure Socket Layer (SSL) and Transport Layer Security (TLS). Secure VPNs employing the IPSec protocol.
  • Access Control: Implementation of privilege management for access to services such as database in- formation, printing, etc.
  • Privacy: Issuance of anonymous or pseudonymous certificates for purpose of access control and preser- vation of anonymity. For example, when one has access to a service if it belongs ot a group, but the unique member is not identified.

3.1 X.509 Certificates

Typically a certificate binds the identity of a user to a public key. X.509 is a standard for public key certificates, and has been adopted by the International Telecommunication Standardization Sector (ITU-T). An illustration of an X.509 certificate is given as Figure 5. An X.509 certificate consists of the following components:

  • Version - The version of X.509 that is used.
  • Serial number - An integer that, together with the CA’s name, uniquely identifies the certificate.
  • Signature - The algorithm used to compute the signature on the certificate.
  • Issuer - The name of the issuing CA.
  • Validity - Contains two fields: the time that the certificate becomes valid, and the last time for which it is valid.
  • Subject - The name of the entity whose key is certified.
  • SubjectPublicKeyInfo - The subject’s public key, along with the algorithm for which the subject’s public key is generated (e.g., RSA or DSA).
  • AlgorithmIdentifier - The algorithm used to compute the signature on the certificate. Contains the same information as the Signature field described above.
  • Encrypted - Contains the signature on all of the above fields except AlgorithmIdentifier.

3.2 Certificate Authorities

There are many CAs operating in different countries and under different ownership. Examples include Syman- tec and GoDaddy, along with smaller CAs run by enterprises and individuals. The PKI must have a mech- anism for relating the certificate authorities and determining whether a certificate can be trusted based on the CA that has signed it. A simple PKI organization is shown in Figure 6. In this PKI, a root CA issues certificates for Regional Authorities, which in turn sign the certificates of smaller CAs. The trustworthiness of each signature is derived from the common trust in the root CA.

4 Introduction to Authentication

Authentication occurs when Alice and Bob try to verify each other’s identities. Typically, Alice au- thenticates herself to Bob by proving that she has knowledge of a shared secret, such as a cryptographic key KAB. One method for Alice and Bob to verify each other’s identities is through a challenge-response protocol, as depicted in Figure 7. A basic challenge-response protocol has the following steps:

  1. Alice sends her identity to Bob. Bob responds by sending a random nonce (a random number that is only used once), denoted RB , to Alice.
  2. Alice responds to Bob’s challenge with EKAB (RB ). Alice then transmits a nonce RA.
  3. Bob verifies that the received message Y = EKAB (RB ). If it does, then Bob responds to Alice’s challenge with EKAB (RA).
  4. If the value of EKAB (RA) is correct, Alice authenticates Bob.

Root

RA 1 RA 2

CA 1 CA 2 CA 3 CA 4

RA 2 is approved. Its public key is 47383AE349… Root’s signature

CA 4 is approved. Its public key is 542EA34149… RA 2’s signature

Fig. 6. A hierarchial PKI.

Alice Bob

I am Alice I am Bob, RB

RA

Knows KAB Knows KAB

𝐸𝐸𝐾𝐾𝐴𝐴𝐴𝐴 (𝑅𝑅𝐵𝐵 �

𝐸𝐸𝐾𝐾𝐴𝐴𝐴𝐴 (𝑅𝑅𝐴𝐴 �

Fig. 7. Basic mutual authentication protocol.

  1. Bob transmits EW (gb^ mod p, C 1 ) to Alice.
  2. Alice decrypts Bob’s message and obtains gb^ mod p and C 1. Alice computes K = gab^ mod p and generates a nonce C 2
  3. Alice transmits EK (C 1 , C 2 ) to Bob.
  4. Bob decrypts Alice’s message and verifies that the first half of the message is C 1. Bob computes EK (C 2 ) and transmits to Alice.

4.2 Security Properties of EKE

The Bellovin-Merritt protocol provides the following security properties:

  • Authentication of Alice: Only a user with knowledge of W could correctly decrypt Bob’s first message, obtain gb^ mod p, and compute K. Bob authenticates Alice by checking that Alice encrypted his challenge C 1 using the correct key K.
  • Authentication of Bob: Similarly, only a valid Bob could correctly compute K and EK (C 2 ).
  • Security against Dictionary Attack: The only messages encrypted with W are ga^ mod p and gb^ mod p. In order for an adversary to check a possible password pwd′, the adversary would need to decrypt both messages using key W ′^ = f (pwd′). After decrypting, however, the adversary cannot compute the key K due to the difficulty of the Diffie-Hellman problem, and hence has no way to determine if the possible password is correct.

4.3 Augmented Strong Password Protocols

The EKE protocol prevents an adversary from impersonating Alice or Bob without knowledge of W = f (pwd). The goal of augmented EKE is to ensure that a server Bob does not need to store the client Alice’s

pwd or W. That way, even if the server is compromised, an attacker cannot impersonate Alice. Instead, Bob stores a prime p and 2W^ mod p. The augmented strong password protocol is shown in Figure 8, and consists of the following steps:

Alice Bob Choose a, compute W and p from password

Stores “Alice”, p, 2W^ mod p

2 b^ mod p, h(2 ab^ mod p, 2 bW^ mod p)

2 a^ mod p Chooses b

h’(2ab^ mod p, 2bW^ mod p)

Fig. 8. Augmented strong password protocol.

  1. Alice generates a uniformly at random and transmits 2a^ mod p to Bob.
  2. Bob generates b uniformly at random, and transmits 2b^ mod p and h((2ab^ mod p)||(2bW^ mod p)), where h is a hash function.
  3. Alice computes 2ab^ mod p and h((2ab^ mod p)||(2bW^ mod p)). If the hash value matches the value trans- mitted by Bob, then Alice authenticates Bob and transmits h′((2ab^ mod p)||(2bW^ mod p)). Here h′^ is a hash function that is different from h.

4.4 Security Properties of Augmented Strong Password Protocol

The augmented strong password protocol provides the following security properties:

  • Authentication of Alice: Alice must know the correct value of W to compute 2bW^ mod p in the third message.
  • Authentication of Bob: Bob must know 2W^ mod p and b in order to compute 2bW^ mod p.
  • Security against Dictionary Attack: Whenever the key W appears in any message, the message is hashed. Hence an attacker cannot determine W without inverting the hash function.
  • Security against Server Compromise: If an attacker compromises the server and obtains 2W^ mod p, then the attacker must still solve an instance of the Discrete Logarithm Problem to find W , or mount a dictionary attack.

4.5 Secure Remote Password (SRP) Protocol

SRP was proposed by Tom Wu in 1998, and is documented in RFC 2945. It appears in IETF protocols including Telnet (RFC 2944) and TLS (RFC 5054) authentication, and is implemented in OpenSSL. In SRP, Bob stores gW^ mod p for some large prime p. SRP consists of the following steps:

  1. Alice generates a random a, and then transmits her identity and ga^ mod p to Bob.
  2. Bob generates b, a challenge C 1 , and a 32-bit number u. Bob transmits (gb^ + gW^ ) mod p, u, and C 1 to Alice.
  3. Bob computes K = (ga)b(gW^ )bu^ = gb(a+uW^ )^ mod p.
  4. Alice receives Bob’s message and extracts gb^ mod p by subtracting gW^ mod p from the first part of the message. Alice computes K = (gb)a(gb)uW^ = gb(a+uW^ )^ mod p. Alice transmits EK (C 1 ) and C 2 to Bob.
  5. Bob authenticates Alice based on her challenge and transmits EK (C 2 ) to Alice.

A B C D E F

A B^ Tunnel E F

Logical View

Physical View

Flow: X Source: A Dest: F

Data

Flow: X Source: A Dest: F

Data

Source: B Dest: E Flow: X Source: A Dest: F

Data

Source: B Dest: E Flow: X Source: A Dest: F

Data

Encrypted Encrypted

Fig. 10. Use of IPsec tunnel to create a virtual private connection. Nodes B and E act as proxies (tunnel endpoints) for nodes A and F.

IKE using public signature keys: The IKE protocol when Alice and Bob use digital signatures is described as follows (Figure 11). The protocol assumes that Alice and Bob know each other’s signature keys P KA and P KB , respectively.

Crypto Proposal Crypto Proposal Accepted

ga^ mod p, RA

g b^ mod p, RB

Alice Bob

Compute K = f(gab^ mod p, RA , RB)

Compute K = f(gab^ mod p, RA , RB) EK(“Alice”, proof I am Alice, [certificate])

EK(“Bob”, proof I am Bob, [certificate])

Fig. 11. IKE using public signature keys, main mode.

  1. Alice sends Bob a list of proposed cryptographic primitives, including primitives for encryption, hash, authentication, and Diffie-Hellman group. The Diffie-Hellman group consists of a prime p and a generator g.
  2. Bob replies to Alice with a message accepting the cryptographic primitives.
  3. Alice generates a random number a and a nonce RA, and transmits ga^ mod p and RA to Bob.
  4. Bob generates a random number b and a nonce RB , and transmits gb^ mod p and RB to Alice.
  5. Alice and Bob both compute K = f (gab^ mod p, RA, RB ), where f is a publicly known function.
  1. Alice encrypts her identity, a proof of her identity, and her certificate with the key K and transmits the ciphertext to Bob. Alice computes the proof of identity by hashing her identity and the nonces, and then signing the hash with her private key.
  2. Bob decrypts the received message and authenticates Alice using the public key P KA. Bob encrypts his identity, proof of identity, and certificate, and transmits the ciphertext to Alice.

IKE using shared key: The IKE protocol when Alice and Bob use a shared secret J in aggressive mode is described as follows (Figure 12).

Alice Bob Knows shared secret J Knows shared secret J CP, ga^ mod p, RA , “Alice”

CPA, g b^ mod p, RB, proof I am Bob, “Bob”

Proof I am Alice

Fig. 12. IKE using shared secret keys, aggressive mode.

  1. Alice sends Bob a list of proposed cryptographic primitives, including primitives for encryption, hash, authentication, and Diffie-Hellman group. The Diffie-Hellman group consists of a prime p and a generator g. Alice also sends ga^ mod p, where a is a random number, a random nonce RA, and her identifier.
  2. Bob responds with a message accepting the cryptographic primitives. Bob also sends gb^ mod p, where b is a random number, a random nonce RB , a proof of Bob’s identity, and Bob’s identifier. The proof of identity contains the same information as in the previous protocol, but is encrypted using the shared secret J.
  3. Alice authenticates Bob and transmits her proof of identity.
  4. Alice and Bob compute the shared key as K = f (J, gab^ mod p, RA, RB ), where f is a publicly known function.

5.2 Communication Using IPsec

After Alice and Bob have agreed on a shared session key with the IKE protocol, they can use IPsec to provide encryption and message authentication. These cryptographic protections can be provided either through the Authentication Header (AH, described in IETF RFC 2402) or the Encapsulating Security Payload (ESP, described in IETF RFC 2406). AH provides only message authentication, while ESP provides both encryption and message authentication. We first describe the changes made to the IP headers by IPsec, followed by AH and ESP.

IP headers in IPsec: The two widely-used versions of IP are IPv4 and IPv6. IPv4 (RFC 791) was introduced in 1981 and is used to route most Internet traffic. IPv6 (RFC 2460) was released in 1998 as a replacement for IPv4. The main difference between the protocols is that IPv4 uses 32-bit addresses, creating the possible problem of exhausting the space of possible addresses, while IPv6 uses 128-bit addresses. The IPv4 header is shown in Figure 13(a). To use IPsec with IPv4, the Protocol field is set to 50 (for ESP) or 51 (for AH). The IPv6 header is shown in Figure 13(b). To use IPsec with IPv6, the next header field is set to 50 (for ESP) or 51 (for AH).

Security Parameter Index (32 bits) Sequence Number (32 bits)

Authentication Data (Variable)

IV (Initialization vector) (Variable)

Data (Variable)

Padding (Variable) Padding length (8 bits)

Next header/protocol type (8 bits)

Fig. 15. The Encapsulating Security Payload (ESP).

  • Next Header: Same as the AH.
  • Authentication Data: Same as the AH.

The Data, Padding, Padding Length, and Next Header fields are encrypted.

6 Secure Socket Layer (SSL) and Transport Layer Security (TLS)

The Secure Socket Layer (SSL) and Transport Layer Security (TLS) are protocols for server authentication, session key establishment, and formation of a secure end-to-end connection between Alice and Bob. They are implemented by web browsers including Internet Explorer, Firefox, Chrome, Safari, and Opera. SSL/TLS is described by RFC 5246. Both protocols begin with handshakes, which establish a session key and agree on cryptographic primitives to be used. The basic SSL/TLS handshake protocol has the following steps, which are illustrated in Figure 16:

  1. Alice sends a connection request, a nonce RA, and a list of supported cryptographic primitives to Bob.
  2. Bob chooses one of the supported primitives and transmits the chosen primitive, a random nonce RB , and his certificate to Alice.
  3. Alice verifies the certificate and chooses a secret S and computes a key K = f (S, RA, RB ), where f is a publicly known function. Alice transmits EP KB (S) to Bob, where P KB is Bob’s public key. Alice also transmits a keyed hash (using the key K) of the previous two messages.
  4. Bob decrypts EP KB (S) and computes K = f (S, RA, RB ). Bob transmits a keyed hash of the first two messages and a known constant (the known constant is added to ensure that the keyed hashes sent by Alice and Bob do not have the same value).

The key generation function f may return two keys, Kenc and Kauth, that can be used for encryption and authentication, respectively.

6.1 Security Properties of SSL/TLS Handshake

The SSL/TLS handshake provides the following security properties:

Certificate, cipher I choose, RB

Ciphers I support, RA

Chooses secret S, Compute K = f(S, RA , RB) 𝐸𝐸𝑃𝑃𝐾𝐾𝐵𝐵 (𝑆𝑆), ℎ𝐾𝐾(𝑚𝑚 1 , 𝑚𝑚 2 �

Alice (^) Bob

ℎ𝐾𝐾(𝑚𝑚 1 , 𝑚𝑚 2 , 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐)

Compute K = f(S, RA , RB)

Fig. 16. The SSL/TLS protocol.

  • Session Key Establishment: The key K that is generated by Alice is used as a session key. Since the secret S used to generate K is encrypted using Bob’s public key, a third party Eve cannot determine K.
  • Authentication of the Server Bob: The fourth message of the protocol authenticates Bob, since only a user with Bob’s private key could obtain the key for the keyed hash.

Authentication of Alice is not provided by the basic SSL/TLS protocol. One approach to authenticating Alice is for Alice to encrypt her login and password using the key K and transmit them to Bob. Since a new session key is generated at each execution of SSL/TLS and the session key is unknown to the adversary, this approach enables Bob to authenticate Alice while protecting the password from eavesdroppers.

6.2 The Record Protocol

SSL/TLS performs encrypted and authenticated data transfer using the SSL Record Protocol. An SSL record is shown in Figure 17. Bob sends data to Alice using the record protocol as follows:

Data

Data Fragment 1 MAC 1 Data Fragment 2 MAC 2

RecordHeader E (^) K(Data Fragment 1, MAC 1) RecordHeader E (^) K(Data Fragment 2, MAC 2)

Fig. 17. The SSL record protocol.

  1. Bob breaks the data stream x to be transmitted into fragments x 1 ,... , xn. While SSL has a maximum fragment size, the actual fragment size can be determined by Bob.
  2. Bob computes a MAC on each fragment. The MAC is computed using HMAC as: M ACi = HM AC(Kauth, (seq||type||version||length||xi)),

where Kauth is a key for message authentication, seq is a sequence number, type is explained below, version is the version of SSL/TLS, and length is the length of the data fragment.