Proving enclave functionality #3269
-
I'm currently trying to research the SGX enclaves specifically and I got a better understanding what actually happens in the CPU/RAM from reading the CCF whitepaper and various internet sources. I've received the question on whether there is any proof to ensure that everything works as stated a couple of times, to which I personally really didn't have any, other than trusting the source and taking it as it is. There definitely is a valid reason not to be guillible, trusting is great but confirming is better after all. Are there any tests I can execute locally to prove it's functionality? I had in mind to indentify enclave memory ranges, ensure system calls are being blocked and perhaps read the encrypted data from RAM? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
A great question! Trusted computation has to ultimately rely on some trusted root. For SGX deployment, that means trusting that an attestation could only be produced on a chip that Intel has correctly built and commissioned. We think that's roughly the minimal viable root of trust, but obviously it's still pretty large! So in terms of confirming that the CCF node you're talking to is running inside SGX, you should ask for its quote through one of the built-in endpoints, and confirm that you trust that quote (because it is signed/endorsed transitively by an Intel root cert). The idea is that you trust your local network stack, and that produces an encrypted TLS channel, which terminates in a node claiming to run inside SGX, and running a code ID that doesn't leak that TLS termination elsewhere. So if you believe the quote returned is a valid attestation, and valid attestations can only come from secure nodes, then you're talking to a secure node. For the sake of manual inspection, I think there's also some probes you could run on a machine to confirm that it really is running an SGX enclave, though I don't know what they are and then you're still trusting whatever stack runs that probe (it's probably written by Intel!). I don't recommend trying to confirm that memory is encrypted. If you can ask the SGX driver if it thinks it is managing and encrypting range, that might be useful (and similar to the kind of probe mentioned above). But inspecting the range yourself and trying to distinguish encrypted data from random junk or compressed pages, is hard-to-impossible. |
Beta Was this translation helpful? Give feedback.
A great question! Trusted computation has to ultimately rely on some trusted root. For SGX deployment, that means trusting that an attestation could only be produced on a chip that Intel has correctly built and commissioned. We think that's roughly the minimal viable root of trust, but obviously it's still pretty large!
So in terms of confirming that the CCF node you're talking to is running inside SGX, you should ask for its quote through one of the built-in endpoints, and confirm that you trust that quote (because it is signed/endorsed transitively by an Intel root cert). The idea is that you trust your local network stack, and that produces an encrypted TLS channel, which terminates in…