- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- ChecksummedData
- Try it!
Full name: projects.locations.keyRings.cryptoKeys.cryptoKeyVersions.getPublicKey
Returns the public key for the given CryptoKeyVersion. The CryptoKey.purpose must be ASYMMETRIC_SIGN or ASYMMETRIC_DECRYPT.
HTTP request
GET https://cloudkms.googleapis.com/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*}/publicKey The URLs use gRPC Transcoding syntax.
Path parameters
| Parameters | |
|---|---|
name |
Required. The Authorization requires the following IAM permission on the specified resource
|
Query parameters
| Parameters | |
|---|---|
publicKeyFormat |
Optional. The |
Request body
The request body must be empty.
Response body
The public keys for a given CryptoKeyVersion. Obtained via cryptoKeyVersions.getPublicKey.
If successful, the response body contains data with the following structure:
| JSON representation |
|---|
{ "pem": string, "algorithm": enum ( |
| Fields | |
|---|---|
pem |
The public key, encoded in PEM format. For more information, see the RFC 7468 sections for General Considerations and Textual Encoding of Subject Public Key Info. |
algorithm |
The |
pemCrc32c |
Integrity verification field. A CRC32C checksum of the returned NOTE: This field is in Beta. |
name |
The NOTE: This field is in Beta. |
protectionLevel |
The |
publicKeyFormat |
The |
publicKey |
This field contains the public key (with integrity verification), formatted according to the |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/cloudkmshttps://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
ChecksummedData
Data with integrity verification field.
| JSON representation |
|---|
{ "data": string, "crc32cChecksum": string } |
| Fields | |
|---|---|
data |
Raw Data. A base64-encoded string. |
crc32cChecksum |
Integrity verification field. A CRC32C checksum of the returned |