keys

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package keys contains a utility struct for elliptic curve keypairs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPair

type KeyPair struct {
	Pub  *[32]byte
	Priv *[32]byte
}

func NewKeyPair

func NewKeyPair() *KeyPair

func NewKeyPairFromPrivateKey

func NewKeyPairFromPrivateKey(priv [32]byte) *KeyPair

func (*KeyPair) CreateSignedPreKey

func (kp *KeyPair) CreateSignedPreKey(keyID uint32) *PreKey

func (*KeyPair) Sign

func (kp *KeyPair) Sign(keyToSign *KeyPair) *[64]byte

type PreKey

type PreKey struct {
	KeyPair
	KeyID     uint32
	Signature *[64]byte
}

func NewPreKey

func NewPreKey(keyID uint32) *PreKey

Jump to

Keyboard shortcuts

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