SUIT Validator
A Rust implementation of the SUIT (Software Updates for Internet of Things) manifest parser with cryptographic signature verification.
This implementation targets draft-ietf-suit-manifest-34 of the SUIT manifest specification.
Features
no_stdCompatible: Designed for embedded systems and IoT devices- Safe CBOR Decoding: Type-safe manifest parsing with zero unsafe code
- Signature Verification: COSE signatures validated against trusted keys
- Custom Handlers: Flexible trait-based handler system for manifest processing
- Advanced Inspections: Direct access to CBOR pairs via
PairViewfor manual validation
Quick Start
use GenericStartHandler;
use SuitError;
use ;
// Build trusted keys
let mut keys = try_new?;
let mut key = new;
key.alg;
key.x?;
key.y?;
keys.push_key?;
let keys_bytes = keys.into_bytes?;
// Decode manifest
let data: & = /* CBOR encoded SUIT manifest */;
let mut handler = GenericStartHandler ;
suit_decode?;
Backend Cryptography
By default, suit_validator uses the [cose_minicbor] crate as its cryptographic backend.
The default enabled features include:
hmac— HMAC-based signaturesdecrypt— COSE decryption supportes256— ECDSA P-256 signatures (ES256)sha256— SHA-256 digest computation
You can create a CoseCrypto instance with:
use CoseCrypto;
let keys_bytes = vec!; // CBOR CoseKeySet for testing
let crypto = new;
Manifest Structure
SUIT_Envelope (Tag 107)
├── SUIT_Authentication
│ ├── COSE_Sign1 (signature)
│ └── SuitDigest (SHA-256)
├── SUIT_Manifest (Tag 1070)
│ ├── version
│ ├── sequence-number
│ ├── common
│ │ └── shared-sequence
│ ├── invoke
│ ├── install
│ ├── fetch
│ ├── validate
│ └── load
└── severable-package-members
Implementation
For custom manifest processing, implement handler::SuitStartHandler:
;
suit_decode?;
For advanced CBOR pair inspection within handlers, use PairView to iterate and selectively decode manifest elements.
References
License
See LICENSE file.