Skip to main content

Module algorithm

Module algorithm 

Source
Expand description

Algorithm identifiers for mkit signing.

Uses COSE numeric IDs from the IANA registry (https://www.iana.org/assignments/cose/cose.xhtml) so clients on different platforms can interop at the wire:

  • Ed25519 — COSE -19 (fully-specified EdDSA w/ Ed25519). The default mkit signer algorithm.
  • Secp256k1 — COSE -47 (ES256K, secp256k1 + SHA-256). Used by wallet / browser-crypto clients.
  • P256 — COSE -7 (ES256, P-256 + SHA-256). Used by iOS Secure Enclave and WebAuthn clients.

The canonical keyid shape is "<prefix>:<hex-pubkey>" where <prefix> is per-algorithm (Algorithm::prefix). The legacy blake3: prefix is accepted by Algorithm::from_keyid and maps to Ed25519 for backward compatibility with attestations produced before the multi-algorithm split.

Structs§

UnknownAlgorithm
Error returned by <Algorithm as FromStr>::from_str for an unknown prefix. Carries the offending string so callers can surface it.

Enums§

Algorithm
Signing algorithm. One variant per supported (curve, hash) pair.