• No se han encontrado resultados

Guión para la Función de Títeres “Arco iris mortal”

In document Aprendiendo con Nuestra Gente. (página 66-70)

The TLS 1.3 full (EC)DHE handshake protocol can be conceptually subdivided into three phases:

Key exchange. In the key exchange phase, parties negotiate the ciphersuites and key-exchange

parameters to be used and establish shared key material as well as traffic keys to encrypt the remaining handshake.

Server parameters. In the server parameters phase, further handshake parameters (as, e.g.,

whether client authentication is demanded) are fixed by the server.

Authentication. In the authentication phase, both the server and client can (based on the

aspired authentication) authenticate, verify that they share the same view of the handshake, and derive (authenticated) application traffic keys as well as resumption and exporter keys.

Figure 6.1 shows the message flow and relevant cryptographic computations as well as the key schedule for the full (EC)DHE handshake in draft-10. The handshake messages are the following:

• ClientHello (CH)/ServerHello (SH) contain the supported versions and ciphersuites for negotiation purposes, as well as random nonces rc resp. rs. Both CH and SH can also 20

In our original analysis of draft-10 we debated an additional NewSessionTicket used for session resumption and sent encrypted under tkapp after the full handshake impaired the compositional guarantees for that key. In the light of follow-up revisions of TLS 1.3, we here consider NewSessionTicket as one of several so-called “post-handshake messages” (cf. Section 6.2) which can be sent at an arbitrary later point in time after the full

6.2. The TLS 1.3 draft-10 Full (EC)DHE Handshake Protocol Client Server ClientHello: rc− {0, 1}$ 256 + ClientKeyShare: X ← gx ServerHello: rs− {0, 1}$ 256 + ServerKeyShare: Y ← gy H1← H(CHkSH) (incl. CKS & SKS) ES ← Yx ES ← Xy

xES ← HKDF.Extract(0, ES)

tkhs← HKDF.Expand(xES, label1kH1) stage 1

{EncryptedExtensions} {ServerConfiguration∗} {ServerCertificate∗}: pk S {CertificateRequest∗} H2← H(CHk . . . kCR∗) {ServerCertificateVerify∗}: SCV ← Sign(skS, H2) SS ← Yx SS ← Xy xSS ← HKDF.Extract(0, SS) H3← H(CHk . . . kSCV∗) FS ← HKDF.Expand(xSS, label2kH3) {ServerFinished}: SF ← HMAC(FS, label3kH3) check Verify(pkS, H2, SCV) = 1

check SF = HMAC(FS, label3kH3)

{ClientCertificate∗}: pk C H4← H(CHk . . . kCCRT∗) {ClientCertificateVerify∗}: CCV ← Sign(skC, H4) Hsess← H(CHk . . . kCCV∗) {ClientFinished}:

CF ← HMAC(FS, label4kHsess)

check Verify(pkC, H4, CCV) = 1

check CF = HMAC(FS, label4kHsess)

mES ← HKDF.Expand(xES, label5kH3)

mSS ← HKDF.Expand(xSS, label6kH3)

MS ← HKDF.Extract(mSS, mES)

tkapp← HKDF.Expand(MS, label7kHsess) stage 2

RMS ← HKDF.Expand(MS, label8kHsess) stage 3

EMS ← HKDF.Expand(MS, label9kHsess) stage 4

record layer (application data), using AEAD with key tkapp

ES SS Ext xSS 0 Ext xES 0 Exp mSS H3 Exp mES H3 Ext MS Exp FS H3 Exp tkhs H1 Exp tkapp Hsess Exp EMS Hsess Exp RMS Hsess (resumption)

Protocol flow legend

MSG: Y TLS 1.3 message MSG containing Y

{MSG} message MSG AEAD-encrypted with tkhs

+ MSG message sent as extension within previous message

MSG∗ message is situation-dependent and not always sent

Key schedule legend

Ext / Exp HKDF.Extract resp. HKDF.Expand function

X salt input X to Ext resp. context info input X to Exp (label inputs to Exp are omitted)

Figure 6.1: The TLS 1.3 draft-10 full (EC)DHE handshake protocol (left) and key schedule (right).

include various extension fields, for the full (EC)DHE mode at least the following one must to be present.

• ClientKeyShare (CKS)/ServerKeyShare (SKS) are extensions sent within the ClientHello resp. ServerHello messages which contain the ephemeral Diffie–Hellman shares X = gx resp. Y = gy for one or more (in case of the client) groups.

Both parties can now compute the ephemeral secret ES as the Diffie–Hellman shared value gxy. Key derivation is then done using HKDF in the extract-then-expand paradigm [Kra10, KE10], computing first an extracted value xES from which the handshake traffic key tkhs is expanded; both are unauthenticated at this point. We adopt here the standard notation for the two HKDF functions as introduced in Section 3.2.3.

All subsequent messages are encrypted using tkhs:

• ServerConfiguration (SC) contains a server configuration (cryptographically a semi-static Diffie–Hellman share) which allows a client to later run an abbreviated (0-RTT) handshake (see the description of the Diffie–Hellman-based 0-RTT handshake in Section 7.4). • ServerCertificate (SCRT)/ClientCertificate (CCRT) contain the public-key certificate

of the respective party.

• CertificateRequest (CR) is sent by the server if it demands that the client authenticates using a certificate.

• ServerCertificateVerify (SCV)/ClientCertificateVerify (CCV) contain a digital sig- nature over the handshake hash (the hash of all handshake messages sent and received at that point in the protocol run).

• ClientFinished (CF)/ServerFinished (SF) contain an HMAC message authentication code computed over the handshake hash keyed with the finished secret FS. The finished secret in turn is derived from the extracted version xSS of the static secret SS. While the static secret takes different values in other handshake variants, it equals the ephemeral secret (SS = ES) in the full (EC)DHE handshake.

Both parties can now compute the master secret MS (as an extraction of expanded ephemeral and static secrets). From the master secret, the application traffic key tkapp as well as the resumption master secret RMS for use in future session resumptions and the exporter master secret EMS allowing the potential derivation of further keying material are computed through HKDF expansion steps which include the final handshake hash value, which is also called the

session hash Hsess.

On 0.5-RTT data and post-handshake messages. In our analysis of the TLS 1.3 hand- shake candidates we focus on the main components of the handshake and hence in particular do not capture the following two more advanced options specified or envisioned in the draft standards.

First, instead of deriving the application traffic key tkapp at the end of the handshake (as

depicted in Figure 6.1), the server might already do so after sending the ServerFinished message in order to send so-called 0.5-RTT data directly following his handshake messages, i.e., without waiting for the ClientFinished response. We omit analyzing this variant of the handshake but expect that results for it with potentially weaker authentication guarantees for tkapp can be obtained in our model.

Second, TLS 1.3 introduces post-handshake messages that can be sent encrypted under tkapp

(potentially long) after the initial handshake was completed in order to update the used traffic key, authenticate the client, or issue tickets for session resumption.21 Here, we focus on the main handshake and do not consider post-handshake messages.

In document Aprendiendo con Nuestra Gente. (página 66-70)

Documento similar