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"
"bytes"
"crypto/internal/fips140"
_ "crypto/internal/fips140/check"
"crypto/internal/fips140/sha256"
"errors"
"crypto/internal/fips140"
"crypto/internal/fips140/hkdf"
"crypto/internal/fips140deps/byteorder"
const clientApplicationTrafficLabel = "c ap traffic"
const clientEarlyTrafficLabel = "c e traffic"
const clientHandshakeTrafficLabel = "c hs traffic"
const earlyExporterLabel = "e exp master"
const exporterLabel = "exp master"
const resumptionBinderLabel = "res binder"
const resumptionLabel = "res master"
const serverApplicationTrafficLabel = "s ap traffic"
const serverHandshakeTrafficLabel = "s hs traffic"
type EarlySecret struct {
secret []byte
hash func() fips140.Hash
}
type ExporterMasterSecret struct {
secret []byte
hash func() fips140.Hash
}
type HandshakeSecret struct {
secret []byte
hash func() fips140.Hash
}
type MasterSecret struct {
secret []byte
hash func() fips140.Hash
}
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 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 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 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 implements HKDF-Expand-Label from RFC 8446, Section 7.1.
func ExpandLabel(hash func() H, secret []byte, label string, context []byte, length int) []byte
func (s *ExporterMasterSecret) Exporter(label string, context []byte, length int) []byte
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
func (s *EarlySecret) HandshakeSecret(sharedSecret []byte) *HandshakeSecret
func (s *HandshakeSecret) MasterSecret() *MasterSecret
func NewEarlySecret(hash func() H, psk []byte) *EarlySecret
func (s *EarlySecret) ResumptionBinderKey() []byte
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 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 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
func deriveSecret(hash func() H, secret []byte, label string, transcript fips140.Hash) []byte
func extract(hash func() H, newSecret []byte, currentSecret []byte) []byte
func init()
Generated with Arrow