Method: cryptoKeyVersions.asymmetricDecrypt

Full name: projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.asymmetricDecrypt

Decrypts data that was encrypted with a public key retrieved from cryptoKeyVersions.getPublicKey corresponding to a CryptoKeyVersion with CryptoKey.purpose ASYMMETRIC_DECRYPT.

HTTP request

POST https://cloudkms.googleapis.com/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}:asymmetricDecrypt

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the CryptoKeyVersion to use for decryption.

Authorization requires the following Google IAM permission on the specified resource name:

  • cloudkms.cryptoKeyVersions.useToDecrypt

Request body

The request body contains data with the following structure:

JSON representation
{
  "ciphertext": string
}
Fields
ciphertext

string (bytes format)

Required. The data encrypted with the named CryptoKeyVersion's public key using OAEP.

A base64-encoded string.

Response body

If successful, the response body contains data with the following structure:

Response message for KeyManagementService.AsymmetricDecrypt.

JSON representation
{
  "plaintext": string
}
Fields
plaintext

string (bytes format)

The decrypted data originally encrypted with the matching public key.

A base64-encoded string.

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.

Try it!

¿Te ha resultado útil esta página? Enviar comentarios:

Enviar comentarios sobre...