Skip to content

Security in Cloud Computing

Data Asset Management

  • Classify your data - High, Medium, Low

Cloud Data Protection

  • Tokenization: store something that functions similarly to the data but is useless to an attacker
  • Encryption: Data can be three states - in motion, in use or rest

Encryption data in motion: encrypts process memory so that even a privileged user cannot read it. The processor can read it only when the specific program is running.

eg. Intel SGX, IBM Z, AMD SME

Encrypting data at rest: HSM (Hardware Security Module) holds the encryption keys → KMS (Key Management Service) is a service that allows user to manage keys with HSM on the backend

Contrast between naive KMS with Envelope Encryption

  • Creating keys for every single file may saturate KMS and HSM.
  • Relying on key deletion places trust on KMS to delete all the copies and cached keys.
  • Bypassing this trust model by overwriting the encrypted data is an intensive process.

Solution: Envelope Encryption (DEK vs KEK)

  • Key Encryption Key: Stored inside the KMS/HSM. The KEK never leaves the secure hardware boundary.
  • Data Encryption Key: Generated locally on the application side to perform the actual bulk data encryption.

How does the process work?

  • Encryption (Wrapping): The app requests a DEK from the KMS. The KMS returns the DEK in two forms: a plaintext DEK and a DEK encrypted (wrapped) by the master KEK.

  • Data Storage: The app encrypts the raw data using the plaintext DEK, wipes the plaintext DEK from memory, and saves the wrapped DEK right alongside the ciphertext on disk.

  • Decryption (Unwrapping): To read the data, the app sends the wrapped DEK back to the KMS. The KMS decrypts it using the KEK and returns the plaintext DEK so the application can decrypt the local file.

To delete the data, just delete the Data Encryption Key

Homomorphic Encryption

Homomorphic Encryption (HE) enables mathematical operations directly on ciphertexts without decrypting them first. The computed result remains encrypted and yields the correct plaintext outcome when decrypted by the private key holder.

Category Supported Operations Execution Limits Computational Cost Common Schemes / Use Cases
Partially (PHE) One operation only (Addition or Multiplication) Unlimited repetitions Very low (Fast) RSA (Multiplication), Paillier (Addition), ElGamal
Somewhat (SHE) Both Addition and Multiplication Limited circuit depth (set number of operations) Moderate Shallow polynomial evaluations, simple statistics
Fully (FHE) Any computable function (Addition and Multiplication) Unlimited repetitions High overhead (requires GPU/ASIC acceleration) TFHE (Logic/Booleans), CKKS (Machine Learning), BFV/BGV (Exact Math)

Managing Compute Assets

  • Compute assets typically take data, process it, and do something with the results.

VM Security

  • VMs share same physical space
  • Noisy Neighbour: using up all of the processor time, network bandwidth, or storage bandwidth

Two types: - Hypervisor Breakout - Side Channel Attack

Hypervisor Breakout

An attacker runs code on VM, allowing to breakout and interact with the hypervisor

Side Channel Attack

Side channel attacks use medium that is not meant for communication

  • eg. CPU data cache

Co-residence is often the essential condition for side channel attacks

  • Small packet RTT
  • Numerically close IP Address

Any physical machine resources multiplexed between the attacker and target forms a potentially useful channel: network access, CPU branch predictors and instruction cache, DRAM memory bus, CPU pipelines , scheduling of CPU cores and timeslices, disk access etc

Any attacking instance can measure the load of co-resident machine using Prime-Trigger-Probe Attack.

  • The probing instance allocates a buffer B of size b. Assume that the cache block size is s
  • Prime: Read B at s byte offsets, so that it gets cached
  • Trigger: Busyloop
  • Probe: Measure the time it takes to read B
  • If the execution is fast, the victim did not access the cache, else it had accessed the cache

Cache-Timing Attack on Cryptography

  • The Cryptographic Flaw: In naive AES implementations, internal substitution steps use lookup tables stored in memory. The memory index accessed is computed directly from the secret key and plaintext input: $\text{Index} = P_i \oplus K_i$ (where $P_i$ is a known plaintext byte and $K_i$ is a secret key byte).

  • Cache Eviction & Profiling: The attacker clears (evicts) specific lines of the cryptographic lookup table from the CPU cache before triggering the victim's encryption process.

  • Observing Hits vs. Misses: By probing the cache immediately after encryption, the attacker observes which table entries were loaded back into the cache (cache hits) versus which remained cleared (cache misses).

  • Offline Key Recovery: Because the attacker knows the input plaintext $P_i$ and determined which table index was accessed, they can isolate the secret key byte using simple XOR math: $K_i = \text{Index} \oplus P_i$. Collecting multiple encryption samples filters out noise and reveals the complete secret key.

Solution

  • Time-Padding: Adding additional execution time if the sensitive function returns early. This prevents the attackers from deriving secrets based on time based measurements.
  • Cache Cleansing: Uses hardware specific instruction (like CLFLUSH in x86) to clear out cache lines that contain sensitive information immediately after cryptographic process. Removes fingerprint of lookup tables.
  • Cache Partitioning: Uses hardware boundaries to partition cache sets/lines to specific security domains. Completes disables Prime+Probe attack.

Identity and Access Management

  • Each entity needs an entity to ensure that the user is only allowed to perform intended tasks.

”Authentication v/s Authorisation

IAM Lifecycle

Pasted image 20260913212513.png

Single Sign-On

  • Allows user to authenticate with a single id and access multiple related services

Pasted image 20260913213404.png