aws-sdk-kms 1.82.0 → 1.86.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e76f6e3fb0e6db3c06af73e578a928e2c1cdacb6926ba1f1a26b1d8dcb02afd2
4
- data.tar.gz: 58c29914d4b70a3cfbeaba2a076e831bcff93088cb61f1006327b2e42ee5c75f
3
+ metadata.gz: e8fc37df8e731c08854df6538e1a50e4f6de4d1db1af14645549116db92a30cf
4
+ data.tar.gz: 299a18aca7acc16d668ae19720791ea2aba53867ea887a28655459f63be51d1e
5
5
  SHA512:
6
- metadata.gz: 40ab0a33992f7dd3331a684fd36d061bd6dc93d34ff46cfcb62012aa960371eb80105534f63bfc502e6e2a0ecd9731234ce946f3794fc6c1a143e1aa3a1d3582
7
- data.tar.gz: 01b0c75d8f6b516cfe64102cfc6d1801f43e33c99e44882ea26592f4f10a6d75fcd58619640b7e9e43990afb9a90de87b206fa8823069500fcb0d9edd9372eae
6
+ metadata.gz: 7520a5b9e09a90f19e004c1fde4a8e999200567a11a809bb3587d43ec8b25c4b426815e0c3fcb50cccc3e50cc5548d70736a7a1519493ff6beadfea3ab9ccd82
7
+ data.tar.gz: b11b925455627fe1e3d9720078c3e215780aff41595597fc1e3492f0a3af658c6c6ac6fd3302a3543a19249d2cde43df10ef6d1c6a1baee2a69ed37e2f268d6d
data/CHANGELOG.md CHANGED
@@ -1,6 +1,26 @@
1
1
  Unreleased Changes
2
2
  ------------------
3
3
 
4
+ 1.86.0 (2024-06-24)
5
+ ------------------
6
+
7
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
8
+
9
+ 1.85.0 (2024-06-17)
10
+ ------------------
11
+
12
+ * Feature - Updating SDK example for KMS DeriveSharedSecret API.
13
+
14
+ 1.84.0 (2024-06-13)
15
+ ------------------
16
+
17
+ * Feature - This feature allows customers to use their keys stored in KMS to derive a shared secret which can then be used to establish a secured channel for communication, provide proof of possession, or establish trust with other parties.
18
+
19
+ 1.83.0 (2024-06-05)
20
+ ------------------
21
+
22
+ * Feature - Code Generated Changes, see `./build_tools` or `aws-sdk-core`'s CHANGELOG.md for details.
23
+
4
24
  1.82.0 (2024-05-22)
5
25
  ------------------
6
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.82.0
1
+ 1.86.0
@@ -89,6 +89,11 @@ module Aws::KMS
89
89
 
90
90
  # @overload initialize(options)
91
91
  # @param [Hash] options
92
+ #
93
+ # @option options [Array<Seahorse::Client::Plugin>] :plugins ([]])
94
+ # A list of plugins to apply to the client. Each plugin is either a
95
+ # class name or an instance of a plugin class.
96
+ #
92
97
  # @option options [required, Aws::CredentialProvider] :credentials
93
98
  # Your AWS credentials. This can be an instance of any one of the
94
99
  # following classes:
@@ -209,7 +214,6 @@ module Aws::KMS
209
214
  # 'https://example.com'
210
215
  # 'http://example.com:123'
211
216
  #
212
- #
213
217
  # @option options [Integer] :endpoint_cache_max_entries (1000)
214
218
  # Used for the maximum size limit of the LRU cache storing endpoints data
215
219
  # for endpoint discovery enabled operations. Defaults to 1000.
@@ -298,7 +302,6 @@ module Aws::KMS
298
302
  # throttling. This is a provisional mode that may change behavior
299
303
  # in the future.
300
304
  #
301
- #
302
305
  # @option options [String] :sdk_ua_app_id
303
306
  # A unique and opaque application ID that is appended to the
304
307
  # User-Agent header as app/sdk_ua_app_id. It should have a
@@ -1421,7 +1424,7 @@ module Aws::KMS
1421
1424
  # key_id: "KeyIdType", # required
1422
1425
  # grantee_principal: "PrincipalIdType", # required
1423
1426
  # retiring_principal: "PrincipalIdType",
1424
- # operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, Sign, Verify, GetPublicKey, CreateGrant, RetireGrant, DescribeKey, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, GenerateMac, VerifyMac
1427
+ # operations: ["Decrypt"], # required, accepts Decrypt, Encrypt, GenerateDataKey, GenerateDataKeyWithoutPlaintext, ReEncryptFrom, ReEncryptTo, Sign, Verify, GetPublicKey, CreateGrant, RetireGrant, DescribeKey, GenerateDataKeyPair, GenerateDataKeyPairWithoutPlaintext, GenerateMac, VerifyMac, DeriveSharedSecret
1425
1428
  # constraints: {
1426
1429
  # encryption_context_subset: {
1427
1430
  # "EncryptionContextKey" => "EncryptionContextValue",
@@ -1508,12 +1511,17 @@ module Aws::KMS
1508
1511
  # key pair, or an SM2 key pair (China Regions only). The private key
1509
1512
  # in an asymmetric KMS key never leaves KMS unencrypted. However, you
1510
1513
  # can use the GetPublicKey operation to download the public key so it
1511
- # can be used outside of KMS. KMS keys with RSA or SM2 key pairs can
1512
- # be used to encrypt or decrypt data or sign and verify messages (but
1513
- # not both). KMS keys with ECC key pairs can be used only to sign and
1514
- # verify messages. For information about asymmetric KMS keys, see
1515
- # [Asymmetric KMS keys][3] in the *Key Management Service Developer
1516
- # Guide*.
1514
+ # can be used outside of KMS. Each KMS key can have only one key
1515
+ # usage. KMS keys with RSA key pairs can be used to encrypt and
1516
+ # decrypt data or sign and verify messages (but not both). KMS keys
1517
+ # with NIST-recommended ECC key pairs can be used to sign and verify
1518
+ # messages or derive shared secrets (but not both). KMS keys with
1519
+ # `ECC_SECG_P256K1` can be used only to sign and verify messages. KMS
1520
+ # keys with SM2 key pairs (China Regions only) can be used to either
1521
+ # encrypt and decrypt data, sign and verify messages, or derive shared
1522
+ # secrets (you must choose one key usage type). For information about
1523
+ # asymmetric KMS keys, see [Asymmetric KMS keys][3] in the *Key
1524
+ # Management Service Developer Guide*.
1517
1525
  #
1518
1526
  #
1519
1527
  #
@@ -1735,14 +1743,17 @@ module Aws::KMS
1735
1743
  #
1736
1744
  # * For HMAC KMS keys (symmetric), specify `GENERATE_VERIFY_MAC`.
1737
1745
  #
1738
- # * For asymmetric KMS keys with RSA key material, specify
1746
+ # * For asymmetric KMS keys with RSA key pairs, specify
1739
1747
  # `ENCRYPT_DECRYPT` or `SIGN_VERIFY`.
1740
1748
  #
1741
- # * For asymmetric KMS keys with ECC key material, specify
1749
+ # * For asymmetric KMS keys with NIST-recommended elliptic curve key
1750
+ # pairs, specify `SIGN_VERIFY` or `KEY_AGREEMENT`.
1751
+ #
1752
+ # * For asymmetric KMS keys with `ECC_SECG_P256K1` key pairs specify
1742
1753
  # `SIGN_VERIFY`.
1743
1754
  #
1744
- # * For asymmetric KMS keys with SM2 key material (China Regions only),
1745
- # specify `ENCRYPT_DECRYPT` or `SIGN_VERIFY`.
1755
+ # * For asymmetric KMS keys with SM2 key pairs (China Regions only),
1756
+ # specify `ENCRYPT_DECRYPT`, `SIGN_VERIFY`, or `KEY_AGREEMENT`.
1746
1757
  #
1747
1758
  #
1748
1759
  #
@@ -1795,7 +1806,8 @@ module Aws::KMS
1795
1806
  #
1796
1807
  # * `HMAC_512`
1797
1808
  #
1798
- # * Asymmetric RSA key pairs
1809
+ # * Asymmetric RSA key pairs (encryption and decryption -or- signing and
1810
+ # verification)
1799
1811
  #
1800
1812
  # * `RSA_2048`
1801
1813
  #
@@ -1803,7 +1815,8 @@ module Aws::KMS
1803
1815
  #
1804
1816
  # * `RSA_4096`
1805
1817
  #
1806
- # * Asymmetric NIST-recommended elliptic curve key pairs
1818
+ # * Asymmetric NIST-recommended elliptic curve key pairs (signing and
1819
+ # verification -or- deriving shared secrets)
1807
1820
  #
1808
1821
  # * `ECC_NIST_P256` (secp256r1)
1809
1822
  #
@@ -1811,15 +1824,16 @@ module Aws::KMS
1811
1824
  #
1812
1825
  # * `ECC_NIST_P521` (secp521r1)
1813
1826
  #
1814
- # * Other asymmetric elliptic curve key pairs
1827
+ # * Other asymmetric elliptic curve key pairs (signing and verification)
1815
1828
  #
1816
1829
  # * `ECC_SECG_P256K1` (secp256k1), commonly used for cryptocurrencies.
1817
1830
  #
1818
1831
  # ^
1819
1832
  #
1820
- # * SM2 key pairs (China Regions only)
1833
+ # * SM2 key pairs (encryption and decryption -or- signing and
1834
+ # verification -or- deriving shared secrets)
1821
1835
  #
1822
- # * `SM2`
1836
+ # * `SM2` (China Regions only)
1823
1837
  #
1824
1838
  # ^
1825
1839
  #
@@ -2283,7 +2297,7 @@ module Aws::KMS
2283
2297
  # resp = client.create_key({
2284
2298
  # policy: "PolicyType",
2285
2299
  # description: "DescriptionType",
2286
- # key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT, GENERATE_VERIFY_MAC
2300
+ # key_usage: "SIGN_VERIFY", # accepts SIGN_VERIFY, ENCRYPT_DECRYPT, GENERATE_VERIFY_MAC, KEY_AGREEMENT
2287
2301
  # customer_master_key_spec: "RSA_2048", # accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1, SYMMETRIC_DEFAULT, HMAC_224, HMAC_256, HMAC_384, HMAC_512, SM2
2288
2302
  # key_spec: "RSA_2048", # accepts RSA_2048, RSA_3072, RSA_4096, ECC_NIST_P256, ECC_NIST_P384, ECC_NIST_P521, ECC_SECG_P256K1, SYMMETRIC_DEFAULT, HMAC_224, HMAC_256, HMAC_384, HMAC_512, SM2
2289
2303
  # origin: "AWS_KMS", # accepts AWS_KMS, EXTERNAL, AWS_CLOUDHSM, EXTERNAL_KEY_STORE
@@ -2307,7 +2321,7 @@ module Aws::KMS
2307
2321
  # resp.key_metadata.creation_date #=> Time
2308
2322
  # resp.key_metadata.enabled #=> Boolean
2309
2323
  # resp.key_metadata.description #=> String
2310
- # resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC"
2324
+ # resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC", "KEY_AGREEMENT"
2311
2325
  # resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
2312
2326
  # resp.key_metadata.deletion_date #=> Time
2313
2327
  # resp.key_metadata.valid_to #=> Time
@@ -2322,6 +2336,8 @@ module Aws::KMS
2322
2336
  # resp.key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
2323
2337
  # resp.key_metadata.signing_algorithms #=> Array
2324
2338
  # resp.key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512", "SM2DSA"
2339
+ # resp.key_metadata.key_agreement_algorithms #=> Array
2340
+ # resp.key_metadata.key_agreement_algorithms[0] #=> String, one of "ECDH"
2325
2341
  # resp.key_metadata.multi_region #=> Boolean
2326
2342
  # resp.key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
2327
2343
  # resp.key_metadata.multi_region_configuration.primary_key.arn #=> String
@@ -2918,6 +2934,270 @@ module Aws::KMS
2918
2934
  req.send_request(options)
2919
2935
  end
2920
2936
 
2937
+ # Derives a shared secret using a key agreement algorithm.
2938
+ #
2939
+ # <note markdown="1"> You must use an asymmetric NIST-recommended elliptic curve (ECC) or
2940
+ # SM2 (China Regions only) KMS key pair with a `KeyUsage` value of
2941
+ # `KEY_AGREEMENT` to call DeriveSharedSecret.
2942
+ #
2943
+ # </note>
2944
+ #
2945
+ # DeriveSharedSecret uses the [Elliptic Curve Cryptography Cofactor
2946
+ # Diffie-Hellman Primitive][1] (ECDH) to establish a key agreement
2947
+ # between two peers by deriving a shared secret from their elliptic
2948
+ # curve public-private key pairs. You can use the raw shared secret that
2949
+ # DeriveSharedSecret returns to derive a symmetric key that can encrypt
2950
+ # and decrypt data that is sent between the two peers, or that can
2951
+ # generate and verify HMACs. KMS recommends that you follow [NIST
2952
+ # recommendations for key derivation][2] when using the raw shared
2953
+ # secret to derive a symmetric key.
2954
+ #
2955
+ # The following workflow demonstrates how to establish key agreement
2956
+ # over an insecure communication channel using DeriveSharedSecret.
2957
+ #
2958
+ # 1. **Alice** calls CreateKey to create an asymmetric KMS key pair
2959
+ # with a `KeyUsage` value of `KEY_AGREEMENT`.
2960
+ #
2961
+ # The asymmetric KMS key must use a NIST-recommended elliptic curve
2962
+ # (ECC) or SM2 (China Regions only) key spec.
2963
+ #
2964
+ # 2. **Bob** creates an elliptic curve key pair.
2965
+ #
2966
+ # Bob can call CreateKey to create an asymmetric KMS key pair or
2967
+ # generate a key pair outside of KMS. Bob's key pair must use the
2968
+ # same NIST-recommended elliptic curve (ECC) or SM2 (China Regions
2969
+ # ony) curve as Alice.
2970
+ #
2971
+ # 3. Alice and Bob **exchange their public keys** through an insecure
2972
+ # communication channel (like the internet).
2973
+ #
2974
+ # Use GetPublicKey to download the public key of your asymmetric KMS
2975
+ # key pair.
2976
+ #
2977
+ # <note markdown="1"> KMS strongly recommends verifying that the public key you receive
2978
+ # came from the expected party before using it to derive a shared
2979
+ # secret.
2980
+ #
2981
+ # </note>
2982
+ #
2983
+ # 4. **Alice** calls DeriveSharedSecret.
2984
+ #
2985
+ # KMS uses the private key from the KMS key pair generated in **Step
2986
+ # 1**, Bob's public key, and the Elliptic Curve Cryptography
2987
+ # Cofactor Diffie-Hellman Primitive to derive the shared secret. The
2988
+ # private key in your KMS key pair never leaves KMS unencrypted.
2989
+ # DeriveSharedSecret returns the raw shared secret.
2990
+ #
2991
+ # 5. **Bob** uses the Elliptic Curve Cryptography Cofactor
2992
+ # Diffie-Hellman Primitive to calculate the same raw secret using
2993
+ # his private key and Alice's public key.
2994
+ #
2995
+ # To derive a shared secret you must provide a key agreement algorithm,
2996
+ # the private key of the caller's asymmetric NIST-recommended elliptic
2997
+ # curve or SM2 (China Regions only) KMS key pair, and the public key
2998
+ # from your peer's NIST-recommended elliptic curve or SM2 (China
2999
+ # Regions only) key pair. The public key can be from another asymmetric
3000
+ # KMS key pair or from a key pair generated outside of KMS, but both key
3001
+ # pairs must be on the same elliptic curve.
3002
+ #
3003
+ # The KMS key that you use for this operation must be in a compatible
3004
+ # key state. For details, see [Key states of KMS keys][3] in the *Key
3005
+ # Management Service Developer Guide*.
3006
+ #
3007
+ # **Cross-account use**: Yes. To perform this operation with a KMS key
3008
+ # in a different Amazon Web Services account, specify the key ARN or
3009
+ # alias ARN in the value of the `KeyId` parameter.
3010
+ #
3011
+ # **Required permissions**: [kms:DeriveSharedSecret][4] (key policy)
3012
+ #
3013
+ # **Related operations:**
3014
+ #
3015
+ # * CreateKey
3016
+ #
3017
+ # * GetPublicKey
3018
+ #
3019
+ # * DescribeKey
3020
+ #
3021
+ # **Eventual consistency**: The KMS API follows an eventual consistency
3022
+ # model. For more information, see [KMS eventual consistency][5].
3023
+ #
3024
+ #
3025
+ #
3026
+ # [1]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf#page=60
3027
+ # [2]: https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Cr2.pdf
3028
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html
3029
+ # [4]: https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html
3030
+ # [5]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html
3031
+ #
3032
+ # @option params [required, String] :key_id
3033
+ # Identifies an asymmetric NIST-recommended ECC or SM2 (China Regions
3034
+ # only) KMS key. KMS uses the private key in the specified key pair to
3035
+ # derive the shared secret. The key usage of the KMS key must be
3036
+ # `KEY_AGREEMENT`. To find the `KeyUsage` of a KMS key, use the
3037
+ # DescribeKey operation.
3038
+ #
3039
+ # To specify a KMS key, use its key ID, key ARN, alias name, or alias
3040
+ # ARN. When using an alias name, prefix it with `"alias/"`. To specify a
3041
+ # KMS key in a different Amazon Web Services account, you must use the
3042
+ # key ARN or alias ARN.
3043
+ #
3044
+ # For example:
3045
+ #
3046
+ # * Key ID: `1234abcd-12ab-34cd-56ef-1234567890ab`
3047
+ #
3048
+ # * Key ARN:
3049
+ # `arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`
3050
+ #
3051
+ # * Alias name: `alias/ExampleAlias`
3052
+ #
3053
+ # * Alias ARN: `arn:aws:kms:us-east-2:111122223333:alias/ExampleAlias`
3054
+ #
3055
+ # To get the key ID and key ARN for a KMS key, use ListKeys or
3056
+ # DescribeKey. To get the alias name and alias ARN, use ListAliases.
3057
+ #
3058
+ # @option params [required, String] :key_agreement_algorithm
3059
+ # Specifies the key agreement algorithm used to derive the shared
3060
+ # secret. The only valid value is `ECDH`.
3061
+ #
3062
+ # @option params [required, String, StringIO, File] :public_key
3063
+ # Specifies the public key in your peer's NIST-recommended elliptic
3064
+ # curve (ECC) or SM2 (China Regions only) key pair.
3065
+ #
3066
+ # The public key must be a DER-encoded X.509 public key, also known as
3067
+ # `SubjectPublicKeyInfo` (SPKI), as defined in [RFC 5280][1].
3068
+ #
3069
+ # GetPublicKey returns the public key of an asymmetric KMS key pair in
3070
+ # the required DER-encoded format.
3071
+ #
3072
+ # <note markdown="1"> If you use [Amazon Web Services CLI version 1][2], you must provide
3073
+ # the DER-encoded X.509 public key in a file. Otherwise, the Amazon Web
3074
+ # Services CLI Base64-encodes the public key a second time, resulting in
3075
+ # a `ValidationException`.
3076
+ #
3077
+ # </note>
3078
+ #
3079
+ # You can specify the public key as binary data in a file using fileb
3080
+ # (`fileb://<path-to-file>`) or in-line using a Base64 encoded string.
3081
+ #
3082
+ #
3083
+ #
3084
+ # [1]: https://tools.ietf.org/html/rfc5280
3085
+ # [2]: https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-welcome.html
3086
+ #
3087
+ # @option params [Array<String>] :grant_tokens
3088
+ # A list of grant tokens.
3089
+ #
3090
+ # Use a grant token when your permission to call this operation comes
3091
+ # from a new grant that has not yet achieved *eventual consistency*. For
3092
+ # more information, see [Grant token][1] and [Using a grant token][2] in
3093
+ # the *Key Management Service Developer Guide*.
3094
+ #
3095
+ #
3096
+ #
3097
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token
3098
+ # [2]: https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token
3099
+ #
3100
+ # @option params [Boolean] :dry_run
3101
+ # Checks if your request will succeed. `DryRun` is an optional
3102
+ # parameter.
3103
+ #
3104
+ # To learn more about how to use this parameter, see [Testing your KMS
3105
+ # API calls][1] in the *Key Management Service Developer Guide*.
3106
+ #
3107
+ #
3108
+ #
3109
+ # [1]: https://docs.aws.amazon.com/kms/latest/developerguide/programming-dryrun.html
3110
+ #
3111
+ # @option params [Types::RecipientInfo] :recipient
3112
+ # A signed [attestation document][1] from an Amazon Web Services Nitro
3113
+ # enclave and the encryption algorithm to use with the enclave's public
3114
+ # key. The only valid encryption algorithm is `RSAES_OAEP_SHA_256`.
3115
+ #
3116
+ # This parameter only supports attestation documents for Amazon Web
3117
+ # Services Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web
3118
+ # Services Nitro Enclaves, use the [Amazon Web Services Nitro Enclaves
3119
+ # SDK][2] to generate the attestation document and then use the
3120
+ # Recipient parameter from any Amazon Web Services SDK to provide the
3121
+ # attestation document for the enclave.
3122
+ #
3123
+ # When you use this parameter, instead of returning a plaintext copy of
3124
+ # the shared secret, KMS encrypts the plaintext shared secret under the
3125
+ # public key in the attestation document, and returns the resulting
3126
+ # ciphertext in the `CiphertextForRecipient` field in the response. This
3127
+ # ciphertext can be decrypted only with the private key in the enclave.
3128
+ # The `CiphertextBlob` field in the response contains the encrypted
3129
+ # shared secret derived from the KMS key specified by the `KeyId`
3130
+ # parameter and public key specified by the `PublicKey` parameter. The
3131
+ # `SharedSecret` field in the response is null or empty.
3132
+ #
3133
+ # For information about the interaction between KMS and Amazon Web
3134
+ # Services Nitro Enclaves, see [How Amazon Web Services Nitro Enclaves
3135
+ # uses KMS][3] in the *Key Management Service Developer Guide*.
3136
+ #
3137
+ #
3138
+ #
3139
+ # [1]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/nitro-enclave-how.html#term-attestdoc
3140
+ # [2]: https://docs.aws.amazon.com/enclaves/latest/user/developing-applications.html#sdk
3141
+ # [3]: https://docs.aws.amazon.com/kms/latest/developerguide/services-nitro-enclaves.html
3142
+ #
3143
+ # @return [Types::DeriveSharedSecretResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
3144
+ #
3145
+ # * {Types::DeriveSharedSecretResponse#key_id #key_id} => String
3146
+ # * {Types::DeriveSharedSecretResponse#shared_secret #shared_secret} => String
3147
+ # * {Types::DeriveSharedSecretResponse#ciphertext_for_recipient #ciphertext_for_recipient} => String
3148
+ # * {Types::DeriveSharedSecretResponse#key_agreement_algorithm #key_agreement_algorithm} => String
3149
+ # * {Types::DeriveSharedSecretResponse#key_origin #key_origin} => String
3150
+ #
3151
+ #
3152
+ # @example Example: To derive a shared secret
3153
+ #
3154
+ # # The following example derives a shared secret using a key agreement algorithm.
3155
+ #
3156
+ # resp = client.derive_shared_secret({
3157
+ # key_agreement_algorithm: "ECDH", # The key agreement algorithm used to derive the shared secret. The only valid value is ECDH.
3158
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The key identifier for an asymmetric KMS key pair. The private key in the specified key pair is used to derive the shared secret.
3159
+ # public_key: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvH3Yj0wbkLEpUl95Cv1cJVjsVNSjwGq3tCLnzXfhVwVvmzGN8pYj3U8nKwgouaHbBWNJYjP5VutbbkKS4Kv4GojwZBJyHN17kmxo8yTjRmjR15SKIQ8cqRA2uaERMLnpztIXdZp232PQPbWGxDyXYJ0aJ5EFSag", # The public key in your peer's asymmetric key pair.
3160
+ # })
3161
+ #
3162
+ # resp.to_h outputs the following:
3163
+ # {
3164
+ # key_agreement_algorithm: "ECDH", # The key agreement algorithm used to derive the shared secret.
3165
+ # key_id: "1234abcd-12ab-34cd-56ef-1234567890ab", # The asymmetric KMS key pair used to derive the shared secret.
3166
+ # key_origin: "AWS_KMS", # The source of the key material for the specified KMS key.
3167
+ # shared_secret: "MEYCIQCKZLWyTk5runarx6XiAkU9gv3lbwPO/pHa+DXFehzdDwIhANwpsIV2g/9SPWLLsF6p/hiSskuIXMTRwqrMdVKWTMHG", # The raw secret derived from the specified key agreement algorithm, private key in the asymmetric KMS key, and your peer's public key.
3168
+ # }
3169
+ #
3170
+ # @example Request syntax with placeholder values
3171
+ #
3172
+ # resp = client.derive_shared_secret({
3173
+ # key_id: "KeyIdType", # required
3174
+ # key_agreement_algorithm: "ECDH", # required, accepts ECDH
3175
+ # public_key: "data", # required
3176
+ # grant_tokens: ["GrantTokenType"],
3177
+ # dry_run: false,
3178
+ # recipient: {
3179
+ # key_encryption_algorithm: "RSAES_OAEP_SHA_256", # accepts RSAES_OAEP_SHA_256
3180
+ # attestation_document: "data",
3181
+ # },
3182
+ # })
3183
+ #
3184
+ # @example Response structure
3185
+ #
3186
+ # resp.key_id #=> String
3187
+ # resp.shared_secret #=> String
3188
+ # resp.ciphertext_for_recipient #=> String
3189
+ # resp.key_agreement_algorithm #=> String, one of "ECDH"
3190
+ # resp.key_origin #=> String, one of "AWS_KMS", "EXTERNAL", "AWS_CLOUDHSM", "EXTERNAL_KEY_STORE"
3191
+ #
3192
+ # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/DeriveSharedSecret AWS API Documentation
3193
+ #
3194
+ # @overload derive_shared_secret(params = {})
3195
+ # @param [Hash] params ({})
3196
+ def derive_shared_secret(params = {}, options = {})
3197
+ req = build_request(:derive_shared_secret, params)
3198
+ req.send_request(options)
3199
+ end
3200
+
2921
3201
  # Gets information about [custom key stores][1] in the account and
2922
3202
  # Region.
2923
3203
  #
@@ -3502,7 +3782,7 @@ module Aws::KMS
3502
3782
  # resp.key_metadata.creation_date #=> Time
3503
3783
  # resp.key_metadata.enabled #=> Boolean
3504
3784
  # resp.key_metadata.description #=> String
3505
- # resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC"
3785
+ # resp.key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC", "KEY_AGREEMENT"
3506
3786
  # resp.key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
3507
3787
  # resp.key_metadata.deletion_date #=> Time
3508
3788
  # resp.key_metadata.valid_to #=> Time
@@ -3517,6 +3797,8 @@ module Aws::KMS
3517
3797
  # resp.key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
3518
3798
  # resp.key_metadata.signing_algorithms #=> Array
3519
3799
  # resp.key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512", "SM2DSA"
3800
+ # resp.key_metadata.key_agreement_algorithms #=> Array
3801
+ # resp.key_metadata.key_agreement_algorithms[0] #=> String, one of "ECDH"
3520
3802
  # resp.key_metadata.multi_region #=> Boolean
3521
3803
  # resp.key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
3522
3804
  # resp.key_metadata.multi_region_configuration.primary_key.arn #=> String
@@ -4783,8 +5065,11 @@ module Aws::KMS
4783
5065
  # key. The only valid encryption algorithm is `RSAES_OAEP_SHA_256`.
4784
5066
  #
4785
5067
  # This parameter only supports attestation documents for Amazon Web
4786
- # Services Nitro Enclaves. To include this parameter, use the [Amazon
4787
- # Web Services Nitro Enclaves SDK][2] or any Amazon Web Services SDK.
5068
+ # Services Nitro Enclaves. To call DeriveSharedSecret for an Amazon Web
5069
+ # Services Nitro Enclaves, use the [Amazon Web Services Nitro Enclaves
5070
+ # SDK][2] to generate the attestation document and then use the
5071
+ # Recipient parameter from any Amazon Web Services SDK to provide the
5072
+ # attestation document for the enclave.
4788
5073
  #
4789
5074
  # When you use this parameter, instead of returning a plaintext copy of
4790
5075
  # the private data key, KMS encrypts the plaintext private data key
@@ -5872,8 +6157,8 @@ module Aws::KMS
5872
6157
  # `GetParametersForImport` returns the items that you need to import
5873
6158
  # your key material.
5874
6159
  #
5875
- # * The public key (or "wrapping key") of an asymmetric key pair that
5876
- # KMS generates.
6160
+ # * The public key (or "wrapping key") of an RSA key pair that KMS
6161
+ # generates.
5877
6162
  #
5878
6163
  # You will use this public key to encrypt ("wrap") your key material
5879
6164
  # while it's in transit to KMS.
@@ -5951,28 +6236,20 @@ module Aws::KMS
5951
6236
  # DescribeKey.
5952
6237
  #
5953
6238
  # @option params [required, String] :wrapping_algorithm
5954
- # The algorithm you will use with the asymmetric public key
5955
- # (`PublicKey`) in the response to protect your key material during
5956
- # import. For more information, see [Select a wrapping
6239
+ # The algorithm you will use with the RSA public key (`PublicKey`) in
6240
+ # the response to protect your key material during import. For more
6241
+ # information, see [Select a wrapping
5957
6242
  # algorithm](kms/latest/developerguide/importing-keys-get-public-key-and-token.html#select-wrapping-algorithm)
5958
6243
  # in the *Key Management Service Developer Guide*.
5959
6244
  #
5960
6245
  # For RSA\_AES wrapping algorithms, you encrypt your key material with
5961
6246
  # an AES key that you generate, then encrypt your AES key with the RSA
5962
6247
  # public key from KMS. For RSAES wrapping algorithms, you encrypt your
5963
- # key material directly with the RSA public key from KMS. For SM2PKE
5964
- # wrapping algorithms, you encrypt your key material directly with the
5965
- # SM2 public key from KMS.
6248
+ # key material directly with the RSA public key from KMS.
5966
6249
  #
5967
6250
  # The wrapping algorithms that you can use depend on the type of key
5968
6251
  # material that you are importing. To import an RSA private key, you
5969
- # must use an RSA\_AES wrapping algorithm, except in China Regions,
5970
- # where you must use the SM2PKE wrapping algorithm to import an RSA
5971
- # private key.
5972
- #
5973
- # The SM2PKE wrapping algorithm is available only in China Regions. The
5974
- # `RSA_AES_KEY_WRAP_SHA_256` and `RSA_AES_KEY_WRAP_SHA_1` wrapping
5975
- # algorithms are not supported in China Regions.
6252
+ # must use an RSA\_AES wrapping algorithm.
5976
6253
  #
5977
6254
  # * **RSA\_AES\_KEY\_WRAP\_SHA\_256** — Supported for wrapping RSA and
5978
6255
  # ECC key material.
@@ -5995,22 +6272,17 @@ module Aws::KMS
5995
6272
  # * **RSAES\_PKCS1\_V1\_5** (Deprecated) — As of October 10, 2023, KMS
5996
6273
  # does not support the RSAES\_PKCS1\_V1\_5 wrapping algorithm.
5997
6274
  #
5998
- # * **SM2PKE** (China Regions only) — supported for wrapping RSA, ECC,
5999
- # and SM2 key material.
6000
- #
6001
6275
  # @option params [required, String] :wrapping_key_spec
6002
- # The type of public key to return in the response. You will use this
6003
- # wrapping key with the specified wrapping algorithm to protect your key
6004
- # material during import.
6276
+ # The type of RSA public key to return in the response. You will use
6277
+ # this wrapping key with the specified wrapping algorithm to protect
6278
+ # your key material during import.
6005
6279
  #
6006
- # Use the longest wrapping key that is practical.
6280
+ # Use the longest RSA wrapping key that is practical.
6007
6281
  #
6008
6282
  # You cannot use an RSA\_2048 public key to directly wrap an
6009
6283
  # ECC\_NIST\_P521 private key. Instead, use an RSA\_AES wrapping
6010
6284
  # algorithm or choose a longer RSA public key.
6011
6285
  #
6012
- # The SM2 wrapping key spec is available only in China Regions.
6013
- #
6014
6286
  # @return [Types::GetParametersForImportResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
6015
6287
  #
6016
6288
  # * {Types::GetParametersForImportResponse#key_id #key_id} => String
@@ -6144,7 +6416,8 @@ module Aws::KMS
6144
6416
  # * [KeySpec][2]: The type of key material in the public key, such as
6145
6417
  # `RSA_4096` or `ECC_NIST_P521`.
6146
6418
  #
6147
- # * [KeyUsage][3]: Whether the key is used for encryption or signing.
6419
+ # * [KeyUsage][3]: Whether the key is used for encryption, signing, or
6420
+ # deriving a shared secret.
6148
6421
  #
6149
6422
  # * [EncryptionAlgorithms][4] or [SigningAlgorithms][5]: A list of the
6150
6423
  # encryption algorithms or the signing algorithms for the key.
@@ -6233,6 +6506,7 @@ module Aws::KMS
6233
6506
  # * {Types::GetPublicKeyResponse#key_usage #key_usage} => String
6234
6507
  # * {Types::GetPublicKeyResponse#encryption_algorithms #encryption_algorithms} => Array&lt;String&gt;
6235
6508
  # * {Types::GetPublicKeyResponse#signing_algorithms #signing_algorithms} => Array&lt;String&gt;
6509
+ # * {Types::GetPublicKeyResponse#key_agreement_algorithms #key_agreement_algorithms} => Array&lt;String&gt;
6236
6510
  #
6237
6511
  #
6238
6512
  # @example Example: To download the public key of an asymmetric KMS key
@@ -6270,11 +6544,13 @@ module Aws::KMS
6270
6544
  # resp.public_key #=> String
6271
6545
  # resp.customer_master_key_spec #=> String, one of "RSA_2048", "RSA_3072", "RSA_4096", "ECC_NIST_P256", "ECC_NIST_P384", "ECC_NIST_P521", "ECC_SECG_P256K1", "SYMMETRIC_DEFAULT", "HMAC_224", "HMAC_256", "HMAC_384", "HMAC_512", "SM2"
6272
6546
  # resp.key_spec #=> String, one of "RSA_2048", "RSA_3072", "RSA_4096", "ECC_NIST_P256", "ECC_NIST_P384", "ECC_NIST_P521", "ECC_SECG_P256K1", "SYMMETRIC_DEFAULT", "HMAC_224", "HMAC_256", "HMAC_384", "HMAC_512", "SM2"
6273
- # resp.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC"
6547
+ # resp.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC", "KEY_AGREEMENT"
6274
6548
  # resp.encryption_algorithms #=> Array
6275
6549
  # resp.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
6276
6550
  # resp.signing_algorithms #=> Array
6277
6551
  # resp.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512", "SM2DSA"
6552
+ # resp.key_agreement_algorithms #=> Array
6553
+ # resp.key_agreement_algorithms[0] #=> String, one of "ECDH"
6278
6554
  #
6279
6555
  # @see http://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/GetPublicKey AWS API Documentation
6280
6556
  #
@@ -6877,7 +7153,7 @@ module Aws::KMS
6877
7153
  # resp.grants[0].retiring_principal #=> String
6878
7154
  # resp.grants[0].issuing_account #=> String
6879
7155
  # resp.grants[0].operations #=> Array
6880
- # resp.grants[0].operations[0] #=> String, one of "Decrypt", "Encrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", "ReEncryptFrom", "ReEncryptTo", "Sign", "Verify", "GetPublicKey", "CreateGrant", "RetireGrant", "DescribeKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", "VerifyMac"
7156
+ # resp.grants[0].operations[0] #=> String, one of "Decrypt", "Encrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", "ReEncryptFrom", "ReEncryptTo", "Sign", "Verify", "GetPublicKey", "CreateGrant", "RetireGrant", "DescribeKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", "VerifyMac", "DeriveSharedSecret"
6881
7157
  # resp.grants[0].constraints.encryption_context_subset #=> Hash
6882
7158
  # resp.grants[0].constraints.encryption_context_subset["EncryptionContextKey"] #=> String
6883
7159
  # resp.grants[0].constraints.encryption_context_equals #=> Hash
@@ -7499,7 +7775,7 @@ module Aws::KMS
7499
7775
  # resp.grants[0].retiring_principal #=> String
7500
7776
  # resp.grants[0].issuing_account #=> String
7501
7777
  # resp.grants[0].operations #=> Array
7502
- # resp.grants[0].operations[0] #=> String, one of "Decrypt", "Encrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", "ReEncryptFrom", "ReEncryptTo", "Sign", "Verify", "GetPublicKey", "CreateGrant", "RetireGrant", "DescribeKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", "VerifyMac"
7778
+ # resp.grants[0].operations[0] #=> String, one of "Decrypt", "Encrypt", "GenerateDataKey", "GenerateDataKeyWithoutPlaintext", "ReEncryptFrom", "ReEncryptTo", "Sign", "Verify", "GetPublicKey", "CreateGrant", "RetireGrant", "DescribeKey", "GenerateDataKeyPair", "GenerateDataKeyPairWithoutPlaintext", "GenerateMac", "VerifyMac", "DeriveSharedSecret"
7503
7779
  # resp.grants[0].constraints.encryption_context_subset #=> Hash
7504
7780
  # resp.grants[0].constraints.encryption_context_subset["EncryptionContextKey"] #=> String
7505
7781
  # resp.grants[0].constraints.encryption_context_equals #=> Hash
@@ -8337,7 +8613,7 @@ module Aws::KMS
8337
8613
  # resp.replica_key_metadata.creation_date #=> Time
8338
8614
  # resp.replica_key_metadata.enabled #=> Boolean
8339
8615
  # resp.replica_key_metadata.description #=> String
8340
- # resp.replica_key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC"
8616
+ # resp.replica_key_metadata.key_usage #=> String, one of "SIGN_VERIFY", "ENCRYPT_DECRYPT", "GENERATE_VERIFY_MAC", "KEY_AGREEMENT"
8341
8617
  # resp.replica_key_metadata.key_state #=> String, one of "Creating", "Enabled", "Disabled", "PendingDeletion", "PendingImport", "PendingReplicaDeletion", "Unavailable", "Updating"
8342
8618
  # resp.replica_key_metadata.deletion_date #=> Time
8343
8619
  # resp.replica_key_metadata.valid_to #=> Time
@@ -8352,6 +8628,8 @@ module Aws::KMS
8352
8628
  # resp.replica_key_metadata.encryption_algorithms[0] #=> String, one of "SYMMETRIC_DEFAULT", "RSAES_OAEP_SHA_1", "RSAES_OAEP_SHA_256", "SM2PKE"
8353
8629
  # resp.replica_key_metadata.signing_algorithms #=> Array
8354
8630
  # resp.replica_key_metadata.signing_algorithms[0] #=> String, one of "RSASSA_PSS_SHA_256", "RSASSA_PSS_SHA_384", "RSASSA_PSS_SHA_512", "RSASSA_PKCS1_V1_5_SHA_256", "RSASSA_PKCS1_V1_5_SHA_384", "RSASSA_PKCS1_V1_5_SHA_512", "ECDSA_SHA_256", "ECDSA_SHA_384", "ECDSA_SHA_512", "SM2DSA"
8631
+ # resp.replica_key_metadata.key_agreement_algorithms #=> Array
8632
+ # resp.replica_key_metadata.key_agreement_algorithms[0] #=> String, one of "ECDH"
8355
8633
  # resp.replica_key_metadata.multi_region #=> Boolean
8356
8634
  # resp.replica_key_metadata.multi_region_configuration.multi_region_key_type #=> String, one of "PRIMARY", "REPLICA"
8357
8635
  # resp.replica_key_metadata.multi_region_configuration.primary_key.arn #=> String
@@ -10471,7 +10749,7 @@ module Aws::KMS
10471
10749
  params: params,
10472
10750
  config: config)
10473
10751
  context[:gem_name] = 'aws-sdk-kms'
10474
- context[:gem_version] = '1.82.0'
10752
+ context[:gem_version] = '1.86.0'
10475
10753
  Seahorse::Client::Request.new(handlers, context)
10476
10754
  end
10477
10755