Skip to main content

Crate subduction_crypto

Crate subduction_crypto 

Source
Expand description

Cryptographic types for Subduction.

This crate provides signed payload types and verification witnesses:

  • [Signed<T>] — A payload with an Ed25519 signature (unverified)
  • [VerifiedSignature<T>] — Witness that the signature is valid
  • [VerifiedMeta<T>] — Witness that signature is valid AND blob matches metadata
  • [Signer<K>] — Trait for signing data with an ed25519 key
  • Nonce — Random nonce for replay protection

§Type-State Flow

Local:    T  ──seal──►  VerifiedSignature<T>  ──into_signed──►  Signed<T> (wire)
Remote:   Signed<T>  ──try_verify──►  VerifiedSignature<T>  ──with_blob──►  VerifiedMeta<T>
Storage:  Signed<T>  ──decode_payload──►  T  (trusted, no wrapper)

§Crate Organization

  • nonce — Random nonces for replay protection
  • signed — The Signed<T> envelope and related types
  • signer — The Signer<K> trait for signing operations
  • verified_meta — The VerifiedMeta<T> witness (includes blob verification)
  • verified_signature — The VerifiedSignature<T> witness

Modules§

nonce
Random nonce for challenge uniqueness.
signed
Signed payloads.
signer
Signing trait for cryptographic key management abstraction.
verified_meta
A payload whose signature is valid AND whose blob matches the claimed metadata.
verified_signature
A payload whose signature has been verified.