corim
Concise Reference Integrity Manifest (CoRIM) — Rust implementation of draft-ietf-rats-corim-10.
CBOR-native Rust types for the CoRIM / CoMID CDDL schema, a builder API, validation/appraisal logic, and signed CoRIM (COSE_Sign1) support for Remote Attestation (RATS) Endorsements and Reference Values.
Features
- Full CDDL coverage —
corim-map, CoMID, CoTL, all 9 triple types,measurement-values-mapwith all fields - Signed CoRIM (
#6.18) — decode, validate, construct (attached + detached); no crypto dependency - Zero-dependency CBOR — built-in encoder/decoder, deterministic per RFC 8949 §4.2.1
no_stdsupport —#![no_std]+alloc;stdfeature (default) addsSystemTime-based validation- Builder API —
ComidBuilder,CotlBuilder,CorimBuilder,SignedCorimBuilder. Opt-in environment catalog (declare_env/EnvRef/add_*_for) lets oneEnvironmentMapbe shared across triples without duplication, andstrict_linksadds a cross-triple env-anchoring lint. - Validation & Appraisal — reference value matching (§9.3), conditional endorsement series (§9.3.4)
- Profile framework —
Profiletrait,ProfileRegistry, and aMatchContextfor time-aware comparators let downstream crates plug in CoRIM profiles that define their own tags ormeasurement-values-mapextras. The first-party Intel profile ships under theprofile-intelfeature flag. - CoSWID — structured types per RFC 9393 with co-constraint validation
- Optional JSON —
jsonfeature gate forValue ↔ serde_json::Valueconversion - TCG / NVIDIA decode interop — accepts the legacy
#6.500/#6.502outer wrappers, barecorim-mappayloads, and TCG-style#6.506(map)CoMID nesting seen in real-world signed CoRIMs (notably NVIDIA NIC firmware). Decode-only; encoders always emit draft-10 wire format.
Quick start
use ;
use ;
use CorimId;
use ;
use ;
use ReferenceTriple;
let env = EnvironmentMap ;
let meas = MeasurementMap ;
let comid = new
.add_reference_triple
.build
.unwrap;
let bytes = new
.add_comid_tag.unwrap
.build_bytes.unwrap;
let = decode_and_validate.unwrap;
Feature flags
| Feature | Default | Description |
|---|---|---|
std |
✅ | Enables SystemTime-based validation, std::error::Error impls |
json |
Adds JSON serialization (implies std) |
|
profile-intel |
Registers the Intel CoRIM profile (corim::profile::intel) including the #6.60010 expression decoder. Opt-in; no extra dependencies. |
For no_std, disable default features:
[]
= { = "0.1", = false }
Compliance
| Feature | Status |
|---|---|
CoMID (§5) — #6.506 |
✅ Fully modeled |
CoTL (§6) — #6.508 |
✅ Fully modeled |
CoSWID (RFC 9393) — #6.505 |
✅ Structured core subset |
Signed CoRIM (§4.2) — #6.18 |
✅ Decode, validate, construct |
no_std + alloc |
✅ Library compiles without std |