Creating a key
- Console
- API
Go to KMS and choose Create Key. Under Key details
give it a Name and an optional Description; under Cryptography
pick a Key spec and a Key usage.The spec choices are AES-256 symmetric (recommended), RSA-2048
asymmetric, RSA-4096 asymmetric and ECDSA P-256 asymmetric (sign
only). Key usage is locked to whatever the chosen spec supports — an
RSA spec is the only one that lets you choose between Encrypt /
Decrypt and Sign / Verify.
enabled,
ready for crypto operations — there is nothing to poll.
name is unique per account and lands in the CRN, so it has to be URL-safe:
^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$.
Specs and usages
A key is pinned to one usage at creation: eitherencrypt_decrypt or
sign_verify. The spec decides which usages are even possible.
Omit
key_usage for aes-256 or ecdsa-p256 and the only usage the spec
supports is applied. Omit it for an RSA spec and the request is rejected — RSA
can do both, so the service will not guess.