hybrid

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(name string, first sign.Scheme, second sign.Scheme) sign.Scheme

New creates a new hybrid signature scheme given the two signature schemes, assumign one of them is classical and the other post quantum.

Types

type PrivateKey

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

PrivateKey is the private key in hybrid signature scheme.

func (*PrivateKey) Equal

func (p *PrivateKey) Equal(key crypto.PrivateKey) bool

func (*PrivateKey) MarshalBinary

func (p *PrivateKey) MarshalBinary() ([]byte, error)

func (*PrivateKey) Public

func (p *PrivateKey) Public() crypto.PublicKey

func (*PrivateKey) Scheme

func (p *PrivateKey) Scheme() sign.Scheme

func (*PrivateKey) Sign

func (p *PrivateKey) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error)

func (*PrivateKey) UnmarshalBinary added in v0.0.11

func (p *PrivateKey) UnmarshalBinary(b []byte) error

type PublicKey

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

PublicKey is the public key in hybrid signature scheme.

func (*PublicKey) Equal

func (p *PublicKey) Equal(key crypto.PublicKey) bool

func (*PublicKey) MarshalBinary

func (p *PublicKey) MarshalBinary() ([]byte, error)

func (*PublicKey) MarshalText added in v0.0.10

func (p *PublicKey) MarshalText() (text []byte, err error)

func (*PublicKey) Scheme

func (p *PublicKey) Scheme() sign.Scheme

type Scheme

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

Scheme is for hybrid signature schemes.

func (*Scheme) DeriveKey

func (s *Scheme) DeriveKey(seed []byte) (sign.PublicKey, sign.PrivateKey)

func (*Scheme) GenerateKey

func (s *Scheme) GenerateKey() (sign.PublicKey, sign.PrivateKey, error)

func (*Scheme) Name

func (s *Scheme) Name() string

func (*Scheme) PrivateKeySize

func (s *Scheme) PrivateKeySize() int

func (*Scheme) PublicKeySize

func (s *Scheme) PublicKeySize() int

func (*Scheme) SeedSize

func (s *Scheme) SeedSize() int

func (*Scheme) Sign

func (s *Scheme) Sign(sk sign.PrivateKey, message []byte, opts *sign.SignatureOpts) []byte

func (*Scheme) SignatureSize

func (s *Scheme) SignatureSize() int

func (*Scheme) SupportsContext

func (s *Scheme) SupportsContext() bool

func (*Scheme) UnmarshalBinaryPrivateKey

func (s *Scheme) UnmarshalBinaryPrivateKey(b []byte) (sign.PrivateKey, error)

func (*Scheme) UnmarshalBinaryPublicKey

func (s *Scheme) UnmarshalBinaryPublicKey(b []byte) (sign.PublicKey, error)

func (*Scheme) Verify

func (s *Scheme) Verify(pk sign.PublicKey, message []byte, signature []byte, opts *sign.SignatureOpts) bool

Jump to

Keyboard shortcuts

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