Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
feat: add ECDSA secp256k1 to the list of supported algorithms (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] authored Jun 14, 2021
1 parent 6577359 commit a27f95d
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 4 deletions.
6 changes: 5 additions & 1 deletion protos/google/cloud/kms/v1/resources.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -286,6 +286,10 @@ message CryptoKeyVersion {
// ECDSA on the NIST P-384 curve with a SHA384 digest.
EC_SIGN_P384_SHA384 = 13;

// ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
// HSM protection level.
EC_SIGN_SECP256K1_SHA256 = 31;

// Algorithm representing symmetric encryption by an external key manager.
EXTERNAL_SYMMETRIC_ENCRYPTION = 18;
}
Expand Down
5 changes: 3 additions & 2 deletions protos/google/cloud/kms/v1/service.proto
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020 Google LLC
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -253,7 +253,8 @@ service KeyManagementService {

// Update the version of a [CryptoKey][google.cloud.kms.v1.CryptoKey] that will be used in [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt].
//
// Returns an error if called on an asymmetric key.
// Returns an error if called on a key whose purpose is not
// [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
rpc UpdateCryptoKeyPrimaryVersion(UpdateCryptoKeyPrimaryVersionRequest) returns (CryptoKey) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/keyRings/*/cryptoKeys/*}:updatePrimaryVersion"
Expand Down
1 change: 1 addition & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions protos/protos.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions protos/protos.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/v1/key_management_service_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,8 @@ export class KeyManagementServiceClient {
/**
* Update the version of a {@link google.cloud.kms.v1.CryptoKey|CryptoKey} that will be used in {@link google.cloud.kms.v1.KeyManagementService.Encrypt|Encrypt}.
*
* Returns an error if called on an asymmetric key.
* Returns an error if called on a key whose purpose is not
* {@link google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT|ENCRYPT_DECRYPT}.
*
* @param {Object} request
* The request object that will be sent.
Expand Down

0 comments on commit a27f95d

Please sign in to comment.