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

Separate the demo in multiple phases: key gen + sealing + quote gen, sign, verify #5

Open sbellem opened 3 years ago

sbellem commented 3 years ago

For demonstration purposes, it may be useful to clearly distinguish between the different phases:

  1. key generation, sealing, and quote generation (the quote is meant to include the public key)
  2. remote attestation verification with Intel (IAS) -- extraction of public key
  3. signature of data
  4. verification of the signed data, with the public key extracted out of the IAS report

Instead of using the public key that is written to file (secp256r1.pem) file to verify the signature, the demo should use the public key from the report data.

The remote attestation part plays a key role to establish trust in the public key, meaning that the public key was generated in an genuine enclave, with specific characteristics such as MRENCLAVE and MRSIGNER.

sbellem commented 3 years ago

Let's containerize the server and client to make the distinction between the different tasks involved clearer.

The server is responsible for executing the enclave-based application, which includes both trusted and untrusted code:

The client's main goal is to verify that it is interacting with a genuine enclave which is executed some trusted source code.

The first iteration of the prototype can use docker shared volumes for the communication between the server and client. A second iteration could implement a tiny & lightweight python-based HTTP server, mainly serving two endpoints: GET /quote & GET /sensordata.