Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/XTLS/REALITY
/ functions
Functions
457 in github.com/XTLS/REALITY
⨍
Functions
457
◇
Types & classes
108
↓ 3 callers
Function
tls10MAC
tls10MAC implements the TLS 1.0 MAC function. RFC 2246, Section 6.2.3.
cipher_suites.go:594
↓ 2 callers
Function
Client
Client returns a new TLS client side connection using conn as the underlying transport. The config cannot be nil: users must set either ServerName or
tls.go:491
↓ 2 callers
Method
ClientApplicationTrafficSecret
ClientApplicationTrafficSecret derives the client_application_traffic_secret_0 from the master secret and the transcript up to the server Finished.
tls13/tls13.go:132
↓ 2 callers
Method
ClientEarlyTrafficSecret
ClientEarlyTrafficSecret derives the client_early_traffic_secret from the early secret and the transcript up to the ClientHello.
tls13/tls13.go:88
↓ 2 callers
Method
ClientHandshakeTrafficSecret
ClientHandshakeTrafficSecret derives the client_handshake_traffic_secret from the handshake secret and the transcript up to the ServerHello.
tls13/tls13.go:107
↓ 2 callers
Method
CloseWrite
()
tls.go:61
↓ 2 callers
Method
Dial
Dial connects to the given network address and initiates a TLS handshake, returning the resulting TLS connection. The returned [Conn], if any, will a
tls.go:670
↓ 2 callers
Method
Error
()
tls.go:576
↓ 2 callers
Method
ExtractAndExpand
(dhKey, kemContext []byte)
hpke/hpye.go:83
↓ 2 callers
Method
Get
Get searches for a ClientSessionState associated with the given key. On return, ok is true if one was found.
common.go:376
↓ 2 callers
Method
HandshakeSecret
(sharedSecret []byte)
tls13/tls13.go:97
↓ 2 callers
Method
MasterSecret
()
tls13/tls13.go:122
↓ 2 callers
Method
NonceSize
()
cipher_suites.go:480
↓ 2 callers
Function
PRF
PRF implements the TLS 1.2 pseudo-random function, as defined in RFC 5246, Section 5 and allowed by SP 800-135, Revision 1, Section 4.2.2.
tls12/tls12.go:14
↓ 2 callers
Method
Read
Read reads data from the connection. As Read calls [Conn.Handshake], in order to prevent indefinite blocking a deadline must be set for both Read and
conn.go:1444
↓ 2 callers
Method
ResumptionBinderKey
()
tls13/tls13.go:82
↓ 2 callers
Method
ResumptionMasterSecret
ResumptionMasterSecret derives the resumption_master_secret from the master secret and the transcript up to the client Finished.
tls13/tls13.go:144
↓ 2 callers
Function
Server
You MUST call `DetectPostHandshakeRecordsLens(config)` in advance manually if you don't use REALITY's listener, e.g., Xray-core's RAW transport.
tls.go:162
↓ 2 callers
Method
ServerApplicationTrafficSecret
ServerApplicationTrafficSecret derives the server_application_traffic_secret_0 from the master secret and the transcript up to the server Finished.
tls13/tls13.go:138
↓ 2 callers
Method
ServerHandshakeTrafficSecret
ServerHandshakeTrafficSecret derives the server_handshake_traffic_secret from the handshake secret and the transcript up to the ServerHello.
tls13/tls13.go:113
↓ 2 callers
Method
SetIV
([]byte)
conn.go:342
↓ 2 callers
Method
SetWriteDeadline
SetWriteDeadline sets the write deadline on the underlying connection. A zero value for t means [Conn.Write] will not time out. After a [Conn.Write] h
conn.go:160
↓ 2 callers
Method
SupportsCertificate
SupportsCertificate returns nil if the provided certificate is supported by the client that sent the ClientHello. Otherwise, it returns an error descr
common.go:1350
↓ 2 callers
Method
Temporary
()
conn.go:201
↓ 2 callers
Method
VerifyHostname
VerifyHostname checks that the peer certificate chain is valid for connecting to host. If so, it returns nil; if not, it returns an error describing t
conn.go:1742
↓ 2 callers
Function
addBytesWithLength
addBytesWithLength appends a sequence of bytes to the cryptobyte.Builder. If the length of the sequence is not the value specified, it produces an err
handshake_messages.go:26
↓ 2 callers
Function
addUint64
addUint64 appends a big-endian, 64-bit value to the cryptobyte.Builder.
handshake_messages.go:37
↓ 2 callers
Method
changeCipherSpec
changeCipherSpec changes the encryption and MAC states to the ones previously passed to prepareCipherSpec.
conn.go:222
↓ 2 callers
Function
checkALPN
checkALPN ensure that the server's choice of ALPN protocol is compatible with the protocols that we advertised in the ClientHello.
handshake_client.go:971
↓ 2 callers
Function
checkKeySize
var tlsmaxrsasize = godebug.New("tlsmaxrsasize")
handshake_client.go:1092
↓ 2 callers
Method
checkServerHelloOrHRR
checkServerHelloOrHRR does validity checks that apply to both ServerHello and HelloRetryRequest messages. It sets hs.suite.
handshake_client_tls13.go:165
↓ 2 callers
Method
clientSum
clientSum returns the contents of the verify_data member of a client's Finished message.
prf.go:215
↓ 2 callers
Method
closeNotify
()
conn.go:1536
↓ 2 callers
Function
computeAndUpdateOuterECHExtension
(outer, inner *clientHelloMsg, ech *echClientContext, useKey bool)
ech.go:439
↓ 2 callers
Function
computeAndUpdatePSK
(m *clientHelloMsg, binderKey []byte, transcript hash.Hash, finishedHash func([]byte, hash.Hash) []byte)
handshake_client.go:1319
↓ 2 callers
Function
decodeInnerClientHello
(outer *clientHelloMsg, encoded []byte)
ech.go:286
↓ 2 callers
Function
decryptECHPayload
(context *hpke.Recipient, hello, payload []byte)
ech.go:423
↓ 2 callers
Function
defaultConfig
()
common.go:1713
↓ 2 callers
Function
dial
(ctx context.Context, netDialer *net.Dialer, network, addr string, config *Config)
tls.go:594
↓ 2 callers
Function
ekmFromMasterSecret
ekmFromMasterSecret generates exported keying material as defined in RFC 5705.
prf.go:270
↓ 2 callers
Method
establishKeys
()
handshake_client.go:853
↓ 2 callers
Method
establishKeys
()
handshake_server.go:786
↓ 2 callers
Method
explicitNonceLen
explicitNonceLen returns the number of bytes of explicit nonce or IV included in each record. Explicit nonces are present only in CBC modes after TLS
conn.go:264
↓ 2 callers
Method
explicitNonceLen
explicitNonceLen returns the number of bytes of explicit nonce included in each record. This is eight for older AEADs and zero for modern ones.
cipher_suites.go:443
↓ 2 callers
Method
exportKeyingMaterial
exportKeyingMaterial implements RFC5705 exporters for TLS 1.3 according to RFC 8446, Section 7.5.
key_schedule.go:46
↓ 2 callers
Function
extMasterFromPreMasterSecret
extMasterFromPreMasterSecret generates the extended master secret from the pre-master secret. See RFC 7627.
prf.go:122
↓ 2 callers
Function
generateOuterECHExt
(id uint8, kdfID, aeadID uint16, encodedKey []byte, payload []byte)
ech.go:428
↓ 2 callers
Method
getCertificate
getCertificate returns the best certificate for the given ClientHelloInfo, defaulting to the first element of c.Certificates.
common.go:1296
↓ 2 callers
Method
getClientCertificate
(cri *CertificateRequestInfo)
handshake_client.go:1271
↓ 2 callers
Method
handlePostHandshakeMessage
handlePostHandshakeMessage processes a handshake message arrived after the handshake is complete. Up to TLS 1.2, it indicates the start of a renegotia
conn.go:1372
↓ 2 callers
Method
handshake
Does the handshake, either a full one or resumes old session. Requires hs.c, hs.hello, hs.serverHello, and, optionally, hs.session to be set.
handshake_client.go:553
↓ 2 callers
Method
handshake
()
handshake_server.go:68
↓ 2 callers
Method
hashForClientCertificate
hashForClientCertificate returns the handshake messages so far, pre-hashed if necessary, suitable for signing by a TLS client certificate.
prf.go:227
↓ 2 callers
Function
hashForServerKeyExchange
hashForServerKeyExchange hashes the given slices and returns their digest using the given hash function (for TLS 1.2) or using a default based on the
key_agreement.go:133
↓ 2 callers
Method
incrementNonce
()
hpke/hpye.go:288
↓ 2 callers
Method
initLegacySessionTicketKeyRLocked
initLegacySessionTicketKeyRLocked ensures the legacy SessionTicketKey field is randomized if empty, and that sessionTicketKeys is populated from it ot
common.go:1029
↓ 2 callers
Function
isAESGCMPreferred
isAESGCMPreferred returns whether we have hardware support for AES-GCM, and the first known cipher in the peer's preference list is an AES-GCM cipher,
cipher_suites.go:390
↓ 2 callers
Function
isPQKeyExchange
(curve CurveID)
common.go:159
↓ 2 callers
Function
keysFromMasterSecret
keysFromMasterSecret generates the connection keys from the master secret, given the lengths of the MAC key, cipher key and IV, as defined in RFC 2246
prf.go:135
↓ 2 callers
Method
leaf
leaf returns the parsed leaf certificate, either from c.Leaf or by parsing the corresponding c.Certificate[0].
common.go:1613
↓ 2 callers
Function
marshalCertificate
(b *cryptobyte.Builder, certificate Certificate)
handshake_messages.go:1474
↓ 2 callers
Method
marshalMsg
(echInner bool)
handshake_messages.go:104
↓ 2 callers
Method
marshalWithoutBinders
marshalWithoutBinders returns the ClientHello through the PreSharedKeyExtension.identities field, according to RFC 8446, Section 4.2.11.2. Note that m
handshake_messages.go:382
↓ 2 callers
Function
masterFromPreMasterSecret
masterFromPreMasterSecret generates the master secret from the pre-master secret. See RFC 5246, Section 8.1.
prf.go:112
↓ 2 callers
Function
mutualCipherSuite
mutualCipherSuite returns a cipherSuite given a list of supported ciphersuites and the id requested by the peer.
cipher_suites.go:626
↓ 2 callers
Function
negotiateALPN
negotiateALPN picks a shared ALPN protocol that both sides support in server preference order. If ALPN is not configured or the peer doesn't support i
handshake_server.go:331
↓ 2 callers
Function
newContext
(sharedSecret []byte, kemID, kdfID, aeadID uint16, info []byte)
hpke/hpye.go:187
↓ 2 callers
Function
newDHKem
(kemID uint16)
hpke/hpye.go:70
↓ 2 callers
Function
newQUICConn
(conn *Conn, config *QUICConfig)
quic.go:188
↓ 2 callers
Method
nextNonce
()
hpke/hpye.go:280
↓ 2 callers
Method
nextTrafficSecret
This file contains the functions necessary to compute the TLS 1.3 key schedule. See RFC 8446, Section 7. nextTrafficSecret generates the next traffic
key_schedule.go:23
↓ 2 callers
Method
originalBytes
originalBytes should return the original bytes that were passed to unmarshal to create the message. If the message was not produced by unmarshal, it s
common.go:1631
↓ 2 callers
Function
pHash
pHash implements the P_hash function, as defined in RFC 4346, Section 5.
prf.go:31
↓ 2 callers
Function
parseECHConfig
(enc []byte)
ech.go:70
↓ 2 callers
Function
parseECHExt
(ext []byte)
ech.go:525
↓ 2 callers
Function
prf12
prf12 implements the TLS 1.2 pseudo-random function, as defined in RFC 5246, Section 5.
prf.go:74
↓ 2 callers
Method
processCertsFromClient
processCertsFromClient takes a chain of client certificates either from a certificateMsg message or a certificateMsgTLS13 message and verifies them.
handshake_server.go:905
↓ 2 callers
Method
quicGetTransportParameters
()
quic.go:446
↓ 2 callers
Method
quicRejectedEarlyData
()
quic.go:466
↓ 2 callers
Method
quicResumeSession
(session *SessionState)
quic.go:418
↓ 2 callers
Method
quicSetTransportParameters
(params []byte)
quic.go:439
↓ 2 callers
Method
readChangeCipherSpec
()
conn.go:626
↓ 2 callers
Method
readClientFinished
()
handshake_server_tls13.go:1235
↓ 2 callers
Method
readClientHello
readClientHello reads a ClientHello message and selects the protocol version.
handshake_server.go:136
↓ 2 callers
Method
readFinished
(out []byte)
handshake_client.go:990
↓ 2 callers
Method
readFinished
(out []byte)
handshake_server.go:811
↓ 2 callers
Method
readFromUntil
readFromUntil reads from r into c.rawInput until c.rawInput contains at least n bytes or else returns an error.
conn.go:866
↓ 2 callers
Method
readHandshakeBytes
readHandshakeBytes reads handshake data until c.hand contains at least n bytes.
conn.go:1145
↓ 2 callers
Method
readSessionTicket
()
handshake_client.go:1025
↓ 2 callers
Method
sendDummyChangeCipherSpec
sendDummyChangeCipherSpec sends a ChangeCipherSpec record for compatibility with middleboxes that didn't implement TLS correctly. See RFC 8446, Append
handshake_client_tls13.go:221
↓ 2 callers
Method
sendDummyChangeCipherSpec
sendDummyChangeCipherSpec sends a ChangeCipherSpec record for compatibility with middleboxes that didn't implement TLS correctly. See RFC 8446, Append
handshake_server_tls13.go:629
↓ 2 callers
Method
sendFinished
(out []byte)
handshake_client.go:1070
↓ 2 callers
Method
sendFinished
(out []byte)
handshake_server.go:885
↓ 2 callers
Method
sendSessionTicket
(earlyData bool, extra [][]byte)
handshake_server_tls13.go:1089
↓ 2 callers
Method
sendSessionTicket
()
handshake_server.go:846
↓ 2 callers
Method
sendSessionTickets
()
handshake_server_tls13.go:1070
↓ 2 callers
Method
serverSum
serverSum returns the contents of the verify_data member of a server's Finished message.
prf.go:221
↓ 2 callers
Function
sha1Hash
sha1Hash calculates a SHA1 hash over the given byte slices.
key_agreement.go:108
↓ 2 callers
Function
skipUint8LengthPrefixed
(s *cryptobyte.String)
ech.go:239
↓ 2 callers
Function
supportedCipherSuites
var tlsrsakex = godebug.New("tlsrsakex") var tls3des = godebug.New("tls3des")
defaults.go:76
← previous
next →
101–200 of 457, ranked by callers