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) []byteClientEarlyTrafficSecret derives the client_early_traffic_secret from the early secret and the transcript up to the ClientHello.
func (s *EarlySecret) ClientEarlyTrafficSecret(transcript fips140.Hash) []byteClientHandshakeTrafficSecret derives the client_handshake_traffic_secret from the handshake secret and the transcript up to the ServerHello.
func (s *HandshakeSecret) ClientHandshakeTrafficSecret(transcript fips140.Hash) []byteEarlyExporterMasterSecret derives the exporter_master_secret from the early secret and the transcript up to the ClientHello.
func (s *EarlySecret) EarlyExporterMasterSecret(transcript fips140.Hash) *ExporterMasterSecretExpandLabel implements HKDF-Expand-Label from RFC 8446, Section 7.1.
func ExpandLabel(hash func() H, secret []byte, label string, context []byte, length int) []bytefunc (s *ExporterMasterSecret) Exporter(label string, context []byte, length int) []byteExporterMasterSecret derives the exporter_master_secret from the master secret and the transcript up to the server Finished.
func (s *MasterSecret) ExporterMasterSecret(transcript fips140.Hash) *ExporterMasterSecretfunc (s *EarlySecret) HandshakeSecret(sharedSecret []byte) *HandshakeSecretfunc (s *HandshakeSecret) MasterSecret() *MasterSecretfunc NewEarlySecret(hash func() H, psk []byte) *EarlySecretfunc (s *EarlySecret) ResumptionBinderKey() []byteResumptionMasterSecret derives the resumption_master_secret from the master secret and the transcript up to the client Finished.
func (s *MasterSecret) ResumptionMasterSecret(transcript fips140.Hash) []byteServerApplicationTrafficSecret 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) []byteServerHandshakeTrafficSecret derives the server_handshake_traffic_secret from the handshake secret and the transcript up to the ServerHello.
func (s *HandshakeSecret) ServerHandshakeTrafficSecret(transcript fips140.Hash) []bytefunc deriveSecret(hash func() H, secret []byte, label string, transcript fips140.Hash) []bytefunc extract(hash func() H, newSecret []byte, currentSecret []byte) []bytefunc init()Generated with Arrow