Skip to main content

Module traits

Module traits 

Source
Expand description

Platform abstraction traits for SCP.

These four traits abstract device-specific capabilities behind Rust trait interfaces so that production implementations (Secure Enclave, Android Keystore) and testing implementations (in-memory) share the same API surface. See ADR-006 for the full platform adapter design.

§Traits

  • KeyCustody — Cryptographic key management (generation, signing, ECDH, pseudonym derivation)
  • DeviceAttestation — Device-level attestation tokens
  • Push — Push notification registration and handling
  • Storage — Persistent key-value byte storage

Structs§

DeviceAttestationToken
A device attestation token produced by DeviceAttestation::attest.
KeyHandle
Opaque handle to a cryptographic key managed by a KeyCustody implementation.
PseudonymKeypair
A deterministic pseudonym keypair derived from an identity key and a context ID via KeyCustody::derive_pseudonym.
PublicKey
A public key extracted from a KeyHandle.
PushToken
A push notification token returned by Push::register.
SharedSecret
A 32-byte X25519 shared secret produced by KeyCustody::dh_agree.
Signature
An Ed25519 signature produced by KeyCustody::sign.
WakeSignal
A wake signal produced by Push::handle_notification.

Enums§

CustodyType
The custody type for a given key, indicating where the key material is stored and how it is protected.
KeyType
The type of cryptographic key managed by a KeyHandle.

Traits§

DeviceAttestation
Device attestation trait.
KeyCustody
Cryptographic key management trait.
Push
Push notification trait.
Storage
Persistent key-value byte storage trait.