-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No encrypted storage for the TDX guest #4
Comments
It appears the only way to have access to the hardware key for encryption is through the SGX sealing API. Since we cannot run binaries compiled for the SGX target on a TDX VM, we need to use gramine (or something similar). Heres what dstack uses: https://github.com/kvinwang/gramine-sealing-key-provider and here is the PR which incorporates it: |
I am having difficultly using the Some things to bear in mind:
|
The memory used by a TDX enclave is encrypted using key derived from a hardware key which is inaccessible to the host. I had hoped / expected that the storage volume used by the enclave would also be encrypted in a similar way.
When setting up a TDX guest using qemu as described in the ubuntu tdx tutorial, i can see that the storage volume file (with
.qcow2
extension) is not encrypted.i know what with SGX there is a feature called 'sealing' which allows you to encrypt / decrypt values using the hardware key in order to have them persist outside of the enclave. But i can't find anything about whether this feature is available for tdx.
qemu-img
does have a built in encryption feature, but there is a note in the man page sayingThe use of encryption in qcow and qcow2 images is considered to be flawed by modern cryptography standards and suggesting alternatives such as the Linux dm-crypt / LUKS system
.Regardless of which software we use, there is a chicken and egg problem with where to store the encryption keys as they cannot be stored on the host.
We need disk encryption for 2 reasons:
entropy-tss
stores keyshares as well as secret keys used for authenticaion on disk, and these need to be inaccessible to the host operator. A workaround would be that we just don't store keyshares or secret keys on disk (and make sure to not use swapfiles). There is a proposal for that here. But this would mean that this secret data would not survive a server reset and would mean we need some quite big changes to our overall design to accommodate that.Some related links to projects:
The text was updated successfully, but these errors were encountered: