Module signature_verify_in_memory_keys

Source
Expand description

Mechanism for verifying signatures with multiple in-memory keys.

This capsule should be used when a system wants to be able to verify signatures with multiple keys and the underlying signature verifier stores keys in memory and only stores one key at a time.

This capsule stores NUM_KEYS buffers holding keys. Users should construct this capsule and then call init_key() NUM_KEYS times to set all of the internal keys to store.

The intended layering with this capsule looks like this:

  ┌───────────────────────────────────────┐
  │                                       │
  │         Signature User                │
  │ (e.g., `AppCheckerSignature`)         │
  │                                       │
  └───────────────────────────────────────┘
    SignatureVerify + SelectKey      ^
  ┌─────────────────────────────┐    │
  │                             │    │
  │ SignatureVerifyInMemoryKeys │    │SignatureVerifyClient
  │    (this module)            │    │
  │                             │    │
  └─────────────────────────────┘    │
    SignatureVerify + SetKeyBySlice  │
  ┌───────────────────────────────────────┐
  │                                       │
  │         Signature Verifier            │
  │  (e.g., `EcdsaP256SignatureVerifier`) │
  │                                       │
  └───────────────────────────────────────┘

Structs§

SignatureVerifyInMemoryKeys