| Crates.io | nitro_attest |
| lib.rs | nitro_attest |
| version | 0.2.0 |
| created_at | 2025-02-24 08:43:17.801739+00 |
| updated_at | 2025-02-24 08:43:17.801739+00 |
| description | Parse and validate Nitro Enclave attestation documents |
| homepage | |
| repository | https://github.com/aws-nitro-enclaves/nitro-attest |
| max_upload_size | |
| id | 1567220 |
| size | 93,737 |
Attestation document builder, parser and verifier for AWS Nitro Enclaves. Tested to work also in wasm32-unknown-unknown.
It performs the following verifications, following the guidance in AWS Nitro Enclaves documentation:
build.rs for bootstrapping)ECDSA_WITH_SHA384) for certificate chainThe crate uses tracing with fields appropriate for usage in web contexts such as e.g. logging to end users with console.log.
use nitro_attest::{AttestationDoc, UnparsedAttestationDoc};
use time::OffsetDateTime;
...
let doc: &[u8] = ...;
let doc: UnparsedAttestationDoc = doc.into();
let doc = doc.parse_and_verify(OffsetDateTime::now_utc()).unwrap();
println!("{:?}", doc.public_key);
When building with the builder feature, the crate can generate synthetic attestation documents for testing purposes.
Certificate chains in test attestation documents originate from the "eu-central-1" region. Certificate chains have the following differences when compared to the official certificates:
rcgen crateNote: starting from the instance-level certificate, the state name is "Washington" instead of "WA". This is an official inconsistency.
rcgen crateIn leaf certificate the following differences apply: