package
1.2.5
Repository: https://github.com/brutella/hc.git
Documentation: pkg.go.dev

# Functions

HandleReaderForHandler wraps h.Handle() call and logs sequence numbers and errors to the console.
KeyDerivativeFuncRFC2945 returns the SRP-6a key derivative function which does x = H(s | H(I | ":" | P)).
NewPairingController returns a pairing controller.
NewSetupClientController returns a new setup client controller.
NewSetupClientSession returns a new setup client session.
NewSetupServerController returns a new pair setup controller.
NewSetupServerSession return a new setup server session.
NewVerifyClientController returns a new verify client controller.
NewVerifyServerController returns a new verify server controller.
NewVerifySession creates a new session with random public and private key.

# Constants

ErrCodeAuthenticationFailed is code for authentication error e.g.
ErrCodeMaxAuthenticationAttempts is code for reaching maximum number of authentication attempts error (not used).
ErrCodeMaxPeer is code for reaching maximum number of peers error (not used).
ErrCodeNo is code for no error.
ErrCodeTooManyAttempts is code for too many attempts error (not used).
ErrCodeUnknown is code for unknown error.
ErrCodeUnknownPeer is code for unknown accessory or client error.
PairingMethodAdd is used to pair a client by exchanging keys on a secured connection and without going through the pairing process.
PairingMethodDefault is the default pairing method.
PairingMethodDelete is used to delete a pairing with a client.
PairingMethodMFi is used to pair with an MFi compliant accessory (not used).
PairStepKeyExchangeRequest sent from the client to the accessory alongside the client encrypted username and public key.
PairStepKeyExchangeResponse sent from the accessory to the client alongside the accessory encrypted username and public key.
PairStepStartRequest sent from the client to the accessory to start pairing.
PairStepStartResponse sent from the accessory to the client alongside the server's salt and public key.
PairStepVerifyRequest sent from the client to the accessory alongside the client public key and proof.
PairStepVerifyResponse sent from the accessory to the client alongside the server's proof.
PairStepWaiting is the step when waiting server waits for pairing request from a client.
N (modulo) => 384 byte.
TagEncryptedData is the encrypted data tag.
TagErrCode is the error tag.
TagMFiCertificate is the MFi certificate tag (currently not used).
TagPairingMethod is the paring method tag.
TagPermission is the permission tag.
TagProof is the SRP proof tag.
TagPublicKey is the public key tag.
TagSalt is the salt tag.
TagSequence is the sequence tag.
TagSignature is the Ed25519 signature tag.
TagUsername is the username tag.
VerifyStepFinishRequest sent from the client to the accessory alongside the client public key and signature (derived from the on the client public key, username and accessory public and private key).
VerifyStepFinishResponse sent from the accessory to the client alongside an error code when verification failed.
VerifyStepStartRequest sent from the client to the accessory to start pairing verification alongside the client public key.
VerifyStepStartResponse sent from the accessory to the client alongside the accessory public key and signature (derived from the on the accessory public key, username and client public and private key).
VerifyStepWaiting is the step when waiting server waits for pair verification request from the client.

# Structs

PairingController handles un-/pairing with a client by simply exchanging the keys going through the pairing process.
SetupClientController handles pairing with an accessory using SRP.
SetupClientSession holds the keys to pair with an accessory.
SetupServerController handles pairing with a cliet using SRP.
SetupServerSession holds the keys to pair with a client.
VerifyClientController verifies the stored accessory public key and negotiates a shared secret which is used encrypt the upcoming session.
VerifyServerController verifies the stored client public key and negotiates a shared secret which is used encrypt the upcoming session.
VerifySession holds keys to encrypt a tcp connection.

# Type aliases

PairStepType defines the type of pairing steps.
VerifyStepType defines the type of pairing verification steps.