Documentation ¶
Index ¶
- func DeriveSecret(secret []byte, label []byte, messages ...[]byte) []byte
- func HkdfExpandLabel(secret []byte, label []byte, context []byte, length uint16) []byte
- func TranscriptHash(messages ...[]byte) []byte
- type ClientKeys
- func (k ClientKeys) DecryptTLSCiphertext(encrypted record.TLSCiphertext, messages ...[]byte) []byte
- func (k ClientKeys) GetEarlySecret() []byte
- func (k ClientKeys) GetFinishedKey(messages ...[]byte) []byte
- func (k ClientKeys) GetHandshakeSecret() []byte
- func (k ClientKeys) GetServerHandshakeTrafficSecret(messages ...[]byte) []byte
- func (k *ClientKeys) SetClientPrivateKey(privateKey []byte)
- func (k *ClientKeys) SetCurve(curve elliptic.Curve)
- func (k *ClientKeys) SetServerPublicKey(publicKey []byte)
- func (k ClientKeys) Verify(f handshake.Finished, messages ...[]byte) bool
- type HkdfLabel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HkdfExpandLabel ¶
HKDF-Expand-Label(Secret, Label, Context, Length) = HKDF-Expand(Secret, HkdfLabel, Length)
func TranscriptHash ¶
Types ¶
type ClientKeys ¶
type ClientKeys struct {
// contains filtered or unexported fields
}
func (ClientKeys) DecryptTLSCiphertext ¶
func (k ClientKeys) DecryptTLSCiphertext(encrypted record.TLSCiphertext, messages ...[]byte) []byte
func (ClientKeys) GetEarlySecret ¶
func (k ClientKeys) GetEarlySecret() []byte
0 | v PSK -> HKDF-Extract = Early Secret
func (ClientKeys) GetFinishedKey ¶
func (k ClientKeys) GetFinishedKey(messages ...[]byte) []byte
func (ClientKeys) GetHandshakeSecret ¶
func (k ClientKeys) GetHandshakeSecret() []byte
| +-----> Derive-Secret(., "ext binder" | "res binder", "") | = binder_key | +-----> Derive-Secret(., "c e traffic", ClientHello) | = client_early_traffic_secret | +-----> Derive-Secret(., "e exp master", ClientHello) | = early_exporter_master_secret v Derive-Secret(., "derived", "") | v (EC)DHE -> HKDF-Extract = Handshake Secret
func (ClientKeys) GetServerHandshakeTrafficSecret ¶
func (k ClientKeys) GetServerHandshakeTrafficSecret(messages ...[]byte) []byte
| +-----> Derive-Secret(., "c hs traffic", | ClientHello...ServerHello) | = client_handshake_traffic_secret | +-----> Derive-Secret(., "s hs traffic", | ClientHello...ServerHello) | = server_handshake_traffic_secret
func (*ClientKeys) SetClientPrivateKey ¶
func (k *ClientKeys) SetClientPrivateKey(privateKey []byte)
func (*ClientKeys) SetCurve ¶
func (k *ClientKeys) SetCurve(curve elliptic.Curve)
func (*ClientKeys) SetServerPublicKey ¶
func (k *ClientKeys) SetServerPublicKey(publicKey []byte)