aws / aws-nitro-enclaves-nsm-api

This provides a library for interacting with the Nitro Secure Module, which provides Nitro Enclaves with attestation capability.
Apache License 2.0
62 stars 43 forks source link

Inconsistent user_data length #52

Open rillian opened 1 year ago

rillian commented 1 year ago

docs/attestation_process.md is inconsistent about the size of the optional private_key, user_data, and nonce fields. The Attribution Document Specification gives a range of 0..1024 bytes for each field, in agreement with this doc page. But later on, the "Check Content" section of Syntactic Validation gives 1..1024 for public_key and 0..512 for user_data and nonce.

Can we clarify with values are correct?

rillian commented 1 year ago

As far as enforcement goes, there doesn't seem to be a check on the individual field lengths, but this module, the python version, and the /dev/nsm kernel driver all impose an overall 4k limit on requests and 12k on responses. This seems consistent with the larger sizes for the optional fields in an attestation request.