Enum KeySpec

java.lang.Object
java.lang.Enum<KeySpec>
software.amazon.awscdk.services.kms.KeySpec
All Implemented Interfaces:
Serializable, Comparable<KeySpec>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:17.465Z") @Stability(Stable) public enum KeySpec extends Enum<KeySpec>
The key spec, represents the cryptographic configuration of keys.

Example:

 Key key = Key.Builder.create(this, "MyKey")
         .keySpec(KeySpec.ECC_SECG_P256K1) // Default to SYMMETRIC_DEFAULT
         .keyUsage(KeyUsage.SIGN_VERIFY)
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-256 for the message digest.
    NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-384 for the message digest.
    NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-512 for the message digest.
    Standards for Efficient Cryptography 2, Section 2.4.1, ECDSA signature on the Koblitz curve.
    Hash-Based Message Authentication Code as defined in RFC 2104 using the message digest function SHA224.
    Hash-Based Message Authentication Code as defined in RFC 2104 using the message digest function SHA256.
    Hash-Based Message Authentication Code as defined in RFC 2104 using the message digest function SHA384.
    Hash-Based Message Authentication Code as defined in RFC 2104 using the message digest function SHA512.
    RSA with 2048 bits of key.
    RSA with 3072 bits of key.
    RSA with 4096 bits of key.
    Elliptic curve key spec available only in China Regions.
    The default key spec.
  • Method Summary

    Modifier and Type
    Method
    Description
    static KeySpec
    Returns the enum constant of this type with the specified name.
    static KeySpec[]
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SYMMETRIC_DEFAULT

      @Stability(Stable) public static final KeySpec SYMMETRIC_DEFAULT
      The default key spec.

      Valid usage: ENCRYPT_DECRYPT

    • RSA_2048

      @Stability(Stable) public static final KeySpec RSA_2048
      RSA with 2048 bits of key.

      Valid usage: ENCRYPT_DECRYPT and SIGN_VERIFY

    • RSA_3072

      @Stability(Stable) public static final KeySpec RSA_3072
      RSA with 3072 bits of key.

      Valid usage: ENCRYPT_DECRYPT and SIGN_VERIFY

    • RSA_4096

      @Stability(Stable) public static final KeySpec RSA_4096
      RSA with 4096 bits of key.

      Valid usage: ENCRYPT_DECRYPT and SIGN_VERIFY

    • ECC_NIST_P256

      @Stability(Stable) public static final KeySpec ECC_NIST_P256
      NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-256 for the message digest.

      Valid usage: SIGN_VERIFY

    • ECC_NIST_P384

      @Stability(Stable) public static final KeySpec ECC_NIST_P384
      NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-384 for the message digest.

      Valid usage: SIGN_VERIFY

    • ECC_NIST_P521

      @Stability(Stable) public static final KeySpec ECC_NIST_P521
      NIST FIPS 186-4, Section 6.4, ECDSA signature using the curve specified by the key and SHA-512 for the message digest.

      Valid usage: SIGN_VERIFY

    • ECC_SECG_P256K1

      @Stability(Stable) public static final KeySpec ECC_SECG_P256K1
      Standards for Efficient Cryptography 2, Section 2.4.1, ECDSA signature on the Koblitz curve.

      Valid usage: SIGN_VERIFY

    • HMAC_224

      @Stability(Stable) public static final KeySpec HMAC_224
      Hash-Based Message Authentication Code as defined in RFC 2104 using the message digest function SHA224.

      Valid usage: GENERATE_VERIFY_MAC

    • HMAC_256

      @Stability(Stable) public static final KeySpec HMAC_256
      Hash-Based Message Authentication Code as defined in RFC 2104 using the message digest function SHA256.

      Valid usage: GENERATE_VERIFY_MAC

    • HMAC_384

      @Stability(Stable) public static final KeySpec HMAC_384
      Hash-Based Message Authentication Code as defined in RFC 2104 using the message digest function SHA384.

      Valid usage: GENERATE_VERIFY_MAC

    • HMAC_512

      @Stability(Stable) public static final KeySpec HMAC_512
      Hash-Based Message Authentication Code as defined in RFC 2104 using the message digest function SHA512.

      Valid usage: GENERATE_VERIFY_MAC

    • SM2

      @Stability(Stable) public static final KeySpec SM2
      Elliptic curve key spec available only in China Regions.

      Valid usage: ENCRYPT_DECRYPT and SIGN_VERIFY

  • Method Details

    • values

      public static KeySpec[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static KeySpec 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