- Create a symmetric key if you need to encrypt and decrypt data with the same key material or generate data keys for envelope encryption.
- Create an asymmetric key if you need a public-private key pair.
Prerequisites
Make sure you are in a group that has at least theeditor role within your tenant or project; for example, the default editors group. You can check this in the Administration → IAM section of the web console.
How to create a symmetric key
- Web console
- CLI
- In the web console, go to Cryptography → KMS.
- Click Create key.
- Specify a unique key name.
- In the Type field, select Symmetric key.
- (Optional) In Rotation period, set how often KMS should automatically rotate the key material. When a key is rotated, KMS generates a new key version and immediately sets it as the default version. You can set the rotation period in days, months or years. The Algorithm value is set automatically to AES-256-GCM.
- (Optional) Add a description.
- Click Create key.
How to create an asymmetric key
- Web console
- CLI
- In the web console, go to Cryptography → KMS.
- Click Create key.
- Specify a unique key name.
- In the Type field, select Asymmetric key.
- In the Algorithm field, select RSA-4096 or ECC (P-256).
- (Optional) Add a description.
- Click Create key.