ring

package
v0.0.0-...-2c04d6a Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTranscript

func NewTranscript() *transcript

Types

type EncKeyPair

type EncKeyPair struct {
	PK    PublicKey
	SKPEM string // PEM serialized private key
}

func (*EncKeyPair) Decrypt

func (p *EncKeyPair) Decrypt(passwd []byte) (*KeyPair, error)

func (*EncKeyPair) Parse

func (p *EncKeyPair) Parse() (*KeyPair, error)

type KeyPair

type KeyPair struct {
	PK PublicKey
	SK interface{}
}

type PublicKey

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

func PublicKeyFromStr

func PublicKeyFromStr(s string) (PublicKey, error)

func (PublicKey) Equals

func (pk1 PublicKey) Equals(pk2 PublicKey) bool

func (*PublicKey) FP

func (k *PublicKey) FP() string

func (*PublicKey) Id

func (p *PublicKey) Id() string

func (*PublicKey) Name

func (k *PublicKey) Name() string

type Signature

type Signature struct {
	Version      int
	Proofs       [][]byte
	Challenges   []challenge
	Fingerprints []string
	Msg          []byte
}

func Sign

func Sign(pair KeyPair, pks []PublicKey, msg []byte) Signature

func (*Signature) Verify

func (sig *Signature) Verify(pks []PublicKey) ([]byte, error)

func (*Signature) VerifyExact

func (sig *Signature) VerifyExact(pks []PublicKey) ([]byte, error)

Jump to

Keyboard shortcuts

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