Picture a cloud provider renting two VMs to a customer. Suppose the customer wants to check the two VMs are running on different physical computers, despite the cloud provider perhaps trying to trick the customer.
Both machines provide SGX and have an enabled TPM.
My first thought was to use remote attestation and compare the keys used, since each physical machine would have a unique Endorsement Key installed at the factory. However, the SGX documentation clearly states that remote attestation uses group keys for privacy, so the customer wouldn't be able to tell whether the two remote attestations were signed by different hardware.
Suppose I already established a secure enclave on each machine.
Would it be possible to read the EK public key (or its hash) from within the enclave, put that in the data section of the quote, and then send a remote attestation with that? Then the remote attestation would prove that the target machine ran the code as given, and since the code reads and returns the EK we'd have the EK too.
This related question suggests that just using the TPM doesn't work (indeed it doesn't), but leaves me wondering whether we may be able to use SGX to finish the job.
So my questions are:
1) Would the above actually work?
2) If yes, can you help me find convincing documentation that confirms this is possible?
3) If not, is there something else I can do?