MCPcopy Create free account
hub / github.com/XTLS/REALITY / EncryptedClientHelloKey

Struct EncryptedClientHelloKey

common.go:911–925  ·  view source on GitHub ↗

EncryptedClientHelloKey holds a private key that is associated with a specific ECH config known to a client.

Source from the content-addressed store, hash-verified

909// EncryptedClientHelloKey holds a private key that is associated
910// with a specific ECH config known to a client.
911type EncryptedClientHelloKey struct {
912 // Config should be a marshalled ECHConfig associated with PrivateKey. This
913 // must match the config provided to clients byte-for-byte. The config
914 // should only specify the DHKEM(X25519, HKDF-SHA256) KEM ID (0x0020), the
915 // HKDF-SHA256 KDF ID (0x0001), and a subset of the following AEAD IDs:
916 // AES-128-GCM (0x0001), AES-256-GCM (0x0002), ChaCha20Poly1305 (0x0003).
917 Config []byte
918 // PrivateKey should be a marshalled private key. Currently, we expect
919 // this to be the output of [ecdh.PrivateKey.Bytes].
920 PrivateKey []byte
921 // SendAsRetry indicates if Config should be sent as part of the list of
922 // retry configs when ECH is requested by the client but rejected by the
923 // server.
924 SendAsRetry bool
925}
926
927const (
928 // ticketKeyLifetime is how long a ticket key remains valid and can be used to

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected