Key Management Service API, gRPC: AsymmetricSignatureCryptoService
Written by
Updated at August 30, 2023
Set of methods that perform asymmetric signature.
Call | Description |
---|---|
Sign | Signs data specified KMS key. |
SignHash | Signs hash value specified KMS key. |
GetPublicKey | Gets value of public key. |
Calls AsymmetricSignatureCryptoService
Sign
Signs data specified KMS key.
rpc Sign (AsymmetricSignRequest) returns (AsymmetricSignResponse)
AsymmetricSignRequest
Field | Description |
---|---|
key_id | string Required. ID of the asymmetric KMS key to use for signature. The maximum string length in characters is 50. |
message | bytes Required. Message to sign. Should be encoded with base64. The maximum string length in characters is 32768. |
AsymmetricSignResponse
Field | Description |
---|---|
key_id | string ID of the asymmetric KMS key that was used for signature. |
signature | bytes Value of signature. Signature value is produced in accordance with RFC 8017 for RSA and is a DER-encoded object as defined by ANSI X9.62-2005 and RFC 3279 Section 2.2.3 for ECDSA. |
SignHash
Signs hash value specified KMS key.
rpc SignHash (AsymmetricSignHashRequest) returns (AsymmetricSignHashResponse)
AsymmetricSignHashRequest
Field | Description |
---|---|
key_id | string Required. ID of the asymmetric KMS key to use for signature. The maximum string length in characters is 50. |
hash | bytes Required. Hash value to be signed. Should be encoded with base64. The maximum string length in characters is 4096. |
AsymmetricSignHashResponse
Field | Description |
---|---|
key_id | string ID of the asymmetric KMS key that was used for signature. |
signature | bytes Value of signature. Signature value is produced in accordance with RFC 8017 for RSA and is a DER-encoded object as defined by ANSI X9.62-2005 and RFC 3279 Section 2.2.3 for ECDSA. |
GetPublicKey
Gets value of public key.
rpc GetPublicKey (AsymmetricGetPublicKeyRequest) returns (AsymmetricGetPublicKeyResponse)
AsymmetricGetPublicKeyRequest
Field | Description |
---|---|
key_id | string Required. ID of the asymmetric KMS key to be used for public key retrieval. The maximum string length in characters is 50. |
AsymmetricGetPublicKeyResponse
Field | Description |
---|---|
key_id | string ID of the asymmetric KMS key to get public key of. |
public_key | string Public key value. The value is a PEM-encoded X.509 public key, also known as SubjectPublicKeyInfo (SPKI), as defined in RFC 5280. |