x448

package
v0.0.23 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// GroupElementLength is the length of a ECDH group element in bytes.
	GroupElementLength = 56

	// PublicKeySize is the size of a serialized PublicKey in bytes.
	PublicKeySize = GroupElementLength

	// PrivateKeySize is the size of a serialized PrivateKey in bytes.
	PrivateKeySize = GroupElementLength
)

Variables

View Source
var (
	// ErrBlindDataSizeInvalid indicates that the blinding data size was invalid.
	ErrBlindDataSizeInvalid error = errors.New("x448: blinding data size invalid")
)

Functions

func Exp

func Exp(x, y *x448.Key) []byte

Exp returns the group element, the result of x^y, over the ECDH group.

func NewKeypair

func NewKeypair(rng io.Reader) (nike.PrivateKey, error)

func Scheme

func Scheme(rng io.Reader) *scheme

Scheme instantiates a new X448 scheme given a CSPRNG.

Types

type PrivateKey

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

func (*PrivateKey) Bytes

func (p *PrivateKey) Bytes() []byte

func (*PrivateKey) FromBytes

func (p *PrivateKey) FromBytes(data []byte) error

func (*PrivateKey) MarshalBinary

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

func (*PrivateKey) MarshalText

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

func (*PrivateKey) Public

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

func (*PrivateKey) Reset

func (p *PrivateKey) Reset()

func (*PrivateKey) UnmarshalBinary

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

func (*PrivateKey) UnmarshalText

func (p *PrivateKey) UnmarshalText(data []byte) error

type PublicKey

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

func (*PublicKey) Blind

func (p *PublicKey) Blind(blindingFactor nike.PrivateKey) error

func (*PublicKey) Bytes

func (p *PublicKey) Bytes() []byte

func (*PublicKey) FromBytes

func (p *PublicKey) FromBytes(data []byte) error

func (*PublicKey) MarshalBinary

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

func (*PublicKey) MarshalText

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

func (*PublicKey) Reset

func (p *PublicKey) Reset()

func (*PublicKey) UnmarshalBinary

func (p *PublicKey) UnmarshalBinary(data []byte) error

func (*PublicKey) UnmarshalText

func (p *PublicKey) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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