Class SSL.KeySchedule

class SSL.KeySchedule
Description

TLS 1.3 key schedule (RFC 8446 section 7.1).

Unlike the TLS 1.0-1.2 PRF-based Session key block (Session.generate_keys()), TLS 1.3 derives all traffic keys through a chain of HKDF-Extract and HKDF-Expand-Label operations tied to the negotiated cipher suite's hash (Cipher.CipherSpec.hash). This class holds that running state for a single connection.

Note

This only implements the key-schedule arithmetic itself -- deciding *when* to call each step, and with which running transcript hash, is the handshake state machine's job.


Variable binder_key

string(8bit)|zero SSL.KeySchedule.binder_key

Description

RFC 8446 section 7.1 PSK binder key.

Derived with label "ext binder" for an externally provisioned PSK, or "res binder" for a resumption PSK.


Variable client_application_traffic_secret
Variable server_application_traffic_secret

string(8bit)|zero SSL.KeySchedule.client_application_traffic_secret
string(8bit)|zero SSL.KeySchedule.server_application_traffic_secret

Description

RFC 8446 section 7.1 Application traffic secrets (generation 0; see update_traffic_secret() for later generations after a HANDSHAKE_key_update).


Variable client_early_traffic_secret

string(8bit)|zero SSL.KeySchedule.client_early_traffic_secret

Description

RFC 8446 section 7.1 0-RTT client traffic secret.


Variable client_handshake_traffic_secret
Variable server_handshake_traffic_secret

string(8bit)|zero SSL.KeySchedule.client_handshake_traffic_secret
string(8bit)|zero SSL.KeySchedule.server_handshake_traffic_secret

Description

RFC 8446 section 7.1 Handshake traffic secrets.


Variable early_exporter_master_secret

string(8bit)|zero SSL.KeySchedule.early_exporter_master_secret

Description

RFC 8446 section 7.1 0-RTT exporter secret.


Variable early_secret

string(8bit)|zero SSL.KeySchedule.early_secret

Description

RFC 8446 section 7.1 Early Secret.


Variable exporter_master_secret
Variable resumption_master_secret

string(8bit)|zero SSL.KeySchedule.exporter_master_secret
string(8bit)|zero SSL.KeySchedule.resumption_master_secret

Description

RFC 8446 section 7.1 Exporter and resumption secrets.


Variable handshake_secret

string(8bit)|zero SSL.KeySchedule.handshake_secret

Description

RFC 8446 section 7.1 Handshake Secret.


Variable hash

Crypto.Hash|zero SSL.KeySchedule.hash

Description

The key-schedule/transcript hash, tied to the negotiated cipher suite (e.g. Crypto.SHA256 or Crypto.SHA384).


Variable hash_size

int(0..) SSL.KeySchedule.hash_size

Description

hash->digest_size(), cached.


Variable master_secret

string(8bit)|zero SSL.KeySchedule.master_secret

Description

RFC 8446 section 7.1 Master Secret.

Note

This is the TLS 1.3 key-schedule secret, unrelated to the TLS 1.0-1.2 Session()->master_secret.