-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Design common attestation / crypto API #412
Comments
a few thoughts on the APIs and for which language:
|
A draft implementation of the attestation mechanism is here. The mechanism requires the spid as input to the enclave, and then uses the following ocalls:
|
// creates an attestation evidence; the evidence_request includes all the form of evidence (EPID/DCAP), the quote, and additional information required to complete the evidence request
void ocall_create_evidence(
[in] evidence_request
[out] evidence
); |
assuming the quote is the sgx quote, presumably there will also be an additional ocall for the attestation report (as this is the evidence we need as output of this module)? More importantly, though, the edls seem more the internals of the module/library, what would be the external api? Presumably something like
and on verification side something like
(AttestedData is the protobuf from our uml spec, with some small changes from #420; bytearray is a placeholder for whatever byte array type is best in c++; ad could be input or output in verify_attestation_evidence.) |
In above comment, i've actually overlooked one case and that is verifying "our" endorsement signature which we also have to do in the validation plugins: Given our custom encoding of the parameters, i think though the same argument holds as for tx/query request/response encryption/decryption and a higher level api |
btw: currently fpc currently uses CMAC which doesn't exist in pdo crypto. That said, pdo has HMAC ( |
For this to work with SGX EPID, we would need to pre-load the output of the |
The attestation report (i.e., the output of
The attached code has an
and another method that looks like:
Not done yet. |
What i meant by "attestation report" is the report returned from IAS. This is the attestation evidence we need in our protocol, not the (epid) quote? Or is the IAS attestation report what you mean when you refer to "quote"? (This would seem terminology-wise a bit confusing but would work with the ocalls you mentioned above.) If not, then it's 100% not clear to me how you see where/how the IAS interaction is handled below to retrieve the IAS report (which should be part of the attestation evidence API?) An easy way of course is to add a third ocall after the one init and get_quote you have which does IAS interaction and returns back the report protobuf instead of the quote protobuf below?
|
Description
This work items defines a common attestation / crypto API that can be used in various components. The main goal of this task is to reduce redundant code and provide a single implementation usable from c/cc+ and go-based components.
The implementation is based on the PDO crypto library which we have already linked in the project with PR pdo-crypto-lib integration #337
The main focus lies on the c/c++ interface as exposed to the FPC components and implemented by the PDO crypto lib. Ideally, we have this abstraction in case we need to change the underlying implementation and remove the PDO crypto dependency. Additionally, a go interface is designed and its implementation uses cgo to call the corresponding c/c++ interface.
Required functionality:
TODOs:
Some ground work has been done already:
Other related issues:
The text was updated successfully, but these errors were encountered: