package
1.0.0
Repository: https://github.com/operatorfoundation/obfs4.git
Documentation: pkg.go.dev

# Functions

ClientHandshake does the client side of a ntor handshake and returnes status, KEY_SEED, and AUTH.
CompareAuth does a constant time compare of a Auth and a byte slice (presumably received over a network).
Kdf extracts and expands KEY_SEED via HKDF-SHA256 and returns `okm_len` bytes of key material.
KeypairFromHex returns a Keypair from the hexdecimal representation of the private key.
NewKeypair generates a new Curve25519 keypair, and optionally also generates an Elligator representative of the public key.
NewNodeID creates a NodeID from the raw bytes.
NewPublicKey creates a PublicKey from the raw bytes.
NodeIDFromHex creates a new NodeID from the hexdecimal representation.
PublicKeyFromHex returns a PublicKey from the hexdecimal representation.
ServerHandshake does the server side of a ntor handshake and returns status, KEY_SEED, and AUTH.

# Constants

AuthLength is the lenght of the derived AUTH.
KeySeedLength is the length of the derived KEY_SEED.
NodeIDLength is the length of a ntor node identifier.
PrivateKeyLength is the length of a Curve25519 private key.
PublicKeyLength is the length of a Curve25519 public key.
RepresentativeLength is the length of an Elligator representative.
SharedSecretLength is the length of a Curve25519 shared secret.

# Structs

Keypair is a Curve25519 keypair with an optional Elligator representative.

# Type aliases

Auth is the verifier that results from a handshake (AUTH).
KeySeed is the key material that results from a handshake (KEY_SEED).
NodeID is a ntor node identifier.
NodeIDLengthError is the error returned when the node ID being imported is an invalid length.
PrivateKey is a Curve25519 private key in little-endian byte order.
PrivateKeyLengthError is the error returned when the private key being imported is an invalid length.
PublicKey is a Curve25519 public key in little-endian byte order.
PublicKeyLengthError is the error returned when the public key being imported is an invalid length.
Representative is an Elligator representative of a Curve25519 public key in little-endian byte order.