Full name: projects.locations.keyRings.cryptoKeys.decrypt
Decrypts data that was protected by cryptoKeys.encrypt
. The CryptoKey.purpose
must be ENCRYPT_DECRYPT
.
HTTP request
The URLs use gRPC Transcoding syntax.
Path parameters
Request body
The request body contains data with the following structure:
| JSON representation |
|---|
{ "ciphertext" : string , "additionalAuthenticatedData" : string , "ciphertextCrc32c" : string , "additionalAuthenticatedDataCrc32c" : string } |
| Fields | |
|---|---|
ciphertext
|
Required. The encrypted data originally returned in A base64-encoded string. |
additionalAuthenticatedData
|
Optional. Optional data that must match the data originally supplied in A base64-encoded string. |
ciphertextCrc32c
|
Optional. An optional CRC32C checksum of the |
additionalAuthenticatedDataCrc32c
|
Optional. An optional CRC32C checksum of the |
Response body
Response message for KeyManagementService.Decrypt
.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{
"plaintext"
:
string
,
"plaintextCrc32c"
:
string
,
"usedPrimary"
:
boolean
,
"protectionLevel"
:
enum (
|
| Fields | |
|---|---|
plaintext
|
The decrypted data originally supplied in A base64-encoded string. |
plaintextCrc32c
|
Integrity verification field. A CRC32C checksum of the returned |
usedPrimary
|
Whether the Decryption was performed using the primary key version. |
protectionLevel
|
The |
Authorization scopes
Requires one of the following OAuth scopes:
-
https://www.googleapis.com/auth/cloudkms -
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview .

