Documentation
¶
Index ¶
- Constants
- func Encode(signer Signer) []byte
- func Format(signer multikey.Signer) string
- func GenerateIssuer() (multikey.Issuer, error)
- type Signer
- func (s Signer) Bytes() []byte
- func (s Signer) Code() multicodec.Code
- func (s Signer) KeyDID() did.DID
- func (s Signer) PrivateKey() any
- func (s Signer) PublicKey() any
- func (s Signer) Raw() []byte
- func (s Signer) Sign(msg []byte) []byte
- func (s Signer) SignatureAlgorithm() varsig.Algorithm
- func (s Signer) Verifier() ucan.Verifier
Constants ¶
const Code = multicodec.Code(0x131a)
Code is the Multicodec code for `mldsa44-priv`. It is not (yet) present in the go-multicodec table, so it is spelled out here to keep `did:key` and signer encodings identical to those produced before the `multikey` restructuring.
Variables ¶
This section is empty.
Functions ¶
func GenerateIssuer ¶
Types ¶
type Signer ¶
type Signer []byte
func Decode ¶
Decode decodes a buffer of an ML-DSA-44 signer multiformat varint (0x131a) + 32 byte ML-DSA-44 private key seed.
func FromRaw ¶
FromRaw takes raw 32 byte ML-DSA-44 private key seed bytes and tags with the ML-DSA-44 signer multiformat code, returning an ML-DSA-44 signer.
func Parse ¶
Parse parses a multibase encoded string containing an ML-DSA-44 signer multiformat varint (0x131a) + 32 byte ML-DSA-44 private key seed.
func (Signer) Code ¶
func (s Signer) Code() multicodec.Code
func (Signer) PrivateKey ¶
func (Signer) Sign ¶
Sign produces a deterministic ML-DSA-44 signature over msg. Determinism means signing the same message with the same key always yields the same signature.