[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].
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version available is 3.16.0, with a range of versions from 3.0.0 to 3.16.0, along with older versions from 2.2.0 to 2.9.0, all referencing the \u003ccode\u003eCryptoKeyPurpose\u003c/code\u003e type.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCryptoKeyPurpose\u003c/code\u003e defines the permitted cryptographic operations for a given \u003ccode\u003eCryptoKey\u003c/code\u003e, such as encryption, decryption, or signing.\u003c/p\u003e\n"],["\u003cp\u003eThere are five defined fields for \u003ccode\u003eCryptoKeyPurpose\u003c/code\u003e: \u003ccode\u003eAsymmetricDecrypt\u003c/code\u003e, \u003ccode\u003eAsymmetricSign\u003c/code\u003e, \u003ccode\u003eEncryptDecrypt\u003c/code\u003e, \u003ccode\u003eMac\u003c/code\u003e, and \u003ccode\u003eUnspecified\u003c/code\u003e, each specifying different cryptographic capabilities.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eAsymmetricDecrypt\u003c/code\u003e and \u003ccode\u003eAsymmetricSign\u003c/code\u003e can be used with \u003ccode\u003eGetPublicKey\u003c/code\u003e, while \u003ccode\u003eEncryptDecrypt\u003c/code\u003e allows for encryption and decryption operations, and \u003ccode\u003eMac\u003c/code\u003e is used for signing operations.\u003c/p\u003e\n"]]],[],null,[]]