identity

package
v0.0.0-...-e34fb4d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 2, 2022 License: GPL-3.0 Imports: 2 Imported by: 13

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL