12.3: Encryption in Transit and at Rest; Cloud Key Management

Introduction to Cloud Computing · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    12.3: Encryption in Transit and at Rest; Cloud Key Management

    Encryption is a cornerstone of data security and often a mandatory requirement for compliance frameworks. In a cloud context, encryption needs to be considered in two states: data in transit (moving across networks) and data at rest (stored on disk or in databases). Securing data in both states protects against different threat scenarios – encryption in transit thwarts network eavesdroppers, while encryption at rest mitigates risks like someone gaining unauthorized disk access or a lost backup drive. Cloud providers typically offer built-in capabilities for both, but cloud project managers should understand how and when to leverage these features.

    Encryption in transit means that data is encrypted when traveling between systems [2]. The most common mechanism for this is using transport layer security (TLS) protocols (which replaced the older SSL protocols). When you see https:// in a URL, it indicates HTTP over TLS, encrypting the HTTP traffic between the client and server. All major cloud services support TLS for data in transit – for example, calls to cloud APIs or web endpoints should be made over HTTPS. Many providers have deprecated older protocols; for instance, support for SSL 3.0 has been removed in favor of TLS 1.2+ because older versions had known vulnerabilities like POODLE and DROWN. For a cloud application, ensuring encryption in transit involves obtaining and managing digital certificates (often through services like AWS Certificate Manager or Let’s Encrypt), configuring load balancers or API gateways to enforce HTTPS, and perhaps mutual TLS if client authentication is needed. The goal is that any data moving between your cloud workloads and users, or between services internally, is not sent in plaintext. This is especially critical for sensitive information such as credentials, personal data, or financial records – sending these over unencrypted channels could violate laws like GDPR or regulations like PCI DSS. Many compliance regimes explicitly require encryption of sensitive data in transit (e.g., HIPAA requires protecting ePHI transmissions).

    Encryption at rest refers to encrypting data stored on persistent media [2]. Cloud providers make this relatively straightforward: for example, AWS can encrypt EBS volumes, S3 buckets, and RDS databases at rest with a click of a button or an API call. Similarly, Google Cloud and Azure storage services support transparent encryption at rest. Typically, this is done using strong symmetric encryption (such as AES-256) and managed keys. By encrypting data at rest, even if an attacker somehow obtains the raw storage (say, an old hard drive or a snapshot), they cannot read the data without the encryption key. It adds a layer of protection and is often required for compliance – many industry standards treat unencrypted storage of sensitive data as a lapse. AWS, for instance, recommends encryption as an additional access control on top of IAM and network controls. It’s worth noting that encryption at rest, when provided by the cloud platform, is often transparent to the user: data is automatically decrypted when accessed by an authorized request. This means you don’t usually have to modify your application to benefit from it, but you do have to ensure it’s enabled and that keys are managed properly.

    This brings us to Key Management. Encryption is only as strong as the keys being kept secret. Cloud providers offer Key Management Services (KMS) – such as AWS KMS, Google Cloud KMS, Azure Key Vault – to handle the creation, storage, and lifecycle of cryptographic keys. These services typically use Hardware Security Modules (HSMs) under the hood for secure key storage and operations. A common design pattern is envelope encryption: the cloud service uses a data encryption key (DEK) to encrypt the data, and then uses a key encryption key (KEK) (managed by KMS) to encrypt the DEK. In practice, when you ask a cloud storage service to encrypt data, it will either use a service-managed key by default or a customer-managed key from KMS that you specify. The workflow might be: your application sends data to a storage service; the service generates a random data key to encrypt that data; it then calls KMS to encrypt that data key with a master key (and KMS stores an encrypted copy of the data key or a reference to it). Later, to read the data, the process is reversed – the encrypted data key is sent to KMS for decryption (after verifying access policy), then the plaintext data key decrypts the data in memory. The master keys in KMS never leave the HSM boundary, and all usage is logged (every call to use a KMS key can be recorded in audit logs like CloudTrail) [4]. This model greatly reduces the risk of key exposure.
    Envelope Encryption and Key Hierarchy. Details in caption.

    Figure \(\PageIndex{1}\): An example key management lifecycle where data is encrypted with a Data Encryption Key (DEK), which is in turn encrypted by a Key Encryption Key (KEK) managed by the cloud KMS (Customer Master Key). In advanced scenarios, the KMS master keys themselves might be protected by a root key in an HSM. This layered approach ensures that even if data or DEKs are compromised, they are useless without access to the higher-level KEK stored securely in KMS. (CC BY 4.0; Felix Amoruwa) Access to a detailed description of Figure \(\PageIndex{1}\)

    Envelope Encryption and Key Hierarchy. Details in caption.

    Figure \(\PageIndex{2}\): This diagram shows the layered key architecture used in cloud encryption, where data is encrypted with a Data Encryption Key (DEK), which is itself encrypted by a Key Encryption Key (KEK) managed within a cloud KMS backed by hardware security modules. (CC BY 4.0; Felix Amoruwa) Access to a detailed description of Figure \(\PageIndex{1}\)

    When implementing encryption at scale, one challenge is managing keys and access to keys. Not everyone or every service should be allowed to decrypt everything. KMS itself is governed by IAM policies – you can specify which users or roles can use a particular master key to encrypt or decrypt data. For example, you might allow your application server role to use the key to decrypt data in the database, but explicitly deny human administrators from directly calling KMS to decrypt data (thus enforcing that decryption only happens through the app with proper logging). KMS usage is logged, providing an audit trail for compliance and forensic analysis.

    Another consideration is encryption in use, sometimes referred to as data in use protection – techniques like confidential computing or homomorphic encryption – but those are emerging areas beyond the standard scope of most cloud projects. Typically, “in use” means when data is being processed, it must be decrypted in memory. Technologies like Intel SGX or AMD SEV (secure enclaves) are on the horizon to keep data encrypted even during computation, but project managers should know that for now, focusing on transit and rest encryption is the minimum expectation for compliance.

    Cloud providers often meet and attest to various encryption-related compliance standards. For instance, they might state that all their storage systems encrypt data at rest by default and that they use FIPS 140-2 validated cryptographic modules (important for U.S. government compliance). AWS KMS HSMs are FIPS 140-2 Level 3 validated, and Google Cloud KMS similarly uses validated modules and offers integration with external KMS or HSM (for customers who want to manage keys outside the cloud, known as BYOK – bring your own key). A project that handles, say, credit card data would need encryption to satisfy PCI DSS requirements; a project with personal health information would need to ensure encryption to satisfy HIPAA’s safeguards (HIPAA, while not prescribing specific algorithms, expects “reasonable and appropriate” encryption of ePHI, often implying AES-256 for rest and TLS for transit) [6].

    Case Illustration: A SaaS company deals with sensitive financial data on behalf of its clients. To comply with regulations and assuage customer concerns, it decides to implement client-side encryption for the most sensitive fields: data is encrypted using keys that only the client’s devices have, before being sent to the cloud. This means the SaaS backend stores and processes mostly ciphertext, reducing the risk of a breach exposing plain data. However, this complicates functionality (as the cloud cannot readily search or compute on encrypted fields) and key recovery becomes a client-side responsibility. After assessing trade-offs, the company chooses a hybrid approach: use cloud KMS-managed encryption for most data (leveraging cloud provider security and simplifying operations), but for a subset of fields (like full credit card numbers or passwords) use end-to-end encryption. The project manager ensures that the architecture, while complex, is well-documented and that client agreements reflect who manages which keys. In doing so, even if the cloud environment were compromised, certain data would remain protected, and the company exceeds baseline compliance, giving it a competitive security edge.

    In summary, encryption is non-negotiable for protecting cloud data. Project managers should ensure that all data in transit is sent over secure channels (HTTPS, VPNs, etc.) and that data at rest is encrypted using cloud provider features or additional application-layer encryption. They must also manage encryption keys wisely: use KMS to reduce direct handling of keys, enforce strict access control on keys, and monitor key usage. Encryption and key management, when done correctly, significantly strengthen the security posture and fulfill many compliance requirements (from GDPR’s mandate to protect personal data to ISO 27001’s controls on cryptography). Always stay updated on the cloud provider’s encryption offerings – for example, new services like AWS Nitro enclaves or GCP Confidential VMs are emerging to protect data in use – as these tools continue to evolve to mitigate more advanced threat scenarios.


    This page titled 12.3: Encryption in Transit and at Rest; Cloud Key Management was last modified on Tue, 22 Sep 2026 21:13:32 GMT and is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Felix Amoruwa.