Reference documentation and code samples for the Google Cloud Key Management Service v1 API enum CryptoKey.Types.CryptoKeyPurpose.
[CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose]
describes the cryptographic capabilities of a
[CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used
for the operations allowed by its purpose. For more information, see Key
purposes.
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
with
[AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt]
and
[GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
AsymmetricSign
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
with
[AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign]
and
[GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
EncryptDecrypt
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
with [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
[Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
Mac
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
with [MacSign][google.cloud.kms.v1.KeyManagementService.MacSign].
RawEncryptDecrypt
[CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used
with [RawEncrypt][google.cloud.kms.v1.KeyManagementService.RawEncrypt]
and [RawDecrypt][google.cloud.kms.v1.KeyManagementService.RawDecrypt].
This purpose is meant to be used for interoperable symmetric
encryption and does not support automatic CryptoKey rotation.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-04-09 UTC."],[[["This document provides reference documentation for the `CryptoKey.Types.CryptoKeyPurpose` enum within the Google Cloud Key Management Service v1 API, detailing the various cryptographic capabilities associated with a `CryptoKey`."],["The latest version of the API documented is 3.16.0, while the current version being viewed on this specific page is 3.8.0, and it lists versions ranging from 2.2.0 all the way to the most current."],["The `CryptoKeyPurpose` enum defines the permitted operations for a key, including `AsymmetricDecrypt`, `AsymmetricSign`, `EncryptDecrypt`, `Mac`, `RawEncryptDecrypt`, and `Unspecified`."],["The `CryptoKey.Types.CryptoKeyPurpose` is found within the Google.Cloud.Kms.V1 namespace, and is part of the Google.Cloud.Kms.V1.dll assembly."],["Specific fields are associated with a description, such as `EncryptDecrypt` indicating it can be used with `Encrypt` and `Decrypt`, or `AsymmetricSign` being used for `AsymmetricSign` and `GetPublicKey`."]]],[]]