Documentation ¶
Overview ¶
Package crypto provides the crypthographic algorithm used in the HAP protocol.
Index ¶
Constants ¶
View Source
const (
// PacketLengthMax is the max length of encrypted packets
PacketLengthMax = 0x400
)
Variables ¶
This section is empty.
Functions ¶
func ED25519GenerateKey ¶
ED25519GenerateKey return a public and private ED25519 key pair from a string.
func ED25519Signature ¶
ED25519Signature returns the ED25519 signature of data using the key.
func ValidateED25519Signature ¶
ValidateED25519Signature return true when the ED25519 signature is a valid signature of the data based on the key, otherwise false.
Types ¶
type Cryptographer ¶
A Cryptographer is a De- and Encrypter.
func NewSecureClientSessionFromSharedKey ¶
func NewSecureClientSessionFromSharedKey(sharedKey [32]byte) (Cryptographer, error)
NewSecureClientSessionFromSharedKey returns a session from a shared secret key to simulate a HomeKit client. This is currently only used for testing.
func NewSecureSessionFromSharedKey ¶
func NewSecureSessionFromSharedKey(sharedKey [32]byte) (Cryptographer, error)
NewSecureSessionFromSharedKey returns a session from a shared private key.
Click to show internal directories.
Click to hide internal directories.