-
Notifications
You must be signed in to change notification settings - Fork 98
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
PPID decryption tool #653
base: master
Are you sure you want to change the base?
PPID decryption tool #653
Conversation
- added root makefile
- added pce enclave make file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intel-sgx/ppid-decryption-tool
The tool's purpose is not to decrypt the PPID. That the PCE encrypts the PPID prior to export is an internal detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be "ppid-export-tool" then ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll continue reviewing when these comments have been addressed
goto CLEANUP; | ||
} | ||
|
||
sgx_status = ide_get_pce_encrypt_key(id_enclave_eid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hard to follow. Can you ensure the ppid enclave has one entrypoint: get_plaintext_ppid
that's called here. Whenever there's more info needed from the pce enclave, the ppid enclave can issues ocalls (i.e., calls to userspace, that in turn calls into the pce enclave). These ocalls of the ppid enclave need to be specified in the untrusted
section in the edl file. See here as an example. After that a lot of the defines and variables can be removed from this main file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember you were telling me that you can't call one enclave inside the other.
Can you add a README file in your PR which includes some of the details mentioned in the PR description? It would be helpful for anyone who is new to this and provides a simple introduction to this tool. |
- alphabetize - added function comments
This PR adds a tool to decrypt
PPID
(Platform Provisioning ID) from aPCE
(Provisioning Certification) enclave. The idea is based on the existing tool from Intel -PCKRetrievalTool
which retrieves platform-related info fromPCE
, but forPPID
the tool encrypts the resulting data. To solve this we create 2 functions that create anRSA
key-pair from constant parameters that we control and decrypt the resultingPPID
.Project modules:
ID
enclave. Contains functionality to create a pair of RSA keys forPCE
enclave andPPID
decryption function which is also a part ofID
enclave. The functionality of this module is placed inside an enclave so that no adversary can pull RSA parameters or private key we use to decrypt thePPID
;PCE
enclave. Contains functionality to returnPPID
in encrypted form. Compiled C code for this enclave comes directly from Intel in the form of a prebuiltso
file. To connect it to our code we have to provide an enclave definition file (.edl
) and produce aC wrapper using
sgx_edger8r
tool;Main.c
file in the root of the project. Entry point of the program, it connects 2 enclaves above together and prints the decryptedPPID
to the console.Additional info:
PPID
,PCE
and the whole process it fits into which is calledDCAP
can be found in the following link:https://docs.enclaive.cloud/confidential-cloud/technology-in-depth/intel-sgx/technology/concepts/dcap-attestation-framework
PCKRetrievalTool
link: https://github.com/intel/SGXDataCenterAttestationPrimitives/tree/main/tools/PCKRetrievalTool