package

mldsa

crypto/internal/fips140/v1.26.0/mldsa

Constants

R, RRsource

const (
	R  = 4294967296 // 2³²
	RR = 2365951    // R² mod q, aka R in the Montgomery domain

)

Functions

Signsource

func Sign(priv *PrivateKey, msg []byte, context string) ([]byte, error)

Verifysource

func Verify(pub *PublicKey, msg, sig []byte, context string) error

type PrivateKey source

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

Constructors

TestingOnlyNewPrivateKeyFromSemiExpandedsource

func TestingOnlyNewPrivateKeyFromSemiExpanded(sk []byte) (*PrivateKey, error)

TestingOnlyNewPrivateKeyFromSemiExpanded creates a PrivateKey from a semi-expanded private key encoding, for testing purposes. It rejects inconsistent keys.

PrivateKey.Bytes must NOT be called on the resulting key, as it will produce a random value.

Methods

Equalsource

func (priv *PrivateKey) Equal(x *PrivateKey) bool

type PublicKey source

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

Constructors

Methods

Equalsource

func (pub *PublicKey) Equal(x *PublicKey) bool