I'm talking about the ability to safely run a virtual machine on a physical device that is not trusted. It is necessary that the owner can not access the data that the virtual machine operates on. I am interested in what theoretical or practical implementations exist without special hardware.

I know about homomorphic computations (this in theory fully satisfies my question), but for now it's incredibly slow. It will take many years before the protocols of homomorphic calculations just approach application in practice.

I also read about Intel SGX, which implements enclaves. The RAM stores only encrypted data, which is decrypted at the input to the processor and is again encrypted at the output. The disadvantage of Intel SGX is that you need special hardware. How could you do something like this without a special hardware? How can we store a key for decrypting data from RAM so that the owner of this physical device can not recognize this key?

  • $\begingroup$ There is no way to effectively do this without special hardware, unfortunately. $\endgroup$
    – forest
    Commented Jul 21, 2018 at 2:06
  • $\begingroup$ Can you be more specific about your application? Not all homomorphic algorithms are slow. The "fully" (ring) homomorphic ones that give AND and XOR gates at the bit level to implement Turing complete functions, may be slow, but you might not need that. Group or "somewhat" homomorphic algorithms can operate on encrypted data, are relatively fast, and are applicable to a wide range of applications, such as search and retrieval (see Ostrovsky and Skeith, III, 2005), sensitive polynomial evaluation, and other applications. What are you trying to protect? $\endgroup$
    – Russ
    Commented Aug 3, 2018 at 18:23

1 Answer 1


If the VM actually has anything that needs protection, running the VM on untrusted hosts is not secure (period). There is nothing that will change that.

Going to homomorphic encryptions etc. implies that even the VM doesn't know any secrets, only the source of the data (outside of VM and host) does. In this case, having a VM or not isn't even relevant.
There are of course still problems with the authenticity of the results etc. - just encrypting is never enough.

Using Intel SGX from within VMs relies on the support/cooperation of the VM software - meaning, it might be useful for separating VMs fom each other, but it can not help VMS against their malicious host.
Given that VMs are, well, virtualized, any hardware support is useless in your scenario. If the host and the virtualization software can't be trusted, your VM is not secure.

  • $\begingroup$ -1 SGX is specifically designed to protect from a malicious host. Yes, you do have to trust the CPU, but you do not need to trust the software on the host, even running as ring 0. $\endgroup$
    – forest
    Commented Jul 21, 2018 at 2:04
  • $\begingroup$ @forest Mind giving me a link/hint why this should be secure? Eg. because nothing prevents a VM software from emulating the CPU itself, instead of passing commands through? "Being designed for" is not the same as sucessful. ... (And, on another note, there are several working attacks on SGX) $\endgroup$
    – deviantfan
    Commented Jul 21, 2018 at 10:23
  • $\begingroup$ Actually the VM software cannot emulate the CPU due to SGX having an internal certificate. SGX is precisely designed such that you cannot emulate the enclave. I wrote a bit about it in an answer on Sec.SE. It's similar to how a TPM uses an Endorsement Key. If it were the case that just anyone could pretend to be a secure enclave, SGX would be completely useless, even in theory. $\endgroup$
    – forest
    Commented Jul 22, 2018 at 0:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.