tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Cloud Platforms > Google Cloud Platform (GCP) > Cloud KMS

Cloud KMS

Author: Venkata Sudhakar

Google Cloud Key Management Service (KMS) is a cloud-hosted key management service that lets you manage cryptographic keys for your cloud services. It allows you to create, import, manage, and use encryption keys to protect your data.

Key Features:

1. CMEK support - Use Customer-Managed Encryption Keys to encrypt GCP services like BigQuery, GCS, and Pub/Sub.

2. Key rotation - Automatic or manual key rotation with configurable rotation periods.

3. HSM-backed keys - Hardware Security Module protection for keys requiring FIPS 140-2 Level 3 compliance.

4. Asymmetric keys - Support for RSA and EC keys for signing and encryption operations.

5. Audit logging - Every key use is logged in Cloud Audit Logs for compliance.

The below example shows how to create a key ring, key, and use it to encrypt/decrypt data.


It gives the following output,

Key ring created: projects/my-project/locations/us-central1/keyRings/my-key-ring
Key created: .../cryptoKeys/my-encryption-key
Encrypted: 108 bytes
Decrypted: Sensitive data to encrypt

KMS Key Types:

Symmetric (ENCRYPT_DECRYPT) - Same key encrypts and decrypts. Used for data encryption at rest. Fast and efficient.

Asymmetric signing (ASYMMETRIC_SIGN) - Private key signs, public key verifies. Used for JWT signing, code signing, and certificate signing.

Asymmetric encryption (ASYMMETRIC_DECRYPT) - Public key encrypts, private key decrypts. Used for wrapping sensitive keys or data.


 
  


  
bl  br