- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- PublicKeyFormat
- 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
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/cloudkms
https://www.googleapis.com/auth/cloud-platform
For more information, see the Authentication Overview.
PublicKeyFormat
The supported PublicKey
formats.
Enums | |
---|---|
PUBLIC_KEY_FORMAT_UNSPECIFIED |
If the Otherwise, the public key will be exported through the |
PEM |
The returned public key will be encoded in PEM format. See the RFC7468 sections for General Considerations and Textual Encoding of Subject Public Key Info for more information. |
NIST_PQC |
This is supported only for PQC algorithms. The key material is returned in the format defined by NIST PQC standards (FIPS 203, FIPS 204, and FIPS 205). |
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 |