Let's say we have some very sensitive personal files. At all costs, we do not want any other pair of eyeballs to gaze upon them. We need these sensitive files to be secure and available.

So, we have a bright idea: encrypt them and put them in the Cloud.

What side-channel attacks, if any, are specific to Cloud storage?

For example, could various Cloud-storage providers accidentally introduce weaknesses?

  • $\begingroup$ @kelalaka I am quite sure that you would make excellent points in a full answer. You have already covered a lot of ground. $\endgroup$ – Patriot Feb 22 at 0:31
  • $\begingroup$ Not a great answer, maybe I'll update it later. Or someone writes a companion answer, too. $\endgroup$ – kelalaka Feb 22 at 1:23
  • 1
    $\begingroup$ Please define better how the info must be "available", and if "at all costs" includes being able to access the information only on a dedicated machine. If yes, what's wrong with keeping the information encrypted and signed anytime it's not on that machine, which solves all problems of attacks in the Cloud ? If no, you need a plan to prevent trojanizing the machine used to access the sensitive information. And when you have that, what (like, need to search remotely) prevents using that as-good-as-dedicated machine to implement the "encrypted and signed" solution? $\endgroup$ – fgrieu Feb 22 at 7:59
  • $\begingroup$ @fgrieu Thank you. I see your point. Being able to access the information from a single, dedicated machine is the plan, and that would be available enough. You caught my implied meaning when I used "at all costs"--that Cloud storage is not worth the risk when the data is extraordinarily sensitive. If we do not want anyone else to see such data, then, to my mind, we should keep it away from the Internet and the Cloud in a virgin, air-gapped machine, encrypted and signed, with no network interface of any kind whatsoever. $\endgroup$ – Patriot Feb 22 at 8:29
  • 1
    $\begingroup$ I think this might be related and interesting: security.stackexchange.com/questions/158139/… $\endgroup$ – CL. Feb 22 at 9:44

The cloud trend brought its problems. While in the classical system your servers were near to you, so the side-channel capability was limited. They were mostly on the smart-card systems where the card reader is malicious.

There are side-channel attacks on the cloud if the attacker can co-locate with you for this you need to use a shared machine to reduce your cost. Co-locating is a real problem since you are not selecting your cloud machine when you use shared hardware where virtualization happens.


Assume the attacker located you, so both you and the attacker use the same hardware. What they can do? Cache-attack on the AES encryption. This attack works if you encrypt your files on the server and use software AES (not AES-NI) that was using T tables for the encryption.

During your encryption the attacker runs their process, fills all of the cache lines, waits, your AES runs, and they enter again, then they check the cache lines. If a line still has attacker's data this implies the cache line is not used during the encryption, if changed then it is used during the encryption. Cache hit and cache miss. After many many steps, the key is extracted. How cache works see B degnan's answer.

Some articles;

Now the above works if you encrypt on the cloud and use software AES.


The aim was to eliminate copies of the data in the memory so that the cloud provider can reduce the cost, and we have another attack vector.

This helps the attacker to determine whats is going on with the neighbors ( on the shared machine).

Spectre and Meltdown

Whereas Meltdown allows unauthorized applications to read from privileged memory to obtain sensitive data from processes running on the same cloud server, Spectre can allow malicious programs to induce a hypervisor to transmit the data to a guest system running on top of it.

Spectre is the thread to the shared hardware with hypervisor and patching the Spectre is not an easy job.

If you encrypt locally and use the cloud only as a storage service, then this means you don't process your data then you are fine from this attack.

But if you want the encryption on the server, this brings problems, you may be lost your encryption key. To mitigate this, some cloud providers provide HSM on the cloud those are useful mostly for servers and of course have some additional costs.

Encrypt locally, most CPUs have AES-NI so you have fast encryption locally. Use a password manager to manage your key and use a good password like dicewire for the master password.

The problem starts when you want to access your files. Dou you want to search on them then you need a mechanism. This is another long story. Start reading from the Song's famous article about this.

In any case, Fully-Homomorphic Encryption is the holy grail of Cryptography to solve many issues about the operation on the encrypted data. Let write some applications, waits there.

An important note should be taken; due to the business consideration, the cloud-provider considered a semi-honest adversary that is semi-honest adversary obeys the protocol however, they can use all information they observed and deduce more if they can. Over time we understood that this approach is not correct. We should consider them as a covert adversary,

Covert adversaries have the property that they may deviate arbitrarily from the protocol specification in an attempt to cheat, but do not wish to be “caught” doing so

So if you plan to store your data, even only for storage, use authenticated encryption to produce the integrity and authentication of your data. A Merkle Tree-based approach is necessary to ensure the freshness of your data ( to detect a possible rollback).

  • $\begingroup$ Ironically, for realistic cache attacks, the researchers executed them on Amazon's cloud services with the cost. Then the research can be used by the Amazon! $\endgroup$ – kelalaka Feb 22 at 7:07

Kelalaka gave a great answer detailing many side channel attacks relvant to the cloud. But it is important to note that none of these are relevant if your secret key isn't in the cloud.

If you store encrypted data in the cloud but only do encryption/decryption locally, the cloud specific vectors are irrelevant. Anyone who wants to do a side channel attack will have to attack the local site with the key. Anyone attacking the cloud will be stuck with ciphertext only attacks(on top of whatever access controls the cloud storage has).

  • $\begingroup$ Actually, this was included in my answer, too. See down to from If you encrypt locally and use the cloud only as a storage service $\endgroup$ – kelalaka Feb 24 at 11:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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