sbellem / sgx-iot

Intel SGX code sample: Gateway Key Provisioning and Secure Signing. From https://software.intel.com/content/www/us/en/develop/articles/code-sample-gateway-key-provisioning-and-secure-signing-using-intel-software-guard.html.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Add public key in a quote for remote attestation #3

Closed sbellem closed 3 years ago

sbellem commented 3 years ago

The public key must be added in the report data structure sgx_report_data_t. Not sure what is the "best" encoding to use, probably DER. Must test the encoding/decoding to make sure that when retrieved from the quote & remote attestation verification report it is recoverable, in the PEM format.

See https://holtstrom.com/michael/tools/asn1decoder.php ... perhaps, if that helps to test in the process of working on this.

sbellem commented 3 years ago

Try using https://www.openssl.org/docs/man1.1.1/man3/BN_bn2hex.html to store x and y coordinates in report data.

sbellem commented 3 years ago

Putting the X and Y coordinates, uncompressed, works.