PublicKey

A PublicKey describes a public key.

JSON representation
{
  "type": enum (KeyType),
  "key": string
}
Fields
type

enum (KeyType)

Optional. The type of public key. If specified, it must match the public key used for thekey field.

key

string (bytes format)

Required. A public key. When this is specified in a request, the padding and encoding can be any of the options described by the respective 'KeyType' value. When this is generated by the service, it will always be an RFC 5280 SubjectPublicKeyInfo structure containing an algorithm identifier and a key.

A base64-encoded string.

KeyType

Types of public keys that are supported. At a minimum, we support RSA and ECDSA, for the key sizes or curves listed: https://cloud.google.com/kms/docs/algorithms#asymmetric_signing_algorithms

Enums
KEY_TYPE_UNSPECIFIED Default unspecified value.
PEM_RSA_KEY A PEM-encoded PKCS#1/RFC 3447 RSAPublicKey structure, or an RFC 5280 SubjectPublicKeyInfo structure containing the former.
PEM_EC_KEY An RFC 5280 SubjectPublicKeyInfo structure containing a PEM-encoded compressed NIST P-256/secp256r1/prime256v1 or P-384 key.