package

tls13

crypto/internal/fips140/v1.26.0/tls13

Package tls13 implements the TLS 1.3 Key Schedule as specified in RFC 8446, Section 7.1 and allowed by FIPS 140-3 IG 2.4.B Resolution 7.

Functions

ExpandLabelsource

func ExpandLabel[H hash.Hash](hash func() H, secret []byte, label string, context []byte, length int) []byte

ExpandLabel implements HKDF-Expand-Label from RFC 8446, Section 7.1.

type EarlySecret source

type EarlySecret struct {
	// contains filtered or unexported fields
}

Constructors

Methods

ClientEarlyTrafficSecretsource

func (s *EarlySecret) ClientEarlyTrafficSecret(transcript hash.Hash) []byte

ClientEarlyTrafficSecret derives the client_early_traffic_secret from the early secret and the transcript up to the ClientHello.

EarlyExporterMasterSecretsource

func (s *EarlySecret) EarlyExporterMasterSecret(transcript hash.Hash) *ExporterMasterSecret

EarlyExporterMasterSecret derives the exporter_master_secret from the early secret and the transcript up to the ClientHello.

type ExporterMasterSecret source

type ExporterMasterSecret struct {
	// contains filtered or unexported fields
}

Methods

Exportersource

func (s *ExporterMasterSecret) Exporter(label string, context []byte, length int) []byte

type HandshakeSecret source

type HandshakeSecret struct {
	// contains filtered or unexported fields
}

Methods

ClientHandshakeTrafficSecretsource

func (s *HandshakeSecret) ClientHandshakeTrafficSecret(transcript hash.Hash) []byte

ClientHandshakeTrafficSecret derives the client_handshake_traffic_secret from the handshake secret and the transcript up to the ServerHello.

ServerHandshakeTrafficSecretsource

func (s *HandshakeSecret) ServerHandshakeTrafficSecret(transcript hash.Hash) []byte

ServerHandshakeTrafficSecret derives the server_handshake_traffic_secret from the handshake secret and the transcript up to the ServerHello.

type MasterSecret source

type MasterSecret struct {
	// contains filtered or unexported fields
}

Methods

ClientApplicationTrafficSecretsource

func (s *MasterSecret) ClientApplicationTrafficSecret(transcript hash.Hash) []byte

ClientApplicationTrafficSecret derives the client_application_traffic_secret_0 from the master secret and the transcript up to the server Finished.

ExporterMasterSecretsource

func (s *MasterSecret) ExporterMasterSecret(transcript hash.Hash) *ExporterMasterSecret

ExporterMasterSecret derives the exporter_master_secret from the master secret and the transcript up to the server Finished.

ResumptionMasterSecretsource

func (s *MasterSecret) ResumptionMasterSecret(transcript hash.Hash) []byte

ResumptionMasterSecret derives the resumption_master_secret from the master secret and the transcript up to the client Finished.

ServerApplicationTrafficSecretsource

func (s *MasterSecret) ServerApplicationTrafficSecret(transcript hash.Hash) []byte

ServerApplicationTrafficSecret derives the server_application_traffic_secret_0 from the master secret and the transcript up to the server Finished.