tls13

Imports

Imports #

"bytes"
"crypto/internal/fips140"
_ "crypto/internal/fips140/check"
"crypto/internal/fips140/sha256"
"errors"
"crypto/internal/fips140"
"crypto/internal/fips140/hkdf"
"crypto/internal/fips140deps/byteorder"

Constants & Variables

clientApplicationTrafficLabel const #

const clientApplicationTrafficLabel = "c ap traffic"

clientEarlyTrafficLabel const #

const clientEarlyTrafficLabel = "c e traffic"

clientHandshakeTrafficLabel const #

const clientHandshakeTrafficLabel = "c hs traffic"

earlyExporterLabel const #

const earlyExporterLabel = "e exp master"

exporterLabel const #

const exporterLabel = "exp master"

resumptionBinderLabel const #

const resumptionBinderLabel = "res binder"

resumptionLabel const #

const resumptionLabel = "res master"

serverApplicationTrafficLabel const #

const serverApplicationTrafficLabel = "s ap traffic"

serverHandshakeTrafficLabel const #

const serverHandshakeTrafficLabel = "s hs traffic"

Structs

EarlySecret struct #

type EarlySecret struct {
secret []byte
hash func() fips140.Hash
}

ExporterMasterSecret struct #

type ExporterMasterSecret struct {
secret []byte
hash func() fips140.Hash
}

HandshakeSecret struct #

type HandshakeSecret struct {
secret []byte
hash func() fips140.Hash
}

MasterSecret struct #

type MasterSecret struct {
secret []byte
hash func() fips140.Hash
}

Functions

ClientApplicationTrafficSecret method #

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

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

ClientEarlyTrafficSecret method #

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

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

ClientHandshakeTrafficSecret method #

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

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

EarlyExporterMasterSecret method #

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

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

ExpandLabel function #

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

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

Exporter method #

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

ExporterMasterSecret method #

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

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

HandshakeSecret method #

func (s *EarlySecret) HandshakeSecret(sharedSecret []byte) *HandshakeSecret

MasterSecret method #

func (s *HandshakeSecret) MasterSecret() *MasterSecret

NewEarlySecret function #

func NewEarlySecret(hash func() H, psk []byte) *EarlySecret

ResumptionBinderKey method #

func (s *EarlySecret) ResumptionBinderKey() []byte

ResumptionMasterSecret method #

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

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

ServerApplicationTrafficSecret method #

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

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

ServerHandshakeTrafficSecret method #

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

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

deriveSecret function #

func deriveSecret(hash func() H, secret []byte, label string, transcript fips140.Hash) []byte

extract function #

func extract(hash func() H, newSecret []byte, currentSecret []byte) []byte

init function #

func init()

Generated with Arrow