Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Key Management Service
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Keys
    • Key version
    • Data encryption
  • Concepts
    • Overview
    • Keys
    • Key version
    • Encryption
    • Envelope encryption
    • Key consistency
    • Quotas and limits
  • Use cases
    • All use cases
    • Data encryption
      • Which encryption method should I choose?
      • Encrypting data using the Yandex.Cloud CLI and API
      • Encrypting data using the Yandex.Cloud SDK
      • Encrypting data using the AWS Encryption SDK
      • Encrypting data using Google Tink
    • Encrypting secrets in Managed Service for Kubernetes
    • KMS key management with Hashicorp Terraform
    • Encrypting secrets in Hashicorp Terraform
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • SymmetricCryptoService
      • SymmetricKeyService
      • OperationService
    • REST
      • Overview
      • SymmetricCrypto
        • Overview
        • decrypt
        • encrypt
        • generateDataKey
        • reEncrypt
      • SymmetricKey
        • Overview
        • cancelVersionDestruction
        • create
        • delete
        • get
        • list
        • listAccessBindings
        • listOperations
        • listVersions
        • rotate
        • scheduleVersionDestruction
        • setAccessBindings
        • setPrimaryVersion
        • update
        • updateAccessBindings
  • Questions and answers
  1. Concepts
  2. Keys

Keys

  • Key parameters
  • Using keys
  • Destroying keys

A key is a set of versions, each of which defines an algorithm and cryptographic material for data encryption or decryption operations.
The key is created along with its first version, which becomes the primary one. It's used by default in key operations unless you specify a different version in the input parameters.
When rotating keys, the parameters of new versions are inherited from the key parameters.

You can change the primary version of the key at any time by specifying any previous version. For additional security of your data, rotate keys regularly and use previous versions only to decrypt data. This limits the lifetime of cryptographic material.

Key parameters

A KMS key may have the following parameters:

  • ID: A unique key ID in Yandex.Cloud. It's used for working with keys via the SDK, API, and CLI.

  • Name: The key name. It's non-unique and can be used to work with keys in the CLI if the folder only contains a single key with this name.

  • Encryption algorithm: The algorithm to be used for encryption in new versions of the key. The following symmetric encryption algorithms are supported in GCM mode:

    • AES_128: The AES algorithm with 128-bit keys.
    • AES_192: The AES algorithm with 192-bit keys.
    • AES_256: The AES algorithm with 256-bit keys.
  • Rotation period: The amount of time between automatic key rotations.

  • Status: The current state of the key. Possible statuses:

    • Creating: The key is being created.
    • Active: The key can be used for encryption and decryption.
    • Inactive: The key can't be used.

    You can change the key status using the update method.

Using keys

Created keys can be used in data encryption and decryption operations if certain roles are assigned. You can temporarily disable operations with a key by revoking roles or changing its status to Inactive. For more information, see Access management.

Destroying keys

If you delete a key or its parent resource (folder or cloud), this destroys the cryptographic material contained in it. After that, you won't be able to decrypt the data encrypted with that key.

In this article:
  • Key parameters
  • Using keys
  • Destroying keys
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC