@aws-sdk/client-kms 3.596.0 → 3.597.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist-cjs/index.js +72 -0
- package/dist-es/KMS.js +2 -0
- package/dist-es/commands/DeriveSharedSecretCommand.js +25 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +9 -0
- package/dist-es/protocols/Aws_json1_1.js +40 -0
- package/dist-types/KMS.d.ts +7 -0
- package/dist-types/KMSClient.d.ts +3 -2
- package/dist-types/commands/CreateGrantCommand.d.ts +1 -1
- package/dist-types/commands/CreateKeyCommand.d.ts +11 -5
- package/dist-types/commands/DecryptCommand.d.ts +2 -1
- package/dist-types/commands/DeriveSharedSecretCommand.d.ts +224 -0
- package/dist-types/commands/DescribeKeyCommand.d.ts +4 -1
- package/dist-types/commands/EncryptCommand.d.ts +2 -1
- package/dist-types/commands/GenerateDataKeyCommand.d.ts +2 -1
- package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +2 -1
- package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +2 -1
- package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +2 -1
- package/dist-types/commands/GenerateMacCommand.d.ts +2 -1
- package/dist-types/commands/GetParametersForImportCommand.d.ts +1 -1
- package/dist-types/commands/GetPublicKeyCommand.d.ts +8 -3
- package/dist-types/commands/ListGrantsCommand.d.ts +1 -1
- package/dist-types/commands/ListRetirableGrantsCommand.d.ts +1 -1
- package/dist-types/commands/ReEncryptCommand.d.ts +2 -1
- package/dist-types/commands/ReplicateKeyCommand.d.ts +4 -1
- package/dist-types/commands/SignCommand.d.ts +2 -1
- package/dist-types/commands/VerifyCommand.d.ts +2 -1
- package/dist-types/commands/VerifyMacCommand.d.ts +2 -1
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +182 -33
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/KMS.d.ts +17 -0
- package/dist-types/ts3.4/KMSClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/DeriveSharedSecretCommand.d.ts +40 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +27 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { KMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../KMSClient";
|
|
4
|
+
import { DeriveSharedSecretRequest, DeriveSharedSecretResponse } from "../models/models_0";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link DeriveSharedSecretCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface DeriveSharedSecretCommandInput extends DeriveSharedSecretRequest {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link DeriveSharedSecretCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface DeriveSharedSecretCommandOutput extends DeriveSharedSecretResponse, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const DeriveSharedSecretCommand_base: {
|
|
25
|
+
new (input: DeriveSharedSecretCommandInput): import("@smithy/smithy-client").CommandImpl<DeriveSharedSecretCommandInput, DeriveSharedSecretCommandOutput, KMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: DeriveSharedSecretCommandInput): import("@smithy/smithy-client").CommandImpl<DeriveSharedSecretCommandInput, DeriveSharedSecretCommandOutput, KMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Derives a shared secret using a key agreement algorithm.</p>
|
|
31
|
+
* <note>
|
|
32
|
+
* <p>You must use an asymmetric NIST-recommended elliptic curve (ECC) or SM2 (China Regions only)
|
|
33
|
+
* KMS key pair with a <code>KeyUsage</code> value of <code>KEY_AGREEMENT</code> to call DeriveSharedSecret.</p>
|
|
34
|
+
* </note>
|
|
35
|
+
* <p>DeriveSharedSecret uses the <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Ar3.pdf#page=60">Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive</a> (ECDH) to
|
|
36
|
+
* establish a key agreement between two peers by deriving a shared secret from their elliptic curve
|
|
37
|
+
* public-private key pairs. You can use the raw shared secret that DeriveSharedSecret returns to derive
|
|
38
|
+
* a symmetric key that can encrypt and decrypt data that is sent between the two peers, or that can
|
|
39
|
+
* generate and verify HMACs. KMS recommends that you follow <a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-56Cr2.pdf">NIST recommendations for key derivation</a> when using the raw shared secret to derive a
|
|
40
|
+
* symmetric key.</p>
|
|
41
|
+
* <p>The following workflow demonstrates how to establish key agreement over an insecure communication
|
|
42
|
+
* channel using DeriveSharedSecret.</p>
|
|
43
|
+
* <ol>
|
|
44
|
+
* <li>
|
|
45
|
+
* <p>
|
|
46
|
+
* <b>Alice</b> calls <a>CreateKey</a> to create an asymmetric
|
|
47
|
+
* KMS key pair with a <code>KeyUsage</code> value of <code>KEY_AGREEMENT</code>.</p>
|
|
48
|
+
* <p>The asymmetric KMS key must use a NIST-recommended elliptic curve (ECC) or SM2 (China Regions only) key spec.</p>
|
|
49
|
+
* </li>
|
|
50
|
+
* <li>
|
|
51
|
+
* <p>
|
|
52
|
+
* <b>Bob</b> creates an elliptic curve key pair.</p>
|
|
53
|
+
* <p>Bob can call <a>CreateKey</a> to create an asymmetric KMS key
|
|
54
|
+
* pair or generate a key pair outside of KMS. Bob's key pair must use the same NIST-recommended elliptic curve (ECC)
|
|
55
|
+
* or SM2 (China Regions ony) curve as Alice.</p>
|
|
56
|
+
* </li>
|
|
57
|
+
* <li>
|
|
58
|
+
* <p>Alice and Bob <b>exchange their public keys</b>
|
|
59
|
+
* through an insecure communication channel (like the internet).</p>
|
|
60
|
+
* <p>Use <a>GetPublicKey</a> to download the public key of your asymmetric KMS key pair.</p>
|
|
61
|
+
* <note>
|
|
62
|
+
* <p>KMS strongly recommends verifying that the public key you receive came from the expected
|
|
63
|
+
* party before using it to derive a shared secret.</p>
|
|
64
|
+
* </note>
|
|
65
|
+
* </li>
|
|
66
|
+
* <li>
|
|
67
|
+
* <p>
|
|
68
|
+
* <b>Alice</b> calls DeriveSharedSecret.</p>
|
|
69
|
+
* <p>KMS uses the private key from the KMS key pair generated in <b>Step 1</b>,
|
|
70
|
+
* Bob's public key, and the Elliptic Curve Cryptography Cofactor Diffie-Hellman Primitive to derive the
|
|
71
|
+
* shared secret. The private key in your KMS key pair never leaves KMS unencrypted. DeriveSharedSecret
|
|
72
|
+
* returns the raw shared secret.</p>
|
|
73
|
+
* </li>
|
|
74
|
+
* <li>
|
|
75
|
+
* <p>
|
|
76
|
+
* <b>Bob</b> uses the Elliptic Curve Cryptography Cofactor Diffie-Hellman
|
|
77
|
+
* Primitive to calculate the same raw secret using his private key and Alice's public key.</p>
|
|
78
|
+
* </li>
|
|
79
|
+
* </ol>
|
|
80
|
+
* <p>To derive a shared secret you must provide a key agreement algorithm, the private key of the caller's asymmetric NIST-recommended
|
|
81
|
+
* elliptic curve or SM2 (China Regions only) KMS key pair, and the public key from your peer's NIST-recommended elliptic curve
|
|
82
|
+
* or SM2 (China Regions only) key pair. The public key can be from another asymmetric KMS key pair or from a key pair generated outside
|
|
83
|
+
* of KMS, but both key pairs must be on the same elliptic curve.</p>
|
|
84
|
+
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
85
|
+
* details, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
86
|
+
* <p>
|
|
87
|
+
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
88
|
+
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
89
|
+
* <p>
|
|
90
|
+
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:DeriveSharedSecret</a> (key policy)</p>
|
|
91
|
+
* <p>
|
|
92
|
+
* <b>Related operations:</b>
|
|
93
|
+
* </p>
|
|
94
|
+
* <ul>
|
|
95
|
+
* <li>
|
|
96
|
+
* <p>
|
|
97
|
+
* <a>CreateKey</a>
|
|
98
|
+
* </p>
|
|
99
|
+
* </li>
|
|
100
|
+
* <li>
|
|
101
|
+
* <p>
|
|
102
|
+
* <a>GetPublicKey</a>
|
|
103
|
+
* </p>
|
|
104
|
+
* </li>
|
|
105
|
+
* <li>
|
|
106
|
+
* <p>
|
|
107
|
+
* <a>DescribeKey</a>
|
|
108
|
+
* </p>
|
|
109
|
+
* </li>
|
|
110
|
+
* </ul>
|
|
111
|
+
* <p>
|
|
112
|
+
* <b>Eventual consistency</b>: The KMS API follows an eventual consistency model.
|
|
113
|
+
* For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/programming-eventual-consistency.html">KMS eventual consistency</a>.</p>
|
|
114
|
+
* @example
|
|
115
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
116
|
+
* ```javascript
|
|
117
|
+
* import { KMSClient, DeriveSharedSecretCommand } from "@aws-sdk/client-kms"; // ES Modules import
|
|
118
|
+
* // const { KMSClient, DeriveSharedSecretCommand } = require("@aws-sdk/client-kms"); // CommonJS import
|
|
119
|
+
* const client = new KMSClient(config);
|
|
120
|
+
* const input = { // DeriveSharedSecretRequest
|
|
121
|
+
* KeyId: "STRING_VALUE", // required
|
|
122
|
+
* KeyAgreementAlgorithm: "ECDH", // required
|
|
123
|
+
* PublicKey: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
|
|
124
|
+
* GrantTokens: [ // GrantTokenList
|
|
125
|
+
* "STRING_VALUE",
|
|
126
|
+
* ],
|
|
127
|
+
* DryRun: true || false,
|
|
128
|
+
* Recipient: { // RecipientInfo
|
|
129
|
+
* KeyEncryptionAlgorithm: "RSAES_OAEP_SHA_256",
|
|
130
|
+
* AttestationDocument: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("")
|
|
131
|
+
* },
|
|
132
|
+
* };
|
|
133
|
+
* const command = new DeriveSharedSecretCommand(input);
|
|
134
|
+
* const response = await client.send(command);
|
|
135
|
+
* // { // DeriveSharedSecretResponse
|
|
136
|
+
* // KeyId: "STRING_VALUE",
|
|
137
|
+
* // SharedSecret: new Uint8Array(),
|
|
138
|
+
* // CiphertextForRecipient: new Uint8Array(),
|
|
139
|
+
* // KeyAgreementAlgorithm: "ECDH",
|
|
140
|
+
* // KeyOrigin: "AWS_KMS" || "EXTERNAL" || "AWS_CLOUDHSM" || "EXTERNAL_KEY_STORE",
|
|
141
|
+
* // };
|
|
142
|
+
*
|
|
143
|
+
* ```
|
|
144
|
+
*
|
|
145
|
+
* @param DeriveSharedSecretCommandInput - {@link DeriveSharedSecretCommandInput}
|
|
146
|
+
* @returns {@link DeriveSharedSecretCommandOutput}
|
|
147
|
+
* @see {@link DeriveSharedSecretCommandInput} for command's `input` shape.
|
|
148
|
+
* @see {@link DeriveSharedSecretCommandOutput} for command's `response` shape.
|
|
149
|
+
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
150
|
+
*
|
|
151
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
152
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
153
|
+
* request.</p>
|
|
154
|
+
*
|
|
155
|
+
* @throws {@link DisabledException} (client fault)
|
|
156
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
157
|
+
*
|
|
158
|
+
* @throws {@link DryRunOperationException} (client fault)
|
|
159
|
+
* <p> The request was rejected because the DryRun parameter was specified. </p>
|
|
160
|
+
*
|
|
161
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
162
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
163
|
+
*
|
|
164
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
165
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
166
|
+
* <ul>
|
|
167
|
+
* <li>
|
|
168
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
169
|
+
* operation.</p>
|
|
170
|
+
* </li>
|
|
171
|
+
* <li>
|
|
172
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
173
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
174
|
+
* </li>
|
|
175
|
+
* </ul>
|
|
176
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
177
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
178
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
179
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
180
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
181
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
182
|
+
* <a>DescribeKey</a> operation.</p>
|
|
183
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
184
|
+
* <a>DescribeKey</a> operation.</p>
|
|
185
|
+
*
|
|
186
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
187
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
188
|
+
* the request.</p>
|
|
189
|
+
*
|
|
190
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
191
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
192
|
+
* retried.</p>
|
|
193
|
+
*
|
|
194
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
195
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
196
|
+
* request.</p>
|
|
197
|
+
* <p>This exceptions means one of the following:</p>
|
|
198
|
+
* <ul>
|
|
199
|
+
* <li>
|
|
200
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
201
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
202
|
+
* information about which key states are compatible with each KMS operation, see
|
|
203
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
204
|
+
* <i>Key Management Service Developer Guide</i>
|
|
205
|
+
* </i>.</p>
|
|
206
|
+
* </li>
|
|
207
|
+
* <li>
|
|
208
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception
|
|
209
|
+
* represents a general failure with many possible causes. To identify the cause, see the
|
|
210
|
+
* error message that accompanies the exception.</p>
|
|
211
|
+
* </li>
|
|
212
|
+
* </ul>
|
|
213
|
+
*
|
|
214
|
+
* @throws {@link NotFoundException} (client fault)
|
|
215
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
216
|
+
* found.</p>
|
|
217
|
+
*
|
|
218
|
+
* @throws {@link KMSServiceException}
|
|
219
|
+
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
220
|
+
*
|
|
221
|
+
* @public
|
|
222
|
+
*/
|
|
223
|
+
export declare class DeriveSharedSecretCommand extends DeriveSharedSecretCommand_base {
|
|
224
|
+
}
|
|
@@ -133,7 +133,7 @@ declare const DescribeKeyCommand_base: {
|
|
|
133
133
|
* // CreationDate: new Date("TIMESTAMP"),
|
|
134
134
|
* // Enabled: true || false,
|
|
135
135
|
* // Description: "STRING_VALUE",
|
|
136
|
-
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC",
|
|
136
|
+
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT",
|
|
137
137
|
* // KeyState: "Creating" || "Enabled" || "Disabled" || "PendingDeletion" || "PendingImport" || "PendingReplicaDeletion" || "Unavailable" || "Updating",
|
|
138
138
|
* // DeletionDate: new Date("TIMESTAMP"),
|
|
139
139
|
* // ValidTo: new Date("TIMESTAMP"),
|
|
@@ -150,6 +150,9 @@ declare const DescribeKeyCommand_base: {
|
|
|
150
150
|
* // SigningAlgorithms: [ // SigningAlgorithmSpecList
|
|
151
151
|
* // "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",
|
|
152
152
|
* // ],
|
|
153
|
+
* // KeyAgreementAlgorithms: [ // KeyAgreementAlgorithmSpecList
|
|
154
|
+
* // "ECDH",
|
|
155
|
+
* // ],
|
|
153
156
|
* // MultiRegion: true || false,
|
|
154
157
|
* // MultiRegionConfiguration: { // MultiRegionConfiguration
|
|
155
158
|
* // MultiRegionKeyType: "PRIMARY" || "REPLICA",
|
|
@@ -202,7 +202,8 @@ declare const EncryptCommand_base: {
|
|
|
202
202
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
203
203
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
204
204
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
205
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
205
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
206
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
206
207
|
* <a>DescribeKey</a> operation.</p>
|
|
207
208
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
208
209
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -201,7 +201,8 @@ declare const GenerateDataKeyCommand_base: {
|
|
|
201
201
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
202
202
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
203
203
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
204
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
204
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
205
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
205
206
|
* <a>DescribeKey</a> operation.</p>
|
|
206
207
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
207
208
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -181,7 +181,8 @@ declare const GenerateDataKeyPairCommand_base: {
|
|
|
181
181
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
182
182
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
183
183
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
184
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
184
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
185
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
185
186
|
* <a>DescribeKey</a> operation.</p>
|
|
186
187
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
187
188
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -157,7 +157,8 @@ declare const GenerateDataKeyPairWithoutPlaintextCommand_base: {
|
|
|
157
157
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
158
158
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
159
159
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
160
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
160
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
161
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
161
162
|
* <a>DescribeKey</a> operation.</p>
|
|
162
163
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
163
164
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -165,7 +165,8 @@ declare const GenerateDataKeyWithoutPlaintextCommand_base: {
|
|
|
165
165
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
166
166
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
167
167
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
168
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
168
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
169
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
169
170
|
* <a>DescribeKey</a> operation.</p>
|
|
170
171
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
171
172
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -115,7 +115,8 @@ declare const GenerateMacCommand_base: {
|
|
|
115
115
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
116
116
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
117
117
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
118
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
118
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
119
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
119
120
|
* <a>DescribeKey</a> operation.</p>
|
|
120
121
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
121
122
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -48,7 +48,7 @@ declare const GetParametersForImportCommand_base: {
|
|
|
48
48
|
* material.</p>
|
|
49
49
|
* <ul>
|
|
50
50
|
* <li>
|
|
51
|
-
* <p>The public key (or "wrapping key") of an
|
|
51
|
+
* <p>The public key (or "wrapping key") of an RSA key pair that KMS generates.</p>
|
|
52
52
|
* <p>You will use this public key to encrypt ("wrap") your key material while it's in
|
|
53
53
|
* transit to KMS. </p>
|
|
54
54
|
* </li>
|
|
@@ -47,7 +47,8 @@ declare const GetPublicKeyCommand_base: {
|
|
|
47
47
|
* </li>
|
|
48
48
|
* <li>
|
|
49
49
|
* <p>
|
|
50
|
-
* <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage">KeyUsage</a>: Whether the key is used for encryption or
|
|
50
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_GetPublicKey.html#KMS-GetPublicKey-response-KeyUsage">KeyUsage</a>: Whether the key is used for encryption, signing, or
|
|
51
|
+
* deriving a shared secret.</p>
|
|
51
52
|
* </li>
|
|
52
53
|
* <li>
|
|
53
54
|
* <p>
|
|
@@ -97,13 +98,16 @@ declare const GetPublicKeyCommand_base: {
|
|
|
97
98
|
* // PublicKey: new Uint8Array(),
|
|
98
99
|
* // CustomerMasterKeySpec: "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",
|
|
99
100
|
* // KeySpec: "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",
|
|
100
|
-
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC",
|
|
101
|
+
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT",
|
|
101
102
|
* // EncryptionAlgorithms: [ // EncryptionAlgorithmSpecList
|
|
102
103
|
* // "SYMMETRIC_DEFAULT" || "RSAES_OAEP_SHA_1" || "RSAES_OAEP_SHA_256" || "SM2PKE",
|
|
103
104
|
* // ],
|
|
104
105
|
* // SigningAlgorithms: [ // SigningAlgorithmSpecList
|
|
105
106
|
* // "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",
|
|
106
107
|
* // ],
|
|
108
|
+
* // KeyAgreementAlgorithms: [ // KeyAgreementAlgorithmSpecList
|
|
109
|
+
* // "ECDH",
|
|
110
|
+
* // ],
|
|
107
111
|
* // };
|
|
108
112
|
*
|
|
109
113
|
* ```
|
|
@@ -144,7 +148,8 @@ declare const GetPublicKeyCommand_base: {
|
|
|
144
148
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
145
149
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
146
150
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
147
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
151
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
152
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
148
153
|
* <a>DescribeKey</a> operation.</p>
|
|
149
154
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
150
155
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -101,7 +101,7 @@ declare const ListGrantsCommand_base: {
|
|
|
101
101
|
* // RetiringPrincipal: "STRING_VALUE",
|
|
102
102
|
* // IssuingAccount: "STRING_VALUE",
|
|
103
103
|
* // Operations: [ // GrantOperationList
|
|
104
|
-
* // "Decrypt" || "Encrypt" || "GenerateDataKey" || "GenerateDataKeyWithoutPlaintext" || "ReEncryptFrom" || "ReEncryptTo" || "Sign" || "Verify" || "GetPublicKey" || "CreateGrant" || "RetireGrant" || "DescribeKey" || "GenerateDataKeyPair" || "GenerateDataKeyPairWithoutPlaintext" || "GenerateMac" || "VerifyMac",
|
|
104
|
+
* // "Decrypt" || "Encrypt" || "GenerateDataKey" || "GenerateDataKeyWithoutPlaintext" || "ReEncryptFrom" || "ReEncryptTo" || "Sign" || "Verify" || "GetPublicKey" || "CreateGrant" || "RetireGrant" || "DescribeKey" || "GenerateDataKeyPair" || "GenerateDataKeyPairWithoutPlaintext" || "GenerateMac" || "VerifyMac" || "DeriveSharedSecret",
|
|
105
105
|
* // ],
|
|
106
106
|
* // Constraints: { // GrantConstraints
|
|
107
107
|
* // EncryptionContextSubset: { // EncryptionContextType
|
|
@@ -106,7 +106,7 @@ declare const ListRetirableGrantsCommand_base: {
|
|
|
106
106
|
* // RetiringPrincipal: "STRING_VALUE",
|
|
107
107
|
* // IssuingAccount: "STRING_VALUE",
|
|
108
108
|
* // Operations: [ // GrantOperationList
|
|
109
|
-
* // "Decrypt" || "Encrypt" || "GenerateDataKey" || "GenerateDataKeyWithoutPlaintext" || "ReEncryptFrom" || "ReEncryptTo" || "Sign" || "Verify" || "GetPublicKey" || "CreateGrant" || "RetireGrant" || "DescribeKey" || "GenerateDataKeyPair" || "GenerateDataKeyPairWithoutPlaintext" || "GenerateMac" || "VerifyMac",
|
|
109
|
+
* // "Decrypt" || "Encrypt" || "GenerateDataKey" || "GenerateDataKeyWithoutPlaintext" || "ReEncryptFrom" || "ReEncryptTo" || "Sign" || "Verify" || "GetPublicKey" || "CreateGrant" || "RetireGrant" || "DescribeKey" || "GenerateDataKeyPair" || "GenerateDataKeyPairWithoutPlaintext" || "GenerateMac" || "VerifyMac" || "DeriveSharedSecret",
|
|
110
110
|
* // ],
|
|
111
111
|
* // Constraints: { // GrantConstraints
|
|
112
112
|
* // EncryptionContextSubset: { // EncryptionContextType
|
|
@@ -209,7 +209,8 @@ declare const ReEncryptCommand_base: {
|
|
|
209
209
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
210
210
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
211
211
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
212
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
212
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
213
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
213
214
|
* <a>DescribeKey</a> operation.</p>
|
|
214
215
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
215
216
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -143,7 +143,7 @@ declare const ReplicateKeyCommand_base: {
|
|
|
143
143
|
* // CreationDate: new Date("TIMESTAMP"),
|
|
144
144
|
* // Enabled: true || false,
|
|
145
145
|
* // Description: "STRING_VALUE",
|
|
146
|
-
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC",
|
|
146
|
+
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT",
|
|
147
147
|
* // KeyState: "Creating" || "Enabled" || "Disabled" || "PendingDeletion" || "PendingImport" || "PendingReplicaDeletion" || "Unavailable" || "Updating",
|
|
148
148
|
* // DeletionDate: new Date("TIMESTAMP"),
|
|
149
149
|
* // ValidTo: new Date("TIMESTAMP"),
|
|
@@ -160,6 +160,9 @@ declare const ReplicateKeyCommand_base: {
|
|
|
160
160
|
* // SigningAlgorithms: [ // SigningAlgorithmSpecList
|
|
161
161
|
* // "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",
|
|
162
162
|
* // ],
|
|
163
|
+
* // KeyAgreementAlgorithms: [ // KeyAgreementAlgorithmSpecList
|
|
164
|
+
* // "ECDH",
|
|
165
|
+
* // ],
|
|
163
166
|
* // MultiRegion: true || false,
|
|
164
167
|
* // MultiRegionConfiguration: { // MultiRegionConfiguration
|
|
165
168
|
* // MultiRegionKeyType: "PRIMARY" || "REPLICA",
|
|
@@ -143,7 +143,8 @@ declare const SignCommand_base: {
|
|
|
143
143
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
144
144
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
145
145
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
146
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
146
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
147
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
147
148
|
* <a>DescribeKey</a> operation.</p>
|
|
148
149
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
149
150
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -127,7 +127,8 @@ declare const VerifyCommand_base: {
|
|
|
127
127
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
128
128
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
129
129
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
130
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
130
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
131
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
131
132
|
* <a>DescribeKey</a> operation.</p>
|
|
132
133
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
133
134
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -108,7 +108,8 @@ declare const VerifyMacCommand_base: {
|
|
|
108
108
|
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
109
109
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
110
110
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
111
|
-
* <code>GENERATE_VERIFY_MAC</code>.
|
|
111
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
112
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. To find the <code>KeyUsage</code> of a KMS key, use the
|
|
112
113
|
* <a>DescribeKey</a> operation.</p>
|
|
113
114
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
114
115
|
* <a>DescribeKey</a> operation.</p>
|
|
@@ -8,6 +8,7 @@ export * from "./DecryptCommand";
|
|
|
8
8
|
export * from "./DeleteAliasCommand";
|
|
9
9
|
export * from "./DeleteCustomKeyStoreCommand";
|
|
10
10
|
export * from "./DeleteImportedKeyMaterialCommand";
|
|
11
|
+
export * from "./DeriveSharedSecretCommand";
|
|
11
12
|
export * from "./DescribeCustomKeyStoresCommand";
|
|
12
13
|
export * from "./DescribeKeyCommand";
|
|
13
14
|
export * from "./DisableKeyCommand";
|