PublicKey
Stay organized with collections
Save and categorize content based on your preferences.
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
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. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-30 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-30 UTC."],[[["\u003cp\u003eA PublicKey describes a public key and is represented in JSON format with fields for \u003ccode\u003etype\u003c/code\u003e and \u003ccode\u003ekey\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003etype\u003c/code\u003e field in the JSON representation indicates the type of public key and must match the key provided in the \u003ccode\u003ekey\u003c/code\u003e field.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ekey\u003c/code\u003e field is a base64-encoded string representing the public key, which, when generated by the service, is an RFC 5280 SubjectPublicKeyInfo structure.\u003c/p\u003e\n"],["\u003cp\u003eSupported KeyTypes include \u003ccode\u003eKEY_TYPE_UNSPECIFIED\u003c/code\u003e, \u003ccode\u003ePEM_RSA_KEY\u003c/code\u003e (PEM-encoded RSA), and \u003ccode\u003ePEM_EC_KEY\u003c/code\u003e (PEM-encoded NIST P-256 or P-384 key).\u003c/p\u003e\n"]]],[],null,["# PublicKey\n\n- [JSON representation](#SCHEMA_REPRESENTATION)\n- [KeyType](#KeyType)\n\nA [PublicKey](/certificate-authority-service/docs/reference/rest/v1beta1/PublicKey) describes a public key.\n\nKeyType\n-------\n\nTypes of public keys that are supported. At a minimum, we support RSA and ECDSA, for the key sizes or curves listed: \u003chttps://cloud.google.com/kms/docs/algorithms#asymmetric_signing_algorithms\u003e"]]