Module: Google::Cloud::Kms::V1::CryptoKeyVersion::CryptoKeyVersionAlgorithm

Defined in:
lib/google/cloud/kms/v1/doc/google/cloud/kms/v1/resources.rb

Overview

The algorithm of the CryptoKeyVersion, indicating what parameters must be used for each cryptographic operation.

The GOOGLE_SYMMETRIC_ENCRYPTION algorithm is usable with CryptoKey#purpose ENCRYPT_DECRYPT.

Algorithms beginning with "RSA_SIGN_" are usable with CryptoKey#purpose ASYMMETRIC_SIGN.

The fields in the name after "RSA_SIGN_" correspond to the following parameters: padding algorithm, modulus bit length, and digest algorithm.

For PSS, the salt length used is equal to the length of digest algorithm. For example, RSA_SIGN_PSS_2048_SHA256 will use PSS with a salt length of 256 bits or 32 bytes.

Algorithms beginning with "RSA_DECRYPT_" are usable with CryptoKey#purpose ASYMMETRIC_DECRYPT.

The fields in the name after "RSA_DECRYPT_" correspond to the following parameters: padding algorithm, modulus bit length, and digest algorithm.

Algorithms beginning with "EC_SIGN_" are usable with CryptoKey#purpose ASYMMETRIC_SIGN.

The fields in the name after "EC_SIGN_" correspond to the following parameters: elliptic curve, digest algorithm.

Constant Summary collapse

CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED =

Not specified.

0
GOOGLE_SYMMETRIC_ENCRYPTION =

Creates symmetric encryption keys.

1
RSA_SIGN_PSS_2048_SHA256 =

RSASSA-PSS 2048 bit key with a SHA256 digest.

2
RSA_SIGN_PSS_3072_SHA256 =

RSASSA-PSS 3072 bit key with a SHA256 digest.

3
RSA_SIGN_PSS_4096_SHA256 =

RSASSA-PSS 4096 bit key with a SHA256 digest.

4
RSA_SIGN_PKCS1_2048_SHA256 =

RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.

5
RSA_SIGN_PKCS1_3072_SHA256 =

RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.

6
RSA_SIGN_PKCS1_4096_SHA256 =

RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.

7
RSA_DECRYPT_OAEP_2048_SHA256 =

RSAES-OAEP 2048 bit key with a SHA256 digest.

8
RSA_DECRYPT_OAEP_3072_SHA256 =

RSAES-OAEP 3072 bit key with a SHA256 digest.

9
RSA_DECRYPT_OAEP_4096_SHA256 =

RSAES-OAEP 4096 bit key with a SHA256 digest.

10
EC_SIGN_P256_SHA256 =

ECDSA on the NIST P-256 curve with a SHA256 digest.

12
EC_SIGN_P384_SHA384 =

ECDSA on the NIST P-384 curve with a SHA384 digest.

13