Skip to main content

Module signature

Module signature 

Source
Expand description

The signature primitive kind: asymmetric signing and verification.

This interface is algorithm-agnostic. Per-algorithm interfaces mint keys bound to their algorithm; every operation hangs off a key resource.

The public and private halves are distinct resource types, split by secrecy: a component holding only a verifying-key provably cannot sign. Minting is likewise split into per-algorithm -verify and -sign interfaces, so a provider can serve verification for an algorithm whose signing it declines to host (see README.md, “Timing-channel policy”).

There is deliberately no way to derive a verifying-key from a signing-key: generate-key returns the pair, and importers supply the public half via import-verifying-key-raw. See README.md, “Design notes”.

The streaming contract in README.md applies to sign and verify.

Structs§

SigningKey
A private key. sign is one-shot on the immutable key, mirroring mac-key.sign. The extractability contract in README.md applies.
SigningKeyOptions
Mint-time policy for a signing-key. Grants nothing by default; see README.md, “Key-options contract”. can-sign is the sole usage today (the public/private resource split already separates sign from verify structurally); the resource carries extractable and receives future private-key usages additively.
VerifyingKey
A public key: verification only, secret-free.

Type Aliases§

Error
WrapInput