libsignalgo.mau.fi/libsignal/keys/identity Index | Files

package identity

import "go.mau.fi/libsignal/keys/identity"

Package identity provides identity keys used for verifying the identity of a signal user.

Index

Types

type Key

type Key struct {
	// contains filtered or unexported fields
}

Key is a structure for representing an identity key. This same structure can be used for verifying recipient's identity key or storing our own identity key.

func NewKey

func NewKey(publicKey ecc.ECPublicKeyable) *Key

NewKey generates a new IdentityKey from an ECPublicKey

func NewKeyFromBytes

func NewKeyFromBytes(publicKey [32]byte, offset int) Key

NewKeyFromBytes generates a new IdentityKey from public key bytes

func (*Key) Fingerprint

func (k *Key) Fingerprint() string

Fingerprint gets the string fingerprint representation of the public key.

func (*Key) PublicKey

func (k *Key) PublicKey() ecc.ECPublicKeyable

PublicKey returns the EC Public key of the identity key

func (*Key) Serialize

func (k *Key) Serialize() []byte

Serialize returns the serialized version of the key

type KeyPair

type KeyPair struct {
	// contains filtered or unexported fields
}

KeyPair is a holder for public and private identity key pair.

func NewKeyPair

func NewKeyPair(publicKey *Key, privateKey ecc.ECPrivateKeyable) *KeyPair

NewKeyPair returns a new identity key with the given public and private keys.

func (*KeyPair) PrivateKey

func (k *KeyPair) PrivateKey() ecc.ECPrivateKeyable

PrivateKey returns the identity key's private key.

func (*KeyPair) PublicKey

func (k *KeyPair) PublicKey() *Key

PublicKey returns the identity key's public key.

Source Files

IdentityKey.go IdentityKeyPair.go

Version
v0.1.2 (latest)
Published
Feb 12, 2025
Platform
linux/amd64
Imports
2 packages
Last checked
6 days ago

Tools for package owners.