Cloud KMS is GCP's centralized key management service for the encryption keys that protect your data. Combined with Cloud HSM (FIPS 140-2 Level 3 certified hardware) and Cloud EKM (external HSM integration), it covers everything from regulated industries to zero-trust key management.
| Service | Key Storage | FIPS | Use Case |
|---|---|---|---|
| Cloud KMS (Software) | Google data centers (SW) | 140-2 Level 1 | Standard |
| Cloud HSM | Google data centers (HW) | 140-2 Level 3 | Finance, healthcare, regulated workloads |
| Cloud EKM | External HSM (Equinix / Thales / Fortanix) | Depends on customer HSM | Physical key isolation, sovereignty requirements |
# Create the KeyRing gcloud kms keyrings create my-keyring \ --location=asia-northeast1 # Create the CryptoKey (symmetric) gcloud kms keys create my-key \ --keyring=my-keyring --location=asia-northeast1 \ --purpose=encryption --rotation-period=90d \ --next-rotation-time=2026-09-01T00:00:00Z # Encrypt gcloud kms encrypt --key=my-key --keyring=my-keyring \ --location=asia-northeast1 \ --plaintext-file=secret.txt --ciphertext-file=secret.enc # Create a GCS bucket with CMEK gcloud storage buckets create gs://my-bucket \ --default-encryption-key=projects/PROJECT/locations/asia-northeast1/keyRings/my-keyring/cryptoKeys/my-key
| Item | Cloud KMS | Cloud HSM |
|---|---|---|
| Active key version | $0.06/month | $1-2/month |
| Symmetric operations | $0.03/10,000 | $0.03/10,000 |
| Asymmetric operations | $0.06/10,000 | $1〜2/10,000 |
| EKM | $0.06/month plus external HSM fees | — |
| Feature | Cloud KMS | Cloud HSM | AWS KMS | Azure Key Vault |
|---|---|---|---|---|
| Software keys | Yes | — | Yes | Yes |
| HSM keys | — | Yes (FIPS L3) | Yes (CloudHSM, separate) | Yes (Managed HSM) |
| External HSM integration | EKM | — | External KS | Bring Your Own Key |
| Automatic rotation | Yes | Yes | Yes | Yes |
What is the difference between Cloud KMS and Cloud HSM?
Cloud KMS is software-based, while Cloud HSM uses FIPS 140-2 Level 3 certified hardware HSMs. Choose HSM when compliance mandates a hardware HSM; otherwise Cloud KMS is sufficient.
What is Cloud EKM?
External Key Manager. Keys are stored in a third-party HSM (Equinix SmartKey, Thales, Fortanix, etc.) and GCP calls out to them. This provides physical separation of key material.
What is the difference between CMEK and CSEK?
CMEK = Customer-managed Encryption Key (managed in KMS). CSEK = Customer-supplied Encryption Key (the customer supplies the key on every call). CSEK is hard to manage, so CMEK is the mainstream choice.
How does key rotation work?
KMS supports automatic rotation periods (e.g., 90 days). A new key version becomes primary and apps use the latest; older versions stay around to decrypt existing data.
Which services support CMEK?
Nearly all major GCP services: GCS, BigQuery, Compute Engine, Persistent Disk, Cloud SQL, Spanner, Bigtable, Pub/Sub, Dataflow, Vertex AI, and more. Google publishes a full CMEK support matrix.
How is pricing structured?
Active key versions per month plus the number of encrypt/decrypt operations. Cloud KMS is cheap ($0.06 per key version per month), while Cloud HSM is more expensive ($1-2 per key version per month).
How does it compare to AWS KMS and Azure Key Vault?
Functionally similar across the board. AWS KMS has more GovCloud and FIPS regions, Azure Key Vault has a strong Managed HSM offering, and Cloud HSM differentiates with FIPS 140-2 Level 3 hardware.
What is Confidential Computing?
Memory on VMs and GKE Nodes is also encrypted using AMD SEV or Intel TDX. Combined with KMS, Confidential VM delivers true encryption-in-use on top of encryption at rest and in transit.
Related Security Articles
Professional Cloud Developer (PCD): Complete Guide (2026)
Pass the PCD exam — Cloud Run, GKE, App Engine, Cloud SQL/Spanner. The developer-focused Professional cert.
GCP Confidential Computing Guide (2026)
Confidential VMs and Confidential GKE on GCP — TEE, attestation, common privacy-sensitive workload patterns.
Professional Cloud Network Engineer (PCNE): Guide (2026)
Pass the PCNE exam — VPC, Cloud Interconnect, Cloud VPN, Cloud Load Balancing, hybrid networking.
Professional Cloud Security Engineer (PCSE): Guide (2026)
Pass the PCSE exam — IAM, VPC SC, Cloud KMS, Cloud DLP, security command center. The security Professional cert.
Google Cloud is a trademark of Google LLC. For the latest information, see the official Cloud KMS documentation.
Practice with certification-focused question sets
View GCP exam prepNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Google Cloud Certification Roadmap (2026)
Choose your GCP certification path — Foundational, Associate...
CDL Cloud Digital Leader: Complete Exam Guide (2026)
Pass the Cloud Digital Leader exam — cloud business value, G...
GAIL Generative AI Leader: Complete Exam Guide (2026)
Pass the Generative AI Leader exam — Gemini, Vertex AI, Work...
Vertex AI Fundamentals for GCP Certs (2026)
Vertex AI basics every cert candidate needs — Workbench, Pip...
Associate Cloud Engineer (ACE): Complete Guide (2026)
Pass the Associate Cloud Engineer exam — Console, gcloud, pr...