This directory contains the software-based reference implementation of the SPDM certificate store for the AST1060-EVB platform. It is a platform-specific implementation, not a generic service.
The certificate store is platform-dependent because:
Hardware Integration - Future implementations will use:
Security Requirements - Key material storage is deeply tied to:
Not Uniform Across Platforms - Different targets will have:
This implementation is intentionally simple to serve as a reference:
When implementing hardware-backed versions for other platforms:
Replace static arrays with hardware storage:
// Instead of: static SLOT_0_PRIVATE_KEY: [u8; 48] = [0xCC; 48]; // Use platform-specific key storage: fn get_private_key(slot_id: u8) -> Result<&[u8; 48], Error> { // Read from OTP, HSM, or secure storage platform::read_secure_key(slot_id) }
Use hardware accelerators when available:
fn sign_hash(&self, slot_id: u8, hash: &[u8], signature: &mut [u8]) -> Result<()> { // Option 1: Hardware crypto engine if let Some(hw_crypto) = platform::get_hw_crypto() { hw_crypto.ecdsa_sign(slot_id, hash, signature)?; } // Option 2: Fall back to IPC else { self.crypto.ecdsa_p384_sign(&key, hash)?; } Ok(()) }
Implement platform-specific provisioning:
// Runtime provisioning via secure boot or manufacturing mode impl Ast1060CertStore { pub fn provision_slot(&mut self, slot_id: u8, cert_chain: &[u8], private_key: &[u8]) -> Result<()> { platform::write_secure_storage(slot_id, cert_chain, private_key)?; platform::lock_storage(slot_id)?; Ok(()) } }
This library is built as part of userspace applications:
# Example: SPDM server build rust_binary( name = "spdm_server", deps = [ "//target/ast1060-evb/cert-store:cert_store", # ... other deps ], )
Note: Cannot be built standalone due to crypto_client dependency on pw_kernel/userspace. This is correct - it's meant to be used by applications, not tested in isolation.
Create test applications that:
sign_hash() and verify signatureFor hardware-backed implementations:
⚠️ NOT FOR PRODUCTION USE - This implementation:
For production deployment:
Key Protection
Certificate Validation
Provisioning Security
target/ast1060-evb/cert-store/ ├── src/ │ └── lib.rs # Implementation ├── BUILD.bazel # Bazel build config ├── README.md # User documentation ├── IMPLEMENTATION.md # Implementation details └── DESIGN.md # This file (architecture)
/services/crypto/ - Provides ECDSA signing via IPC/services/spdm/hash/ - Hash operations (service, not target-specific)/services/spdm/rng/ - Random number generation (service, not target-specific)/services/spdm/transport-mctp/ - Transport layer (service)When migrating to hardware-backed storage:
Phase 1: Keep Software Implementation
Phase 2: Feature Parity
Phase 3: Production Switch
Licensed under the Apache-2.0 license.