💾 Archived View for code.pfad.fr › gohmekit › pairing › crypto captured on 2024-05-26 at 14:58:51. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-12-28)
-=-=-=-=-=-=-
import "code.pfad.fr/gohmekit/pairing/crypto"
func PairVerifyAEAD(sharedSecret []byte) (cipher.AEAD, error)
type KeyOnCurve25519 struct { // contains filtered or unexported fields }
func NewKeyOnCurve25519() (KeyOnCurve25519, error)
func (k KeyOnCurve25519) PairVerifySharedSecret(otherPublicKey []byte) ([]byte, error)
func (k KeyOnCurve25519) PublicKey() []byte
type SRPSession struct { // contains filtered or unexported fields }
func NewSRPSession(pin []byte) (*SRPSession, []byte, error)
func (s SRPSession) ExchangeProof(clientProof []byte) ([]byte, bool)
func (s SRPSession) PairSetupSharedSecret(otherPublicKey []byte) ([]byte, error)
func (s SRPSession) PublicKey() []byte
type SRPSharedSecret []byte
func (s SRPSharedSecret) AEAD() (cipher.AEAD, error)
func (s SRPSharedSecret) AccessorySign() ([]byte, error)
func (s SRPSharedSecret) ControllerSign() ([]byte, error)
type Session struct { // contains filtered or unexported fields }
func NewSession(sharedKey [32]byte, isAccessory bool) (*Session, error)
func (s *Session) Open(p []byte) ([]byte, error)
Open will decrypt and authenticate an incoming message. If not enough bytes are present, it will return (nil,nil), but keep the provided bytes in memory, to use them on the next call.
func (s *Session) Seal(plaintext []byte) []byte