signature

package
v0.0.0-...-e95280a Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	ToSignature(sig string) (Signature, error)
}

Adapter represents a signature adapter

func NewAdapter

func NewAdapter() Adapter

NewAdapter creates a signature adapter

type PrivateKey

type PrivateKey interface {
	PublicKey() PublicKey
	Sign(msg string) (Signature, error)
	RingSign(msg string, ringPubKeys []PublicKey) (RingSignature, error)
	String() string
}

PrivateKey represents a private key

type PrivateKeyAdapter

type PrivateKeyAdapter interface {
	ToPrivateKey(pk string) (PrivateKey, error)
}

PrivateKeyAdapter represents a privateKey adapter

func NewPrivateKeyAdapter

func NewPrivateKeyAdapter() PrivateKeyAdapter

NewPrivateKeyAdapter creates a new PrivateKey adapter

type PrivateKeyFactory

type PrivateKeyFactory interface {
	Create() PrivateKey
}

PrivateKeyFactory represents a privateKey factory

func NewPrivateKeyFactory

func NewPrivateKeyFactory() PrivateKeyFactory

NewPrivateKeyFactory creates a PrivateKey factory

type PublicKey

type PublicKey interface {
	Point() kyber.Point
	Equals(pubKey PublicKey) bool
	String() string
}

PublicKey represents the public key

type PublicKeyAdapter

type PublicKeyAdapter interface {
	ToPublicKey(pubKey string) (PublicKey, error)
}

PublicKeyAdapter represents a publicKey adapter

func NewPublicKeyAdapter

func NewPublicKeyAdapter() PublicKeyAdapter

NewPublicKeyAdapter creates a new publicKey adapter

type RingSignature

type RingSignature interface {
	Ring() []PublicKey
	Verify(msg string) bool
	String() string
}

RingSignature represents a RingSignature

type RingSignatureAdapter

type RingSignatureAdapter interface {
	ToSignature(sig string) (RingSignature, error)
	ToVerification(sig RingSignature, msg string, pubKeyHashes []hash.Hash) (bool, error)
}

RingSignatureAdapter represents a ring signature adapter

func NewRingSignatureAdapter

func NewRingSignatureAdapter() RingSignatureAdapter

NewRingSignatureAdapter creates a ring signature adapter

type Signature

type Signature interface {
	PublicKey(msg string) PublicKey
	Verify() bool
	String() string
}

Signature represents a signature

Jump to

Keyboard shortcuts

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