Module attestation_doc

Source
Expand description

Module for parsing and validating attestation documents from AWS Nitro Enclaves.

Structs§

PCRs
Reference implementation of the AWS attestation doc’s PCRs exposed at build time.

Traits§

PCRProvider
Trait to allow custom implementations of PCR-like types. This helps to make the per language bindings more idiomatic.

Functions§

decode_attestation_document
Takes a byte array and parses is as an AttestationDoc and CoseSign1
get_pcrs
Parses PCRs from an attestation doc
validate_cose_signature
Takes a public key and attestation doc in CoseSign1 form and returns a result based on it’s validity
validate_expected_challenge
Takes an AttestationDoc and expected challenge and compares them
validate_expected_nonce
Extracts the nonce embedded in the attestation doc, encodes it to base64 and compares it to the base64 encoded nonce given
validate_expected_pcrs
Parses the PCRs from the attestation doc and compares against the expected values