Enum CryptoKeyVersion.CryptoKeyVersionAlgorithm

  • All Implemented Interfaces:
    com.google.protobuf.Internal.EnumLite, com.google.protobuf.ProtocolMessageEnum, Serializable, Comparable<CryptoKeyVersion.CryptoKeyVersionAlgorithm>
    Enclosing class:
    CryptoKeyVersion

    public static enum CryptoKeyVersion.CryptoKeyVersionAlgorithm
    extends Enum<CryptoKeyVersion.CryptoKeyVersionAlgorithm>
    implements com.google.protobuf.ProtocolMessageEnum
     The algorithm of the
     [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
     parameters must be used for each cryptographic operation.
    
     The
     [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION]
     algorithm is usable with
     [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
     [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
    
     Algorithms beginning with `RSA_SIGN_` are usable with
     [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
     [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.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][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.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][google.cloud.kms.v1.CryptoKey.purpose]
     [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.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][google.cloud.kms.v1.CryptoKey.purpose]
     [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
    
     The fields in the name after `EC_SIGN_` correspond to the following
     parameters: elliptic curve, digest algorithm.
    
     Algorithms beginning with `HMAC_` are usable with
     [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
     [MAC][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.MAC].
    
     The suffix following `HMAC_` corresponds to the hash algorithm being used
     (eg. SHA256).
    
     For more information, see [Key purposes and algorithms]
     (https://cloud.google.com/kms/docs/algorithms).
     
    Protobuf enum google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm
    • Field Detail

      • CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED_VALUE

        public static final int CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED_VALUE
         Not specified.
         
        CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED = 0;
        See Also:
        Constant Field Values
      • GOOGLE_SYMMETRIC_ENCRYPTION_VALUE

        public static final int GOOGLE_SYMMETRIC_ENCRYPTION_VALUE
         Creates symmetric encryption keys.
         
        GOOGLE_SYMMETRIC_ENCRYPTION = 1;
        See Also:
        Constant Field Values
      • AES_128_GCM_VALUE

        public static final int AES_128_GCM_VALUE
         AES-GCM (Galois Counter Mode) using 128-bit keys.
         
        AES_128_GCM = 41;
        See Also:
        Constant Field Values
      • AES_256_GCM_VALUE

        public static final int AES_256_GCM_VALUE
         AES-GCM (Galois Counter Mode) using 256-bit keys.
         
        AES_256_GCM = 19;
        See Also:
        Constant Field Values
      • AES_128_CBC_VALUE

        public static final int AES_128_CBC_VALUE
         AES-CBC (Cipher Block Chaining Mode) using 128-bit keys.
         
        AES_128_CBC = 42;
        See Also:
        Constant Field Values
      • AES_256_CBC_VALUE

        public static final int AES_256_CBC_VALUE
         AES-CBC (Cipher Block Chaining Mode) using 256-bit keys.
         
        AES_256_CBC = 43;
        See Also:
        Constant Field Values
      • AES_128_CTR_VALUE

        public static final int AES_128_CTR_VALUE
         AES-CTR (Counter Mode) using 128-bit keys.
         
        AES_128_CTR = 44;
        See Also:
        Constant Field Values
      • AES_256_CTR_VALUE

        public static final int AES_256_CTR_VALUE
         AES-CTR (Counter Mode) using 256-bit keys.
         
        AES_256_CTR = 45;
        See Also:
        Constant Field Values
      • RSA_SIGN_PSS_2048_SHA256_VALUE

        public static final int RSA_SIGN_PSS_2048_SHA256_VALUE
         RSASSA-PSS 2048 bit key with a SHA256 digest.
         
        RSA_SIGN_PSS_2048_SHA256 = 2;
        See Also:
        Constant Field Values
      • RSA_SIGN_PSS_3072_SHA256_VALUE

        public static final int RSA_SIGN_PSS_3072_SHA256_VALUE
         RSASSA-PSS 3072 bit key with a SHA256 digest.
         
        RSA_SIGN_PSS_3072_SHA256 = 3;
        See Also:
        Constant Field Values
      • RSA_SIGN_PSS_4096_SHA256_VALUE

        public static final int RSA_SIGN_PSS_4096_SHA256_VALUE
         RSASSA-PSS 4096 bit key with a SHA256 digest.
         
        RSA_SIGN_PSS_4096_SHA256 = 4;
        See Also:
        Constant Field Values
      • RSA_SIGN_PSS_4096_SHA512_VALUE

        public static final int RSA_SIGN_PSS_4096_SHA512_VALUE
         RSASSA-PSS 4096 bit key with a SHA512 digest.
         
        RSA_SIGN_PSS_4096_SHA512 = 15;
        See Also:
        Constant Field Values
      • RSA_SIGN_PKCS1_2048_SHA256_VALUE

        public static final int RSA_SIGN_PKCS1_2048_SHA256_VALUE
         RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
         
        RSA_SIGN_PKCS1_2048_SHA256 = 5;
        See Also:
        Constant Field Values
      • RSA_SIGN_PKCS1_3072_SHA256_VALUE

        public static final int RSA_SIGN_PKCS1_3072_SHA256_VALUE
         RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
         
        RSA_SIGN_PKCS1_3072_SHA256 = 6;
        See Also:
        Constant Field Values
      • RSA_SIGN_PKCS1_4096_SHA256_VALUE

        public static final int RSA_SIGN_PKCS1_4096_SHA256_VALUE
         RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
         
        RSA_SIGN_PKCS1_4096_SHA256 = 7;
        See Also:
        Constant Field Values
      • RSA_SIGN_PKCS1_4096_SHA512_VALUE

        public static final int RSA_SIGN_PKCS1_4096_SHA512_VALUE
         RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
         
        RSA_SIGN_PKCS1_4096_SHA512 = 16;
        See Also:
        Constant Field Values
      • RSA_SIGN_RAW_PKCS1_2048_VALUE

        public static final int RSA_SIGN_RAW_PKCS1_2048_VALUE
         RSASSA-PKCS1-v1_5 signing without encoding, with a 2048 bit key.
         
        RSA_SIGN_RAW_PKCS1_2048 = 28;
        See Also:
        Constant Field Values
      • RSA_SIGN_RAW_PKCS1_3072_VALUE

        public static final int RSA_SIGN_RAW_PKCS1_3072_VALUE
         RSASSA-PKCS1-v1_5 signing without encoding, with a 3072 bit key.
         
        RSA_SIGN_RAW_PKCS1_3072 = 29;
        See Also:
        Constant Field Values
      • RSA_SIGN_RAW_PKCS1_4096_VALUE

        public static final int RSA_SIGN_RAW_PKCS1_4096_VALUE
         RSASSA-PKCS1-v1_5 signing without encoding, with a 4096 bit key.
         
        RSA_SIGN_RAW_PKCS1_4096 = 30;
        See Also:
        Constant Field Values
      • RSA_DECRYPT_OAEP_2048_SHA256_VALUE

        public static final int RSA_DECRYPT_OAEP_2048_SHA256_VALUE
         RSAES-OAEP 2048 bit key with a SHA256 digest.
         
        RSA_DECRYPT_OAEP_2048_SHA256 = 8;
        See Also:
        Constant Field Values
      • RSA_DECRYPT_OAEP_3072_SHA256_VALUE

        public static final int RSA_DECRYPT_OAEP_3072_SHA256_VALUE
         RSAES-OAEP 3072 bit key with a SHA256 digest.
         
        RSA_DECRYPT_OAEP_3072_SHA256 = 9;
        See Also:
        Constant Field Values
      • RSA_DECRYPT_OAEP_4096_SHA256_VALUE

        public static final int RSA_DECRYPT_OAEP_4096_SHA256_VALUE
         RSAES-OAEP 4096 bit key with a SHA256 digest.
         
        RSA_DECRYPT_OAEP_4096_SHA256 = 10;
        See Also:
        Constant Field Values
      • RSA_DECRYPT_OAEP_4096_SHA512_VALUE

        public static final int RSA_DECRYPT_OAEP_4096_SHA512_VALUE
         RSAES-OAEP 4096 bit key with a SHA512 digest.
         
        RSA_DECRYPT_OAEP_4096_SHA512 = 17;
        See Also:
        Constant Field Values
      • RSA_DECRYPT_OAEP_2048_SHA1_VALUE

        public static final int RSA_DECRYPT_OAEP_2048_SHA1_VALUE
         RSAES-OAEP 2048 bit key with a SHA1 digest.
         
        RSA_DECRYPT_OAEP_2048_SHA1 = 37;
        See Also:
        Constant Field Values
      • RSA_DECRYPT_OAEP_3072_SHA1_VALUE

        public static final int RSA_DECRYPT_OAEP_3072_SHA1_VALUE
         RSAES-OAEP 3072 bit key with a SHA1 digest.
         
        RSA_DECRYPT_OAEP_3072_SHA1 = 38;
        See Also:
        Constant Field Values
      • RSA_DECRYPT_OAEP_4096_SHA1_VALUE

        public static final int RSA_DECRYPT_OAEP_4096_SHA1_VALUE
         RSAES-OAEP 4096 bit key with a SHA1 digest.
         
        RSA_DECRYPT_OAEP_4096_SHA1 = 39;
        See Also:
        Constant Field Values
      • EC_SIGN_P256_SHA256_VALUE

        public static final int EC_SIGN_P256_SHA256_VALUE
         ECDSA on the NIST P-256 curve with a SHA256 digest.
         Other hash functions can also be used:
         https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
         
        EC_SIGN_P256_SHA256 = 12;
        See Also:
        Constant Field Values
      • EC_SIGN_P384_SHA384_VALUE

        public static final int EC_SIGN_P384_SHA384_VALUE
         ECDSA on the NIST P-384 curve with a SHA384 digest.
         Other hash functions can also be used:
         https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
         
        EC_SIGN_P384_SHA384 = 13;
        See Also:
        Constant Field Values
      • EC_SIGN_SECP256K1_SHA256_VALUE

        public static final int EC_SIGN_SECP256K1_SHA256_VALUE
         ECDSA on the non-NIST secp256k1 curve. This curve is only supported for
         HSM protection level.
         Other hash functions can also be used:
         https://cloud.google.com/kms/docs/create-validate-signatures#ecdsa_support_for_other_hash_algorithms
         
        EC_SIGN_SECP256K1_SHA256 = 31;
        See Also:
        Constant Field Values
      • HMAC_SHA256_VALUE

        public static final int HMAC_SHA256_VALUE
         HMAC-SHA256 signing with a 256 bit key.
         
        HMAC_SHA256 = 32;
        See Also:
        Constant Field Values
      • HMAC_SHA1_VALUE

        public static final int HMAC_SHA1_VALUE
         HMAC-SHA1 signing with a 160 bit key.
         
        HMAC_SHA1 = 33;
        See Also:
        Constant Field Values
      • HMAC_SHA384_VALUE

        public static final int HMAC_SHA384_VALUE
         HMAC-SHA384 signing with a 384 bit key.
         
        HMAC_SHA384 = 34;
        See Also:
        Constant Field Values
      • HMAC_SHA512_VALUE

        public static final int HMAC_SHA512_VALUE
         HMAC-SHA512 signing with a 512 bit key.
         
        HMAC_SHA512 = 35;
        See Also:
        Constant Field Values
      • HMAC_SHA224_VALUE

        public static final int HMAC_SHA224_VALUE
         HMAC-SHA224 signing with a 224 bit key.
         
        HMAC_SHA224 = 36;
        See Also:
        Constant Field Values
      • EXTERNAL_SYMMETRIC_ENCRYPTION_VALUE

        public static final int EXTERNAL_SYMMETRIC_ENCRYPTION_VALUE
         Algorithm representing symmetric encryption by an external key manager.
         
        EXTERNAL_SYMMETRIC_ENCRYPTION = 18;
        See Also:
        Constant Field Values
    • Method Detail

      • values

        public static CryptoKeyVersion.CryptoKeyVersionAlgorithm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (CryptoKeyVersion.CryptoKeyVersionAlgorithm c : CryptoKeyVersion.CryptoKeyVersionAlgorithm.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CryptoKeyVersion.CryptoKeyVersionAlgorithm valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getNumber

        public final int getNumber()
        Specified by:
        getNumber in interface com.google.protobuf.Internal.EnumLite
        Specified by:
        getNumber in interface com.google.protobuf.ProtocolMessageEnum
      • valueOf

        @Deprecated
        public static CryptoKeyVersion.CryptoKeyVersionAlgorithm valueOf​(int value)
        Deprecated.
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        value - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • forNumber

        public static CryptoKeyVersion.CryptoKeyVersionAlgorithm forNumber​(int value)
        Parameters:
        value - The numeric wire value of the corresponding enum entry.
        Returns:
        The enum associated with the given numeric wire value.
      • getValueDescriptor

        public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
        Specified by:
        getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptorForType

        public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnum
      • getDescriptor

        public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
      • valueOf

        public static CryptoKeyVersion.CryptoKeyVersionAlgorithm valueOf​(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        desc - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null