Professional Cloud Security Engineer
Prepare and test your skills
Prepare and test your skills
Google Cloud provides multiple tiers of encryption key control based on regulatory requirements, operational overhead, and key ownership boundaries:
When using CMEK, Google Cloud services access keys through specialized service agents. The resource owner grants the Cloud KMS CryptoKey Encrypter/Decrypter role to the target service agent account. If an administrator revokes this role or disables the underlying key, the service loses access to the wrapped data keys. For Cloud EKM, traffic flows from Google Cloud to the external partner over the public internet or private VPC connections, making data availability strictly dependent on external system uptime.
Cloud KMS categorizes keys by their underlying protection level to meet different security and compliance standards:
Software keys provide the fastest response times and the lowest operational costs. In contrast, Cloud HSM keys enforce hardware isolation directly at the chip level, preventing direct key extraction even during cryptographic operations. Both software and hardware keys share the same Cloud KMS API surface and IAM authorization model, allowing applications to switch between protection levels without changing application logic.
Cloud KMS organizes cryptographic resources in a strict containment hierarchy. A project contains regional or multi-regional key rings, key rings contain crypto keys, and crypto keys contain one or more key versions. Administrators define key rings based on resource location requirements to ensure data and keys remain in the same geographic region.

A state diagram showing the Cloud KMS containment hierarchy (Project, Key Ring, Crypto Key, key versions) and the lifecycle of a key version: Enabled, Disabled, Scheduled for destruction with a 24-hour waiting period, and permanently Destroyed. The animation shows rotation promoting a new primary version, then a token flowing through disable, scheduled destruction, and destruction, with a restore path back to Disabled.
Project
└── Key Ring (Location-bound)
└── Crypto Key (Purpose & algorithm)
├── Key Version 1 (Primary for encryption / Enabled)
└── Key Version 2 (Enabled for decryption only)
Automated and manual operations dictate how key versions transition through distinct lifecycle states over time:
Google Cloud protects data automatically across network boundaries and storage layers using layered cryptographic controls:
[Plaintext Data] + [Data Encryption Key (DEK)] ──> [Encrypted Data at Rest]
│
▼
[Cloud KMS Key Encryption Key (KEK)] ──> [Encrypted DEK (Stored alongside data)]
Cloud Storage evaluates object lifecycle management rules to transition storage tiers or remove objects automatically. Policies consist of condition-action pairs evaluated daily against bucket contents. Conditions can match object age, creation date, current storage class, live state, or the number of newer versions in versioned buckets.
[Object in Bucket] ──(Age > 30 Days)──> [Transition to Nearline]
──(Age > 365 Days)─> [Delete Object & Drop Key Association]
Common lifecycle actions move objects to colder storage classes or trigger permanent deletion:
When combined with CMEK, lifecycle deletion actions permanently release references to wrapped DEKs, ensuring automated alignment between data retention rules and compliance requirements.
Confidential Computing closes the final security boundary by protecting data in use within system memory. Standard systems decrypt data into RAM during active processing, leaving it vulnerable to root users or hypervisor inspection. Confidential Computing uses dedicated hardware features—such as AMD Secure Encrypted Virtualization (SEV) or Intel Trust Domain Extensions (TDX)—to keep system memory encrypted with hardware-generated keys that the hypervisor cannot read.
Organizations can enforce memory encryption across standard and containerized workloads:
Choose Confidential Computing when processing highly regulated information, executing multi-party data analytics, or isolating workloads from host-level infrastructure access.

A four-step process flow showing envelope encryption: plaintext data is encrypted with a locally generated Data Encryption Key (DEK), the DEK is wrapped by a Key Encryption Key (KEK) in Cloud KMS, and the encrypted data is stored at rest alongside the encrypted DEK. The animation highlights each step in order as a packet travels along the flow arrows.
Google default encryption automatically encrypts all data at rest without any configuration, with Google creating, storing, and rotating keys. CMEK uses Cloud Key Management Service (Cloud KMS) to let organizations generate, rotate, and revoke their own keys, providing granular control over key lifecycles and the ability to immediately revoke access by disabling keys.
Choose software keys for low-cost, high-throughput operations where physical hardware isolation is not required. Choose hardware keys, managed by Cloud HSM, when regulatory frameworks require hardware-backed key protection, tamper-evident boundaries, and non-exportable private key material.
Key rotation generates a new primary key version while keeping older versions active to decrypt existing data. Older versions remain enabled for decryption only, ensuring continued access to previously encrypted objects. Scheduled automatic rotation periodically generates new versions without breaking access.
Envelope encryption protects data at rest by encrypting raw data with a Data Encryption Key (DEK) and then encrypting the DEK with a Key Encryption Key (KEK) managed in Cloud KMS. This model allows fast local data processing with the DEK while maintaining centralized access control over the KEK.