rite-sdk 0.7.0

Backend traits and domain types for the Rite cryptographic key ceremony toolkit
Documentation
//! Rite SDK: backend abstractions for cryptographic ceremony execution.
//!
//! `rite-sdk` is the stable interface layer between the ceremony runtime and
//! backend implementations. It defines the trait hierarchy, data types, and
//! error taxonomy that all backends must implement.
//!
//! # Implementing a backend
//!
//! Implement [`Backend`] and any combination of capability traits matching
//! your hardware or software capabilities. Use the [`backend_capabilities!`]
//! macro to reduce boilerplate for the upcasting methods.
//!
//! # Trait composition
//!
//! Backends implement only the traits matching their capabilities:
//!
//! | Backend type      | Typical capabilities                          |
//! |-------------------|-----------------------------------------------|
//! | Software          | `KeyStore + Sign + KeyTransport`              |
//! | YubiKey PIV       | `KeyStore + Sign + Piv + Yubikey`             |
//! | PKCS#11 HSM       | `KeyStore + Sign + KeyTransport + Pkcs11`     |
//! | TPM 2.0           | `KeyStore + Sign + Tpm`                       |
//! | Mock (testing)    | All traits                                    |

#![warn(missing_docs)]

mod backend;
pub mod cms;
mod der;
mod key_material;
mod types;

pub use key_material::{CertificateDer, PublicKeyDer};

pub use backend::{
    AttestationBackend, Backend, BackendError, CertStoreBackend, KeyStoreBackend,
    KeyTransportBackend, PivBackend, Pkcs11AdminBackend, Pkcs11Backend, RandomBackend,
    Retriability, SignBackend, TpmBackend, VerifyBackend, YubikeyBackend,
};

pub use types::{
    Attestation, AttestationKind, BackendConfig, CertRef, DataKey, DeviceInfo, EncryptedData,
    IncoherentContainer, KeyAlgorithm, KeyCheckValue, KeyId, KeyMetadata, KeyPolicy, KeyProtection,
    KeySecurityAttributes, KeySpec, KeyUsages, Oid, ParseError, PcrValue, PivDeviceInfo,
    PivKeyOrigin, PivPinPolicy, PivSlot, PivSlotInfo, PivTouchPolicy, Pkcs11Mechanism,
    Pkcs11TokenFlags, Pkcs11TokenInfo, RecipientInfoKind, SignAlgorithm, TpmInfo, WrapDescription,
    WrapScheme, WrappedKey, YubikeySlotMetadata, oid,
};