Open gapisback opened 1 year ago
For Gramine, we can check all properties now and only rely on DCAP for signature checks. At this point, the enhancement is simply tp perform the signature checks ourselves.
9/25/204: Revisited with the team. This is a good thing to do, eventually, but is not a priority right now.
This is a low-priority feature ...
Even in future, thinking about Intel's push for TDX, ... we think that the quote infrastructure used for / by TDX is similar to that of SGX. So, whatever we do here might help us do similar stuff for TDX.
Design & implement CC-service to verify an SGX quote (for example, the one generated by Gramine) without using Intel enclaves or libraries
I've attached a copy of the Quote information I have. You may want to check if there is a later version.
The version received as a pdf attachment is from August, 2019. The latest version is here, Intel® Software Guard Extensions (Intel® SGX) Data Center Attestation Primitives: ECDSA Quote Library API, dd. April 2022.
A more recent one is found here, Intel_SGX_ECDSA_QuoteLibReference_DCAP_API.pdf, dd. March 2023.
As usual, do the work in a new branch. The directory will be
certifier_service/sgx_quote_verify
.Read the documentation and download the *.h files needed. Write a short document (<5 pages) describing the verification process. You can use the binary quote generated by gramine for the test case. I'm allocating a week for this (4/21) as an estimate but let me know it you think it's different when as you start the work. This should include a description of the algorithms, certificates, etc used in the standalone verification.
Write support functions to hash and verify the quote using openssl including the certificate chain. Write a test to check it. According to the docs, the cert chain is in the quote (but let me know if this is wrong). The he hardest part, given the somewhat contorted .h structure is figuring out what to hash. My estimate for this is another week (4/28).
Extract from the quote all the hardware properties. The extract should be done in the library. Write a test that prints out the relevant HW properties in the quote. Identify the ones you think we should check. My estimate, again, is about a week but is subject to change as we learn more.
Suggested implementation details of this CC-service support module:
certifier_service/sgx_quote_verify
.NOTE: Above content copied from an internal mail from John Manferdelli reg this dev-task.
Reference material (updated: 6/28/2023)