On Mon, Jun 29, 2020 at 06:02:42PM +0200, Borislav Petkov wrote: > On Thu, Jun 18, 2020 at 01:08:34AM +0300, Jarkko Sakkinen wrote: > > Provisioning Certification Enclave (PCE), the root of trust for other > > enclaves, generates a signing key from a fused key called Provisioning > > Certification Key. PCE can then use this key to certify an attestation key > > of a QE, e.g. we get the chain of trust down to the hardware if the Intel > > What's a QE? > > I don't see this acronym resolved anywhere in the whole patchset. Quoting Enclave. > > > signed PCE is used. > > > > To use the needed keys, ATTRIBUTE.PROVISIONKEY is required but should be > > only allowed for those who actually need it so that only the trusted > > parties can certify QE's. > > > > Obviously the attestation service should know the public key of the used > > PCE and that way detect illegit attestation, but whitelisting the legit > > users still adds an additional layer of defence. > > > > Add new device file called /dev/sgx/provision. The sole purpose of this > > file is to provide file descriptors that act as privilege tokens to allow > > to build enclaves with ATTRIBUTE.PROVISIONKEY set. A new ioctl called > > SGX_IOC_ENCLAVE_SET_ATTRIBUTE is used to assign this token to an enclave. > > So I'm sure I'm missing something here: what controls which > enclave can open /dev/sgx/provision and thus pass the FD to > SGX_IOC_ENCLAVE_SET_ATTRIBUTE? > > And in general, how does that whole flow look like: what calls > SGX_IOC_ENCLAVE_SET_ATTRIBUTE when? I've documented it in the Remote Attestation section: https://github.com/jsakkine-intel/linux-sgx/blob/master/Documentation/x86/sgx.rst /Jarkko