@aws-sdk/client-kms 3.1156.0 → 3.1157.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 +27 -0
- package/dist-cjs/index.js +102 -36
- package/dist-es/KMS.js +4 -0
- package/dist-es/commands/DecapsulateCommand.js +4 -0
- package/dist-es/commands/EncapsulateCommand.js +4 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/enums.js +14 -0
- package/dist-es/models/errors.js +13 -13
- package/dist-es/schemas/schemas_0.js +58 -22
- package/dist-types/KMS.d.ts +27 -0
- package/dist-types/KMSClient.d.ts +17 -2
- package/dist-types/commands/CreateGrantCommand.d.ts +1 -1
- package/dist-types/commands/CreateKeyCommand.d.ts +7 -4
- package/dist-types/commands/DecapsulateCommand.d.ts +233 -0
- package/dist-types/commands/DecryptCommand.d.ts +6 -2
- package/dist-types/commands/DeriveSharedSecretCommand.d.ts +3 -2
- package/dist-types/commands/DescribeKeyCommand.d.ts +5 -2
- package/dist-types/commands/EncapsulateCommand.d.ts +212 -0
- package/dist-types/commands/EncryptCommand.d.ts +3 -2
- package/dist-types/commands/GenerateDataKeyCommand.d.ts +3 -2
- package/dist-types/commands/GenerateDataKeyPairCommand.d.ts +10 -4
- package/dist-types/commands/GenerateDataKeyPairWithoutPlaintextCommand.d.ts +10 -4
- package/dist-types/commands/GenerateDataKeyWithoutPlaintextCommand.d.ts +3 -2
- package/dist-types/commands/GenerateMacCommand.d.ts +3 -2
- package/dist-types/commands/GetKeyLastUsageCommand.d.ts +3 -2
- package/dist-types/commands/GetPublicKeyCommand.d.ts +8 -4
- package/dist-types/commands/ImportKeyMaterialCommand.d.ts +3 -0
- 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 +6 -2
- package/dist-types/commands/ReplicateKeyCommand.d.ts +5 -2
- package/dist-types/commands/SignCommand.d.ts +3 -2
- package/dist-types/commands/VerifyCommand.d.ts +3 -2
- package/dist-types/commands/VerifyMacCommand.d.ts +3 -2
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/index.d.ts +13 -0
- package/dist-types/models/enums.d.ts +22 -0
- package/dist-types/models/errors.d.ts +22 -18
- package/dist-types/models/models_0.d.ts +208 -5
- package/dist-types/schemas/schemas_0.d.ts +6 -0
- package/dist-types/ts3.4/KMS.d.ts +28 -0
- package/dist-types/ts3.4/KMSClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/DecapsulateCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/EncapsulateCommand.d.ts +38 -0
- package/dist-types/ts3.4/commands/index.d.ts +2 -0
- package/dist-types/ts3.4/models/enums.d.ts +16 -0
- package/dist-types/ts3.4/models/errors.d.ts +6 -6
- package/dist-types/ts3.4/models/models_0.d.ts +27 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +6 -0
- package/package.json +5 -5
|
@@ -84,16 +84,21 @@ const _DKi = "DisableKey";
|
|
|
84
84
|
const _DR = "DryRun";
|
|
85
85
|
const _DRM = "DryRunModifiers";
|
|
86
86
|
const _DROE = "DryRunOperationException";
|
|
87
|
-
const _DRe = "
|
|
88
|
-
const _DRec = "
|
|
87
|
+
const _DRe = "DecapsulateRequest";
|
|
88
|
+
const _DRec = "DecapsulateResponse";
|
|
89
|
+
const _DRecr = "DecryptRequest";
|
|
90
|
+
const _DRecry = "DecryptResponse";
|
|
89
91
|
const _DSS = "DeriveSharedSecret";
|
|
90
92
|
const _DSSR = "DeriveSharedSecretRequest";
|
|
91
93
|
const _DSSRe = "DeriveSharedSecretResponse";
|
|
92
94
|
const _DTE = "DependencyTimeoutException";
|
|
93
|
-
const _De = "
|
|
95
|
+
const _De = "Decapsulate";
|
|
96
|
+
const _Dec = "Decrypt";
|
|
94
97
|
const _E = "Enabled";
|
|
95
|
-
const _EA = "
|
|
96
|
-
const _EAn = "
|
|
98
|
+
const _EA = "EncapsulationAlgorithm";
|
|
99
|
+
const _EAn = "EncryptionAlgorithm";
|
|
100
|
+
const _EAnc = "EncryptionAlgorithms";
|
|
101
|
+
const _EAnca = "EncapsulationAlgorithms";
|
|
97
102
|
const _EC = "EncryptionContext";
|
|
98
103
|
const _ECE = "EncryptionContextEquals";
|
|
99
104
|
const _ECS = "EncryptionContextSubset";
|
|
@@ -104,9 +109,12 @@ const _EKR = "EnableKeyRequest";
|
|
|
104
109
|
const _EKRR = "EnableKeyRotationRequest";
|
|
105
110
|
const _EKRn = "EnableKeyRotation";
|
|
106
111
|
const _EM = "ExpirationModel";
|
|
107
|
-
const _ER = "
|
|
108
|
-
const _ERn = "
|
|
109
|
-
const
|
|
112
|
+
const _ER = "EncapsulateRequest";
|
|
113
|
+
const _ERn = "EncapsulateResponse";
|
|
114
|
+
const _ERnc = "EncryptRequest";
|
|
115
|
+
const _ERncr = "EncryptResponse";
|
|
116
|
+
const _En = "Encapsulate";
|
|
117
|
+
const _Enc = "Encrypt";
|
|
110
118
|
const _G = "Grants";
|
|
111
119
|
const _GC = "GrantConstraints";
|
|
112
120
|
const _GDK = "GenerateDataKey";
|
|
@@ -304,6 +312,7 @@ const _SKMI = "SourceKeyMaterialId";
|
|
|
304
312
|
const _SR = "SignRequest";
|
|
305
313
|
const _SRi = "SignResponse";
|
|
306
314
|
const _SS = "SharedSecret";
|
|
315
|
+
const _SSCB = "SharedSecretCiphertextBlob";
|
|
307
316
|
const _SV = "SignatureValid";
|
|
308
317
|
const _Si = "Sign";
|
|
309
318
|
const _T = "Tags";
|
|
@@ -747,14 +756,24 @@ export var CustomKeyStoresListEntry$ = [3, n0, _CKSLE,
|
|
|
747
756
|
[_CKSI, _CKSN, _CHCI, _TAC, _CS, _CEC, _CD, _CKST, _XPCk],
|
|
748
757
|
[0, 0, 0, 0, 0, 0, 4, 0, [() => XksProxyConfigurationType$, 0]]
|
|
749
758
|
];
|
|
750
|
-
export var
|
|
759
|
+
export var DecapsulateRequest$ = [3, n0, _DRe,
|
|
751
760
|
0,
|
|
752
|
-
[
|
|
761
|
+
[_KI, _SSCB, _EA, _GT, _DR],
|
|
762
|
+
[0, 21, 0, 64 | 0, 2], 3
|
|
763
|
+
];
|
|
764
|
+
export var DecapsulateResponse$ = [3, n0, _DRec,
|
|
765
|
+
0,
|
|
766
|
+
[_KI, _SS, _EA],
|
|
767
|
+
[0, [() => PlaintextType, 0], 0]
|
|
768
|
+
];
|
|
769
|
+
export var DecryptRequest$ = [3, n0, _DRecr,
|
|
770
|
+
0,
|
|
771
|
+
[_CB, _EC, _GT, _KI, _EAn, _R, _DR, _DRM],
|
|
753
772
|
[21, 128 | 0, 64 | 0, 0, 0, () => RecipientInfo$, 2, 64 | 0]
|
|
754
773
|
];
|
|
755
|
-
export var DecryptResponse$ = [3, n0,
|
|
774
|
+
export var DecryptResponse$ = [3, n0, _DRecry,
|
|
756
775
|
0,
|
|
757
|
-
[_KI, _Pl,
|
|
776
|
+
[_KI, _Pl, _EAn, _CFR, _KMI],
|
|
758
777
|
[0, [() => PlaintextType, 0], 0, 21, 0]
|
|
759
778
|
];
|
|
760
779
|
export var DeleteAliasRequest$ = [3, n0, _DAR,
|
|
@@ -842,14 +861,24 @@ export var EnableKeyRotationRequest$ = [3, n0, _EKRR,
|
|
|
842
861
|
[_KI, _RPID],
|
|
843
862
|
[0, 1], 1
|
|
844
863
|
];
|
|
845
|
-
export var
|
|
864
|
+
export var EncapsulateRequest$ = [3, n0, _ER,
|
|
865
|
+
0,
|
|
866
|
+
[_KI, _EA, _GT, _DR],
|
|
867
|
+
[0, 0, 64 | 0, 2], 2
|
|
868
|
+
];
|
|
869
|
+
export var EncapsulateResponse$ = [3, n0, _ERn,
|
|
870
|
+
0,
|
|
871
|
+
[_KI, _SS, _SSCB, _EA],
|
|
872
|
+
[0, [() => PlaintextType, 0], 21, 0]
|
|
873
|
+
];
|
|
874
|
+
export var EncryptRequest$ = [3, n0, _ERnc,
|
|
846
875
|
0,
|
|
847
|
-
[_KI, _Pl, _EC, _GT,
|
|
876
|
+
[_KI, _Pl, _EC, _GT, _EAn, _DR],
|
|
848
877
|
[0, [() => PlaintextType, 0], 128 | 0, 64 | 0, 0, 2], 2
|
|
849
878
|
];
|
|
850
|
-
export var EncryptResponse$ = [3, n0,
|
|
879
|
+
export var EncryptResponse$ = [3, n0, _ERncr,
|
|
851
880
|
0,
|
|
852
|
-
[_CB, _KI,
|
|
881
|
+
[_CB, _KI, _EAn],
|
|
853
882
|
[21, 0, 0]
|
|
854
883
|
];
|
|
855
884
|
export var GenerateDataKeyPairRequest$ = [3, n0, _GDKPR,
|
|
@@ -959,8 +988,8 @@ export var GetPublicKeyRequest$ = [3, n0, _GPKR,
|
|
|
959
988
|
];
|
|
960
989
|
export var GetPublicKeyResponse$ = [3, n0, _GPKRe,
|
|
961
990
|
0,
|
|
962
|
-
[_KI, _PK, _CMKS, _KS, _KU,
|
|
963
|
-
[0, 21, 0, 0, 0, 64 | 0, 64 | 0, 64 | 0]
|
|
991
|
+
[_KI, _PK, _CMKS, _KS, _KU, _EAnc, _SA, _KAAe, _EAnca],
|
|
992
|
+
[0, 21, 0, 0, 0, 64 | 0, 64 | 0, 64 | 0, 64 | 0]
|
|
964
993
|
];
|
|
965
994
|
export var GrantConstraints$ = [3, n0, _GC,
|
|
966
995
|
0,
|
|
@@ -994,8 +1023,8 @@ export var KeyListEntry$ = [3, n0, _KLE,
|
|
|
994
1023
|
];
|
|
995
1024
|
export var KeyMetadata$ = [3, n0, _KM,
|
|
996
1025
|
0,
|
|
997
|
-
[_KI, _AWSAI, _A, _CD, _E, _D, _KU, _KSe, _DD, _VT, _Or, _CKSI, _CHCI, _EM, _KMe, _CMKS, _KS,
|
|
998
|
-
[0, 0, 0, 4, 2, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 64 | 0, 64 | 0, 64 | 0, 2, () => MultiRegionConfiguration$, 1, 64 | 0, () => XksKeyConfigurationType$, 0], 1
|
|
1026
|
+
[_KI, _AWSAI, _A, _CD, _E, _D, _KU, _KSe, _DD, _VT, _Or, _CKSI, _CHCI, _EM, _KMe, _CMKS, _KS, _EAnc, _SA, _KAAe, _EAnca, _MR, _MRC, _PDWID, _MAa, _XKC, _CKMI],
|
|
1027
|
+
[0, 0, 0, 4, 2, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 64 | 0, 64 | 0, 64 | 0, 64 | 0, 2, () => MultiRegionConfiguration$, 1, 64 | 0, () => XksKeyConfigurationType$, 0], 1
|
|
999
1028
|
];
|
|
1000
1029
|
export var ListAliasesRequest$ = [3, n0, _LAR,
|
|
1001
1030
|
0,
|
|
@@ -1231,6 +1260,7 @@ var CustomKeyStoresList = [1, n0, _CKSL,
|
|
|
1231
1260
|
0]
|
|
1232
1261
|
];
|
|
1233
1262
|
var DryRunModifierList = 64 | 0;
|
|
1263
|
+
var EncapsulationAlgorithmSpecList = 64 | 0;
|
|
1234
1264
|
var EncryptionAlgorithmSpecList = 64 | 0;
|
|
1235
1265
|
var GrantList = [1, n0, _GL,
|
|
1236
1266
|
0, () => GrantListEntry$
|
|
@@ -1273,7 +1303,10 @@ export var CreateGrant$ = [9, n0, _CG,
|
|
|
1273
1303
|
export var CreateKey$ = [9, n0, _CK,
|
|
1274
1304
|
0, () => CreateKeyRequest$, () => CreateKeyResponse$
|
|
1275
1305
|
];
|
|
1276
|
-
export var
|
|
1306
|
+
export var Decapsulate$ = [9, n0, _De,
|
|
1307
|
+
0, () => DecapsulateRequest$, () => DecapsulateResponse$
|
|
1308
|
+
];
|
|
1309
|
+
export var Decrypt$ = [9, n0, _Dec,
|
|
1277
1310
|
0, () => DecryptRequest$, () => DecryptResponse$
|
|
1278
1311
|
];
|
|
1279
1312
|
export var DeleteAlias$ = [9, n0, _DA,
|
|
@@ -1309,7 +1342,10 @@ export var EnableKey$ = [9, n0, _EK,
|
|
|
1309
1342
|
export var EnableKeyRotation$ = [9, n0, _EKRn,
|
|
1310
1343
|
0, () => EnableKeyRotationRequest$, () => __Unit
|
|
1311
1344
|
];
|
|
1312
|
-
export var
|
|
1345
|
+
export var Encapsulate$ = [9, n0, _En,
|
|
1346
|
+
0, () => EncapsulateRequest$, () => EncapsulateResponse$
|
|
1347
|
+
];
|
|
1348
|
+
export var Encrypt$ = [9, n0, _Enc,
|
|
1313
1349
|
0, () => EncryptRequest$, () => EncryptResponse$
|
|
1314
1350
|
];
|
|
1315
1351
|
export var GenerateDataKey$ = [9, n0, _GDK,
|
package/dist-types/KMS.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { type CreateAliasCommandInput, type CreateAliasCommandOutput } from "./c
|
|
|
5
5
|
import { type CreateCustomKeyStoreCommandInput, type CreateCustomKeyStoreCommandOutput } from "./commands/CreateCustomKeyStoreCommand";
|
|
6
6
|
import { type CreateGrantCommandInput, type CreateGrantCommandOutput } from "./commands/CreateGrantCommand";
|
|
7
7
|
import { type CreateKeyCommandInput, type CreateKeyCommandOutput } from "./commands/CreateKeyCommand";
|
|
8
|
+
import { type DecapsulateCommandInput, type DecapsulateCommandOutput } from "./commands/DecapsulateCommand";
|
|
8
9
|
import { type DecryptCommandInput, type DecryptCommandOutput } from "./commands/DecryptCommand";
|
|
9
10
|
import { type DeleteAliasCommandInput, type DeleteAliasCommandOutput } from "./commands/DeleteAliasCommand";
|
|
10
11
|
import { type DeleteCustomKeyStoreCommandInput, type DeleteCustomKeyStoreCommandOutput } from "./commands/DeleteCustomKeyStoreCommand";
|
|
@@ -17,6 +18,7 @@ import { type DisableKeyRotationCommandInput, type DisableKeyRotationCommandOutp
|
|
|
17
18
|
import { type DisconnectCustomKeyStoreCommandInput, type DisconnectCustomKeyStoreCommandOutput } from "./commands/DisconnectCustomKeyStoreCommand";
|
|
18
19
|
import { type EnableKeyCommandInput, type EnableKeyCommandOutput } from "./commands/EnableKeyCommand";
|
|
19
20
|
import { type EnableKeyRotationCommandInput, type EnableKeyRotationCommandOutput } from "./commands/EnableKeyRotationCommand";
|
|
21
|
+
import { type EncapsulateCommandInput, type EncapsulateCommandOutput } from "./commands/EncapsulateCommand";
|
|
20
22
|
import { type EncryptCommandInput, type EncryptCommandOutput } from "./commands/EncryptCommand";
|
|
21
23
|
import { type GenerateDataKeyCommandInput, type GenerateDataKeyCommandOutput } from "./commands/GenerateDataKeyCommand";
|
|
22
24
|
import { type GenerateDataKeyPairCommandInput, type GenerateDataKeyPairCommandOutput } from "./commands/GenerateDataKeyPairCommand";
|
|
@@ -98,6 +100,12 @@ export interface KMS {
|
|
|
98
100
|
createKey(args: CreateKeyCommandInput, options?: KMSRequestOptions): Promise<CreateKeyCommandOutput>;
|
|
99
101
|
createKey(args: CreateKeyCommandInput, cb: (err: any, data?: CreateKeyCommandOutput) => void): void;
|
|
100
102
|
createKey(args: CreateKeyCommandInput, options: KMSRequestOptions, cb: (err: any, data?: CreateKeyCommandOutput) => void): void;
|
|
103
|
+
/**
|
|
104
|
+
* @see {@link DecapsulateCommand}
|
|
105
|
+
*/
|
|
106
|
+
decapsulate(args: DecapsulateCommandInput, options?: KMSRequestOptions): Promise<DecapsulateCommandOutput>;
|
|
107
|
+
decapsulate(args: DecapsulateCommandInput, cb: (err: any, data?: DecapsulateCommandOutput) => void): void;
|
|
108
|
+
decapsulate(args: DecapsulateCommandInput, options: KMSRequestOptions, cb: (err: any, data?: DecapsulateCommandOutput) => void): void;
|
|
101
109
|
/**
|
|
102
110
|
* @see {@link DecryptCommand}
|
|
103
111
|
*/
|
|
@@ -172,6 +180,12 @@ export interface KMS {
|
|
|
172
180
|
enableKeyRotation(args: EnableKeyRotationCommandInput, options?: KMSRequestOptions): Promise<EnableKeyRotationCommandOutput>;
|
|
173
181
|
enableKeyRotation(args: EnableKeyRotationCommandInput, cb: (err: any, data?: EnableKeyRotationCommandOutput) => void): void;
|
|
174
182
|
enableKeyRotation(args: EnableKeyRotationCommandInput, options: KMSRequestOptions, cb: (err: any, data?: EnableKeyRotationCommandOutput) => void): void;
|
|
183
|
+
/**
|
|
184
|
+
* @see {@link EncapsulateCommand}
|
|
185
|
+
*/
|
|
186
|
+
encapsulate(args: EncapsulateCommandInput, options?: KMSRequestOptions): Promise<EncapsulateCommandOutput>;
|
|
187
|
+
encapsulate(args: EncapsulateCommandInput, cb: (err: any, data?: EncapsulateCommandOutput) => void): void;
|
|
188
|
+
encapsulate(args: EncapsulateCommandInput, options: KMSRequestOptions, cb: (err: any, data?: EncapsulateCommandOutput) => void): void;
|
|
175
189
|
/**
|
|
176
190
|
* @see {@link EncryptCommand}
|
|
177
191
|
*/
|
|
@@ -480,6 +494,19 @@ export interface KMS {
|
|
|
480
494
|
* support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral Diffie-Hellman
|
|
481
495
|
* (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7
|
|
482
496
|
* and later support these modes.</p>
|
|
497
|
+
* <note>
|
|
498
|
+
* <p>With current technology, brute force attacks on KMS TLS cipher suite key exchange
|
|
499
|
+
* mechanisms are not feasible. However, cipher suites that use Rivest–Shamir–Adleman (RSA)
|
|
500
|
+
* or Diffie-Hellman (DH) key exchange will be susceptible if large-scale quantum computing
|
|
501
|
+
* becomes practical.
|
|
502
|
+
* <a href="https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8547.ipd.pdf">NIST IR 8547</a>
|
|
503
|
+
* on the NIST website establishes a timeline to phase out quantum-vulnerable algorithms
|
|
504
|
+
* by 2030 and disallow them entirely by 2035. If your applications rely on the long-term
|
|
505
|
+
* confidentiality of KMS API traffic, we recommend that you
|
|
506
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/pqtls.html">use post-quantum TLS with KMS</a>.
|
|
507
|
+
* For more information about post-quantum cybersecurity, see <a href="https://www.nsa.gov/Cybersecurity/Post-Quantum-Cybersecurity-Resources/">Post-Quantum Cybersecurity Resources</a> on the
|
|
508
|
+
* National Security Agency (NSA) website.</p>
|
|
509
|
+
* </note>
|
|
483
510
|
* <p>
|
|
484
511
|
* <b>Signing Requests</b>
|
|
485
512
|
* </p>
|
|
@@ -12,6 +12,7 @@ import type { CreateAliasCommandInput, CreateAliasCommandOutput } from "./comman
|
|
|
12
12
|
import type { CreateCustomKeyStoreCommandInput, CreateCustomKeyStoreCommandOutput } from "./commands/CreateCustomKeyStoreCommand";
|
|
13
13
|
import type { CreateGrantCommandInput, CreateGrantCommandOutput } from "./commands/CreateGrantCommand";
|
|
14
14
|
import type { CreateKeyCommandInput, CreateKeyCommandOutput } from "./commands/CreateKeyCommand";
|
|
15
|
+
import type { DecapsulateCommandInput, DecapsulateCommandOutput } from "./commands/DecapsulateCommand";
|
|
15
16
|
import type { DecryptCommandInput, DecryptCommandOutput } from "./commands/DecryptCommand";
|
|
16
17
|
import type { DeleteAliasCommandInput, DeleteAliasCommandOutput } from "./commands/DeleteAliasCommand";
|
|
17
18
|
import type { DeleteCustomKeyStoreCommandInput, DeleteCustomKeyStoreCommandOutput } from "./commands/DeleteCustomKeyStoreCommand";
|
|
@@ -24,6 +25,7 @@ import type { DisableKeyRotationCommandInput, DisableKeyRotationCommandOutput }
|
|
|
24
25
|
import type { DisconnectCustomKeyStoreCommandInput, DisconnectCustomKeyStoreCommandOutput } from "./commands/DisconnectCustomKeyStoreCommand";
|
|
25
26
|
import type { EnableKeyCommandInput, EnableKeyCommandOutput } from "./commands/EnableKeyCommand";
|
|
26
27
|
import type { EnableKeyRotationCommandInput, EnableKeyRotationCommandOutput } from "./commands/EnableKeyRotationCommand";
|
|
28
|
+
import type { EncapsulateCommandInput, EncapsulateCommandOutput } from "./commands/EncapsulateCommand";
|
|
27
29
|
import type { EncryptCommandInput, EncryptCommandOutput } from "./commands/EncryptCommand";
|
|
28
30
|
import type { GenerateDataKeyCommandInput, GenerateDataKeyCommandOutput } from "./commands/GenerateDataKeyCommand";
|
|
29
31
|
import type { GenerateDataKeyPairCommandInput, GenerateDataKeyPairCommandOutput } from "./commands/GenerateDataKeyPairCommand";
|
|
@@ -66,11 +68,11 @@ export { __Client };
|
|
|
66
68
|
/**
|
|
67
69
|
* @public
|
|
68
70
|
*/
|
|
69
|
-
export type ServiceInputTypes = CancelKeyDeletionCommandInput | ConnectCustomKeyStoreCommandInput | CreateAliasCommandInput | CreateCustomKeyStoreCommandInput | CreateGrantCommandInput | CreateKeyCommandInput | DecryptCommandInput | DeleteAliasCommandInput | DeleteCustomKeyStoreCommandInput | DeleteImportedKeyMaterialCommandInput | DeriveSharedSecretCommandInput | DescribeCustomKeyStoresCommandInput | DescribeKeyCommandInput | DisableKeyCommandInput | DisableKeyRotationCommandInput | DisconnectCustomKeyStoreCommandInput | EnableKeyCommandInput | EnableKeyRotationCommandInput | EncryptCommandInput | GenerateDataKeyCommandInput | GenerateDataKeyPairCommandInput | GenerateDataKeyPairWithoutPlaintextCommandInput | GenerateDataKeyWithoutPlaintextCommandInput | GenerateMacCommandInput | GenerateRandomCommandInput | GetKeyLastUsageCommandInput | GetKeyPolicyCommandInput | GetKeyRotationStatusCommandInput | GetParametersForImportCommandInput | GetPublicKeyCommandInput | ImportKeyMaterialCommandInput | ListAliasesCommandInput | ListGrantsCommandInput | ListKeyPoliciesCommandInput | ListKeyRotationsCommandInput | ListKeysCommandInput | ListResourceTagsCommandInput | ListRetirableGrantsCommandInput | PutKeyPolicyCommandInput | ReEncryptCommandInput | ReplicateKeyCommandInput | RetireGrantCommandInput | RevokeGrantCommandInput | RotateKeyOnDemandCommandInput | ScheduleKeyDeletionCommandInput | SignCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAliasCommandInput | UpdateCustomKeyStoreCommandInput | UpdateKeyDescriptionCommandInput | UpdatePrimaryRegionCommandInput | VerifyCommandInput | VerifyMacCommandInput;
|
|
71
|
+
export type ServiceInputTypes = CancelKeyDeletionCommandInput | ConnectCustomKeyStoreCommandInput | CreateAliasCommandInput | CreateCustomKeyStoreCommandInput | CreateGrantCommandInput | CreateKeyCommandInput | DecapsulateCommandInput | DecryptCommandInput | DeleteAliasCommandInput | DeleteCustomKeyStoreCommandInput | DeleteImportedKeyMaterialCommandInput | DeriveSharedSecretCommandInput | DescribeCustomKeyStoresCommandInput | DescribeKeyCommandInput | DisableKeyCommandInput | DisableKeyRotationCommandInput | DisconnectCustomKeyStoreCommandInput | EnableKeyCommandInput | EnableKeyRotationCommandInput | EncapsulateCommandInput | EncryptCommandInput | GenerateDataKeyCommandInput | GenerateDataKeyPairCommandInput | GenerateDataKeyPairWithoutPlaintextCommandInput | GenerateDataKeyWithoutPlaintextCommandInput | GenerateMacCommandInput | GenerateRandomCommandInput | GetKeyLastUsageCommandInput | GetKeyPolicyCommandInput | GetKeyRotationStatusCommandInput | GetParametersForImportCommandInput | GetPublicKeyCommandInput | ImportKeyMaterialCommandInput | ListAliasesCommandInput | ListGrantsCommandInput | ListKeyPoliciesCommandInput | ListKeyRotationsCommandInput | ListKeysCommandInput | ListResourceTagsCommandInput | ListRetirableGrantsCommandInput | PutKeyPolicyCommandInput | ReEncryptCommandInput | ReplicateKeyCommandInput | RetireGrantCommandInput | RevokeGrantCommandInput | RotateKeyOnDemandCommandInput | ScheduleKeyDeletionCommandInput | SignCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateAliasCommandInput | UpdateCustomKeyStoreCommandInput | UpdateKeyDescriptionCommandInput | UpdatePrimaryRegionCommandInput | VerifyCommandInput | VerifyMacCommandInput;
|
|
70
72
|
/**
|
|
71
73
|
* @public
|
|
72
74
|
*/
|
|
73
|
-
export type ServiceOutputTypes = CancelKeyDeletionCommandOutput | ConnectCustomKeyStoreCommandOutput | CreateAliasCommandOutput | CreateCustomKeyStoreCommandOutput | CreateGrantCommandOutput | CreateKeyCommandOutput | DecryptCommandOutput | DeleteAliasCommandOutput | DeleteCustomKeyStoreCommandOutput | DeleteImportedKeyMaterialCommandOutput | DeriveSharedSecretCommandOutput | DescribeCustomKeyStoresCommandOutput | DescribeKeyCommandOutput | DisableKeyCommandOutput | DisableKeyRotationCommandOutput | DisconnectCustomKeyStoreCommandOutput | EnableKeyCommandOutput | EnableKeyRotationCommandOutput | EncryptCommandOutput | GenerateDataKeyCommandOutput | GenerateDataKeyPairCommandOutput | GenerateDataKeyPairWithoutPlaintextCommandOutput | GenerateDataKeyWithoutPlaintextCommandOutput | GenerateMacCommandOutput | GenerateRandomCommandOutput | GetKeyLastUsageCommandOutput | GetKeyPolicyCommandOutput | GetKeyRotationStatusCommandOutput | GetParametersForImportCommandOutput | GetPublicKeyCommandOutput | ImportKeyMaterialCommandOutput | ListAliasesCommandOutput | ListGrantsCommandOutput | ListKeyPoliciesCommandOutput | ListKeyRotationsCommandOutput | ListKeysCommandOutput | ListResourceTagsCommandOutput | ListRetirableGrantsCommandOutput | PutKeyPolicyCommandOutput | ReEncryptCommandOutput | ReplicateKeyCommandOutput | RetireGrantCommandOutput | RevokeGrantCommandOutput | RotateKeyOnDemandCommandOutput | ScheduleKeyDeletionCommandOutput | SignCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAliasCommandOutput | UpdateCustomKeyStoreCommandOutput | UpdateKeyDescriptionCommandOutput | UpdatePrimaryRegionCommandOutput | VerifyCommandOutput | VerifyMacCommandOutput;
|
|
75
|
+
export type ServiceOutputTypes = CancelKeyDeletionCommandOutput | ConnectCustomKeyStoreCommandOutput | CreateAliasCommandOutput | CreateCustomKeyStoreCommandOutput | CreateGrantCommandOutput | CreateKeyCommandOutput | DecapsulateCommandOutput | DecryptCommandOutput | DeleteAliasCommandOutput | DeleteCustomKeyStoreCommandOutput | DeleteImportedKeyMaterialCommandOutput | DeriveSharedSecretCommandOutput | DescribeCustomKeyStoresCommandOutput | DescribeKeyCommandOutput | DisableKeyCommandOutput | DisableKeyRotationCommandOutput | DisconnectCustomKeyStoreCommandOutput | EnableKeyCommandOutput | EnableKeyRotationCommandOutput | EncapsulateCommandOutput | EncryptCommandOutput | GenerateDataKeyCommandOutput | GenerateDataKeyPairCommandOutput | GenerateDataKeyPairWithoutPlaintextCommandOutput | GenerateDataKeyWithoutPlaintextCommandOutput | GenerateMacCommandOutput | GenerateRandomCommandOutput | GetKeyLastUsageCommandOutput | GetKeyPolicyCommandOutput | GetKeyRotationStatusCommandOutput | GetParametersForImportCommandOutput | GetPublicKeyCommandOutput | ImportKeyMaterialCommandOutput | ListAliasesCommandOutput | ListGrantsCommandOutput | ListKeyPoliciesCommandOutput | ListKeyRotationsCommandOutput | ListKeysCommandOutput | ListResourceTagsCommandOutput | ListRetirableGrantsCommandOutput | PutKeyPolicyCommandOutput | ReEncryptCommandOutput | ReplicateKeyCommandOutput | RetireGrantCommandOutput | RevokeGrantCommandOutput | RotateKeyOnDemandCommandOutput | ScheduleKeyDeletionCommandOutput | SignCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateAliasCommandOutput | UpdateCustomKeyStoreCommandOutput | UpdateKeyDescriptionCommandOutput | UpdatePrimaryRegionCommandOutput | VerifyCommandOutput | VerifyMacCommandOutput;
|
|
74
76
|
/**
|
|
75
77
|
* @public
|
|
76
78
|
*/
|
|
@@ -252,6 +254,19 @@ export interface KMSClientResolvedConfig extends KMSClientResolvedConfigType {
|
|
|
252
254
|
* support cipher suites with Perfect Forward Secrecy (PFS) such as Ephemeral Diffie-Hellman
|
|
253
255
|
* (DHE) or Elliptic Curve Ephemeral Diffie-Hellman (ECDHE). Most modern systems such as Java 7
|
|
254
256
|
* and later support these modes.</p>
|
|
257
|
+
* <note>
|
|
258
|
+
* <p>With current technology, brute force attacks on KMS TLS cipher suite key exchange
|
|
259
|
+
* mechanisms are not feasible. However, cipher suites that use Rivest–Shamir–Adleman (RSA)
|
|
260
|
+
* or Diffie-Hellman (DH) key exchange will be susceptible if large-scale quantum computing
|
|
261
|
+
* becomes practical.
|
|
262
|
+
* <a href="https://nvlpubs.nist.gov/nistpubs/ir/2024/NIST.IR.8547.ipd.pdf">NIST IR 8547</a>
|
|
263
|
+
* on the NIST website establishes a timeline to phase out quantum-vulnerable algorithms
|
|
264
|
+
* by 2030 and disallow them entirely by 2035. If your applications rely on the long-term
|
|
265
|
+
* confidentiality of KMS API traffic, we recommend that you
|
|
266
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/pqtls.html">use post-quantum TLS with KMS</a>.
|
|
267
|
+
* For more information about post-quantum cybersecurity, see <a href="https://www.nsa.gov/Cybersecurity/Post-Quantum-Cybersecurity-Resources/">Post-Quantum Cybersecurity Resources</a> on the
|
|
268
|
+
* National Security Agency (NSA) website.</p>
|
|
269
|
+
* </note>
|
|
255
270
|
* <p>
|
|
256
271
|
* <b>Signing Requests</b>
|
|
257
272
|
* </p>
|
|
@@ -106,7 +106,7 @@ declare const CreateGrantCommand_base: {
|
|
|
106
106
|
* GranteePrincipal: "STRING_VALUE",
|
|
107
107
|
* RetiringPrincipal: "STRING_VALUE",
|
|
108
108
|
* Operations: [ // GrantOperationList // required
|
|
109
|
-
* "Decrypt" || "Encrypt" || "GenerateDataKey" || "GenerateDataKeyWithoutPlaintext" || "ReEncryptFrom" || "ReEncryptTo" || "Sign" || "Verify" || "GetPublicKey" || "CreateGrant" || "RetireGrant" || "DescribeKey" || "GenerateDataKeyPair" || "GenerateDataKeyPairWithoutPlaintext" || "GenerateMac" || "VerifyMac" || "DeriveSharedSecret",
|
|
109
|
+
* "Decrypt" || "Encrypt" || "GenerateDataKey" || "GenerateDataKeyWithoutPlaintext" || "ReEncryptFrom" || "ReEncryptTo" || "Sign" || "Verify" || "GetPublicKey" || "CreateGrant" || "RetireGrant" || "DescribeKey" || "GenerateDataKeyPair" || "GenerateDataKeyPairWithoutPlaintext" || "GenerateMac" || "VerifyMac" || "DeriveSharedSecret" || "Encapsulate" || "Decapsulate",
|
|
110
110
|
* ],
|
|
111
111
|
* Constraints: { // GrantConstraints
|
|
112
112
|
* EncryptionContextSubset: { // EncryptionContextType
|
|
@@ -206,9 +206,9 @@ declare const CreateKeyCommand_base: {
|
|
|
206
206
|
* const input = { // CreateKeyRequest
|
|
207
207
|
* Policy: "STRING_VALUE",
|
|
208
208
|
* Description: "STRING_VALUE",
|
|
209
|
-
* KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT",
|
|
209
|
+
* KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT" || "ENCAPSULATE_DECAPSULATE",
|
|
210
210
|
* 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",
|
|
211
|
-
* 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" || "ML_DSA_44" || "ML_DSA_65" || "ML_DSA_87" || "ECC_NIST_EDWARDS25519",
|
|
211
|
+
* 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" || "ML_DSA_44" || "ML_DSA_65" || "ML_DSA_87" || "ECC_NIST_EDWARDS25519" || "ML_KEM_512" || "ML_KEM_768" || "ML_KEM_1024",
|
|
212
212
|
* Origin: "AWS_KMS" || "EXTERNAL" || "AWS_CLOUDHSM" || "EXTERNAL_KEY_STORE",
|
|
213
213
|
* CustomKeyStoreId: "STRING_VALUE",
|
|
214
214
|
* BypassPolicyLockoutSafetyCheck: true || false,
|
|
@@ -231,7 +231,7 @@ declare const CreateKeyCommand_base: {
|
|
|
231
231
|
* // CreationDate: new Date("TIMESTAMP"),
|
|
232
232
|
* // Enabled: true || false,
|
|
233
233
|
* // Description: "STRING_VALUE",
|
|
234
|
-
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT",
|
|
234
|
+
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT" || "ENCAPSULATE_DECAPSULATE",
|
|
235
235
|
* // KeyState: "Creating" || "Enabled" || "Disabled" || "PendingDeletion" || "PendingImport" || "PendingReplicaDeletion" || "Unavailable" || "Updating",
|
|
236
236
|
* // DeletionDate: new Date("TIMESTAMP"),
|
|
237
237
|
* // ValidTo: new Date("TIMESTAMP"),
|
|
@@ -241,7 +241,7 @@ declare const CreateKeyCommand_base: {
|
|
|
241
241
|
* // ExpirationModel: "KEY_MATERIAL_EXPIRES" || "KEY_MATERIAL_DOES_NOT_EXPIRE",
|
|
242
242
|
* // KeyManager: "AWS" || "CUSTOMER",
|
|
243
243
|
* // 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",
|
|
244
|
-
* // 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" || "ML_DSA_44" || "ML_DSA_65" || "ML_DSA_87" || "ECC_NIST_EDWARDS25519",
|
|
244
|
+
* // 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" || "ML_DSA_44" || "ML_DSA_65" || "ML_DSA_87" || "ECC_NIST_EDWARDS25519" || "ML_KEM_512" || "ML_KEM_768" || "ML_KEM_1024",
|
|
245
245
|
* // EncryptionAlgorithms: [ // EncryptionAlgorithmSpecList
|
|
246
246
|
* // "SYMMETRIC_DEFAULT" || "RSAES_OAEP_SHA_1" || "RSAES_OAEP_SHA_256" || "SM2PKE",
|
|
247
247
|
* // ],
|
|
@@ -251,6 +251,9 @@ declare const CreateKeyCommand_base: {
|
|
|
251
251
|
* // KeyAgreementAlgorithms: [ // KeyAgreementAlgorithmSpecList
|
|
252
252
|
* // "ECDH",
|
|
253
253
|
* // ],
|
|
254
|
+
* // EncapsulationAlgorithms: [ // EncapsulationAlgorithmSpecList
|
|
255
|
+
* // "ML_KEM",
|
|
256
|
+
* // ],
|
|
254
257
|
* // MultiRegion: true || false,
|
|
255
258
|
* // MultiRegionConfiguration: { // MultiRegionConfiguration
|
|
256
259
|
* // MultiRegionKeyType: "PRIMARY" || "REPLICA",
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
2
|
+
import type { DecapsulateRequest, DecapsulateResponse } from "../models/models_0";
|
|
3
|
+
/**
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export type { __MetadataBearer };
|
|
7
|
+
/**
|
|
8
|
+
* @public
|
|
9
|
+
*
|
|
10
|
+
* The input for {@link DecapsulateCommand}.
|
|
11
|
+
*/
|
|
12
|
+
export interface DecapsulateCommandInput extends DecapsulateRequest {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @public
|
|
16
|
+
*
|
|
17
|
+
* The output of {@link DecapsulateCommand}.
|
|
18
|
+
*/
|
|
19
|
+
export interface DecapsulateCommandOutput extends DecapsulateResponse, __MetadataBearer {
|
|
20
|
+
}
|
|
21
|
+
declare const DecapsulateCommand_base: {
|
|
22
|
+
new (input: DecapsulateCommandInput): import("@smithy/core/client").CommandImpl<DecapsulateCommandInput, DecapsulateCommandOutput, import("..").KMSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
23
|
+
new (input: DecapsulateCommandInput): import("@smithy/core/client").CommandImpl<DecapsulateCommandInput, DecapsulateCommandOutput, import("..").KMSClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
|
|
24
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* <p>Recovers the shared secret that was encapsulated with the public key of an ML-KEM KMS key.
|
|
28
|
+
* Module-Lattice-Based Key-Encapsulation Mechanism (ML-KEM), specified in <a href="https://csrc.nist.gov/pubs/fips/203/final">FIPS 203</a> on the NIST website, is a
|
|
29
|
+
* post-quantum algorithm for establishing a shared secret between two parties. For an example
|
|
30
|
+
* of how two parties establish a shared secret over an insecure channel using ML-KEM, see
|
|
31
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/pqkeys.html#mlkem">ML-KEM
|
|
32
|
+
* keys in KMS</a> in the <i>Key Management Service Developer Guide</i>.</p>
|
|
33
|
+
* <p>The Decapsulate operation is not available in China Regions.</p>
|
|
34
|
+
* <p>
|
|
35
|
+
* <code>Decapsulate</code> returns the shared secret as a 32-byte value. You can use it directly
|
|
36
|
+
* as key material, or run it through a key derivation function to derive multiple keys and nonces.</p>
|
|
37
|
+
* <important>
|
|
38
|
+
* <p>
|
|
39
|
+
* <code>Decapsulate</code> returns an <code>InvalidCiphertextException</code> when the
|
|
40
|
+
* length of the <code>SharedSecretCiphertextBlob</code> is inconsistent with the ML-KEM key
|
|
41
|
+
* spec. In all other cases, <code>Decapsulate</code> returns a 32-byte pseudo-random
|
|
42
|
+
* value. This is true even when the <code>SharedSecretCiphertextBlob</code> was created using
|
|
43
|
+
* a different ML-KEM key or altered from its original value. This behavior is a security
|
|
44
|
+
* feature called <i>implicit rejection</i> that helps protect against
|
|
45
|
+
* chosen-ciphertext attacks.</p>
|
|
46
|
+
* <p>Because a response does not indicate that the ciphertext and key are valid, confirm the
|
|
47
|
+
* two parties derived the same shared secret before using it.</p>
|
|
48
|
+
* </important>
|
|
49
|
+
* <p>The KMS key that you use for this operation must be in a compatible key state. For
|
|
50
|
+
* 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>
|
|
51
|
+
* <p>
|
|
52
|
+
* <b>Cross-account use</b>: Yes. To perform this operation with a KMS key in a different Amazon Web Services account, specify
|
|
53
|
+
* the key ARN or alias ARN in the value of the <code>KeyId</code> parameter.</p>
|
|
54
|
+
* <p>
|
|
55
|
+
* <b>Required permissions</b>: <a href="https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html">kms:Decapsulate</a> (key policy)</p>
|
|
56
|
+
* <p>
|
|
57
|
+
* <b>Related operations:</b>
|
|
58
|
+
* </p>
|
|
59
|
+
* <ul>
|
|
60
|
+
* <li>
|
|
61
|
+
* <p>
|
|
62
|
+
* <a>Encapsulate</a>
|
|
63
|
+
* </p>
|
|
64
|
+
* </li>
|
|
65
|
+
* <li>
|
|
66
|
+
* <p>
|
|
67
|
+
* <a>CreateKey</a>
|
|
68
|
+
* </p>
|
|
69
|
+
* </li>
|
|
70
|
+
* <li>
|
|
71
|
+
* <p>
|
|
72
|
+
* <a>GetPublicKey</a>
|
|
73
|
+
* </p>
|
|
74
|
+
* </li>
|
|
75
|
+
* <li>
|
|
76
|
+
* <p>
|
|
77
|
+
* <a>DescribeKey</a>
|
|
78
|
+
* </p>
|
|
79
|
+
* </li>
|
|
80
|
+
* </ul>
|
|
81
|
+
* <p>
|
|
82
|
+
* <b>Eventual consistency</b>: The KMS API follows an eventual consistency model.
|
|
83
|
+
* For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/accessing-kms.html#programming-eventual-consistency">KMS eventual consistency</a>.</p>
|
|
84
|
+
* @example
|
|
85
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
86
|
+
* ```javascript
|
|
87
|
+
* import { KMSClient, DecapsulateCommand } from "@aws-sdk/client-kms"; // ES Modules import
|
|
88
|
+
* // const { KMSClient, DecapsulateCommand } = require("@aws-sdk/client-kms"); // CommonJS import
|
|
89
|
+
* // import type { KMSClientConfig } from "@aws-sdk/client-kms";
|
|
90
|
+
* const config = {}; // type is KMSClientConfig
|
|
91
|
+
* const client = new KMSClient(config);
|
|
92
|
+
* const input = { // DecapsulateRequest
|
|
93
|
+
* KeyId: "STRING_VALUE", // required
|
|
94
|
+
* SharedSecretCiphertextBlob: new Uint8Array(), // e.g. Buffer.from("") or new TextEncoder().encode("") // required
|
|
95
|
+
* EncapsulationAlgorithm: "ML_KEM", // required
|
|
96
|
+
* GrantTokens: [ // GrantTokenList
|
|
97
|
+
* "STRING_VALUE",
|
|
98
|
+
* ],
|
|
99
|
+
* DryRun: true || false,
|
|
100
|
+
* };
|
|
101
|
+
* const command = new DecapsulateCommand(input);
|
|
102
|
+
* const response = await client.send(command);
|
|
103
|
+
* // { // DecapsulateResponse
|
|
104
|
+
* // KeyId: "STRING_VALUE",
|
|
105
|
+
* // SharedSecret: new Uint8Array(),
|
|
106
|
+
* // EncapsulationAlgorithm: "ML_KEM",
|
|
107
|
+
* // };
|
|
108
|
+
*
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* @param DecapsulateCommandInput - {@link DecapsulateCommandInput}
|
|
112
|
+
* @returns {@link DecapsulateCommandOutput}
|
|
113
|
+
* @see {@link DecapsulateCommandInput} for command's `input` shape.
|
|
114
|
+
* @see {@link DecapsulateCommandOutput} for command's `response` shape.
|
|
115
|
+
* @see {@link KMSClientResolvedConfig | config} for KMSClient's `config` shape.
|
|
116
|
+
*
|
|
117
|
+
* @throws {@link DependencyTimeoutException} (server fault)
|
|
118
|
+
* <p>The system timed out while trying to fulfill the request. You can retry the
|
|
119
|
+
* request.</p>
|
|
120
|
+
*
|
|
121
|
+
* @throws {@link DisabledException} (client fault)
|
|
122
|
+
* <p>The request was rejected because the specified KMS key is not enabled.</p>
|
|
123
|
+
*
|
|
124
|
+
* @throws {@link DryRunOperationException} (client fault)
|
|
125
|
+
* <p> The request was rejected because the DryRun parameter was specified. </p>
|
|
126
|
+
*
|
|
127
|
+
* @throws {@link InvalidCiphertextException} (client fault)
|
|
128
|
+
* <p>From the <a>Decrypt</a> or <a>ReEncrypt</a> operation, the request
|
|
129
|
+
* was rejected because the specified ciphertext, or additional authenticated data incorporated
|
|
130
|
+
* into the ciphertext, such as the encryption context, is corrupted, missing, or otherwise
|
|
131
|
+
* invalid.</p>
|
|
132
|
+
* <p>From the <a>ImportKeyMaterial</a> operation, the request was rejected because
|
|
133
|
+
* KMS could not decrypt the encrypted (wrapped) key material. </p>
|
|
134
|
+
* <p>From the <a>Decapsulate</a> operation, the request was rejected because the
|
|
135
|
+
* length of the <code>SharedSecretCiphertextBlob</code> is inconsistent with the specified ML-KEM
|
|
136
|
+
* key spec.</p>
|
|
137
|
+
*
|
|
138
|
+
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
139
|
+
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
140
|
+
*
|
|
141
|
+
* @throws {@link InvalidKeyUsageException} (client fault)
|
|
142
|
+
* <p>The request was rejected for one of the following reasons: </p>
|
|
143
|
+
* <ul>
|
|
144
|
+
* <li>
|
|
145
|
+
* <p>The <code>KeyUsage</code> value of the KMS key is incompatible with the API
|
|
146
|
+
* operation.</p>
|
|
147
|
+
* </li>
|
|
148
|
+
* <li>
|
|
149
|
+
* <p>The encryption algorithm or signing algorithm specified for the operation is
|
|
150
|
+
* incompatible with the type of key material in the KMS key <code>(KeySpec</code>).</p>
|
|
151
|
+
* </li>
|
|
152
|
+
* </ul>
|
|
153
|
+
* <p>For encrypting, decrypting, re-encrypting, and generating data keys, the
|
|
154
|
+
* <code>KeyUsage</code> must be <code>ENCRYPT_DECRYPT</code>. For signing and verifying
|
|
155
|
+
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
156
|
+
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
157
|
+
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
158
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. For encapsulating and decapsulating
|
|
159
|
+
* shared secrets, the <code>KeyUsage</code> must be <code>ENCAPSULATE_DECAPSULATE</code>. To find
|
|
160
|
+
* the <code>KeyUsage</code> of a KMS key, use the <a>DescribeKey</a> operation.</p>
|
|
161
|
+
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
162
|
+
* <a>DescribeKey</a> operation.</p>
|
|
163
|
+
*
|
|
164
|
+
* @throws {@link KeyUnavailableException} (server fault)
|
|
165
|
+
* <p>The request was rejected because the specified KMS key was not available. You can retry
|
|
166
|
+
* the request.</p>
|
|
167
|
+
*
|
|
168
|
+
* @throws {@link KMSInternalException} (server fault)
|
|
169
|
+
* <p>The request was rejected because an internal exception occurred. The request can be
|
|
170
|
+
* retried.</p>
|
|
171
|
+
*
|
|
172
|
+
* @throws {@link KMSInvalidStateException} (client fault)
|
|
173
|
+
* <p>The request was rejected because the state of the specified resource is not valid for this
|
|
174
|
+
* request.</p>
|
|
175
|
+
* <p>This exceptions means one of the following:</p>
|
|
176
|
+
* <ul>
|
|
177
|
+
* <li>
|
|
178
|
+
* <p>The key state of the KMS key is not compatible with the operation. </p>
|
|
179
|
+
* <p>To find the key state, use the <a>DescribeKey</a> operation. For more
|
|
180
|
+
* information about which key states are compatible with each KMS operation, see
|
|
181
|
+
* <a href="https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html">Key states of KMS keys</a> in the <i>
|
|
182
|
+
* <i>Key Management Service Developer Guide</i>
|
|
183
|
+
* </i>.</p>
|
|
184
|
+
* </li>
|
|
185
|
+
* <li>
|
|
186
|
+
* <p>For cryptographic operations on KMS keys in custom key stores, this exception
|
|
187
|
+
* represents a general failure with many possible causes. To identify the cause, see the
|
|
188
|
+
* error message that accompanies the exception.</p>
|
|
189
|
+
* </li>
|
|
190
|
+
* </ul>
|
|
191
|
+
*
|
|
192
|
+
* @throws {@link NotFoundException} (client fault)
|
|
193
|
+
* <p>The request was rejected because the specified entity or resource could not be
|
|
194
|
+
* found.</p>
|
|
195
|
+
*
|
|
196
|
+
* @throws {@link KMSServiceException}
|
|
197
|
+
* <p>Base exception class for all service exceptions from KMS service.</p>
|
|
198
|
+
*
|
|
199
|
+
*
|
|
200
|
+
* @example To recover a shared secret from its encapsulated ciphertext
|
|
201
|
+
* ```javascript
|
|
202
|
+
* // Recovers a shared secret from its encapsulated ciphertext (SharedSecretCiphertextBlob) using the private key in an asymmetric ML-KEM KMS key. Your peer calls Encapsulate to generate the shared secret and ciphertext.
|
|
203
|
+
* const input = {
|
|
204
|
+
* EncapsulationAlgorithm: "ML_KEM",
|
|
205
|
+
* KeyId: "1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
206
|
+
* SharedSecretCiphertextBlob: "<binary data>"
|
|
207
|
+
* };
|
|
208
|
+
* const command = new DecapsulateCommand(input);
|
|
209
|
+
* const response = await client.send(command);
|
|
210
|
+
* /* response is
|
|
211
|
+
* {
|
|
212
|
+
* EncapsulationAlgorithm: "ML_KEM",
|
|
213
|
+
* KeyId: "arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
|
|
214
|
+
* SharedSecret: "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8="
|
|
215
|
+
* }
|
|
216
|
+
* *\/
|
|
217
|
+
* ```
|
|
218
|
+
*
|
|
219
|
+
* @public
|
|
220
|
+
*/
|
|
221
|
+
export declare class DecapsulateCommand extends DecapsulateCommand_base {
|
|
222
|
+
/** @internal type navigation helper, not in runtime. */
|
|
223
|
+
protected static __types: {
|
|
224
|
+
api: {
|
|
225
|
+
input: DecapsulateRequest;
|
|
226
|
+
output: DecapsulateResponse;
|
|
227
|
+
};
|
|
228
|
+
sdk: {
|
|
229
|
+
input: DecapsulateCommandInput;
|
|
230
|
+
output: DecapsulateCommandOutput;
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
}
|
|
@@ -191,6 +191,9 @@ declare const DecryptCommand_base: {
|
|
|
191
191
|
* invalid.</p>
|
|
192
192
|
* <p>From the <a>ImportKeyMaterial</a> operation, the request was rejected because
|
|
193
193
|
* KMS could not decrypt the encrypted (wrapped) key material. </p>
|
|
194
|
+
* <p>From the <a>Decapsulate</a> operation, the request was rejected because the
|
|
195
|
+
* length of the <code>SharedSecretCiphertextBlob</code> is inconsistent with the specified ML-KEM
|
|
196
|
+
* key spec.</p>
|
|
194
197
|
*
|
|
195
198
|
* @throws {@link InvalidGrantTokenException} (client fault)
|
|
196
199
|
* <p>The request was rejected because the specified grant token is not valid.</p>
|
|
@@ -212,8 +215,9 @@ declare const DecryptCommand_base: {
|
|
|
212
215
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
213
216
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
214
217
|
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
215
|
-
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>.
|
|
216
|
-
*
|
|
218
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. For encapsulating and decapsulating
|
|
219
|
+
* shared secrets, the <code>KeyUsage</code> must be <code>ENCAPSULATE_DECAPSULATE</code>. To find
|
|
220
|
+
* the <code>KeyUsage</code> of a KMS key, use the <a>DescribeKey</a> operation.</p>
|
|
217
221
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
218
222
|
* <a>DescribeKey</a> operation.</p>
|
|
219
223
|
*
|
|
@@ -184,8 +184,9 @@ declare const DeriveSharedSecretCommand_base: {
|
|
|
184
184
|
* messages, the <code>KeyUsage</code> must be <code>SIGN_VERIFY</code>. For generating and
|
|
185
185
|
* verifying message authentication codes (MACs), the <code>KeyUsage</code> must be
|
|
186
186
|
* <code>GENERATE_VERIFY_MAC</code>. For deriving key agreement secrets, the
|
|
187
|
-
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>.
|
|
188
|
-
*
|
|
187
|
+
* <code>KeyUsage</code> must be <code>KEY_AGREEMENT</code>. For encapsulating and decapsulating
|
|
188
|
+
* shared secrets, the <code>KeyUsage</code> must be <code>ENCAPSULATE_DECAPSULATE</code>. To find
|
|
189
|
+
* the <code>KeyUsage</code> of a KMS key, use the <a>DescribeKey</a> operation.</p>
|
|
189
190
|
* <p>To find the encryption or signing algorithms supported for a particular KMS key, use the
|
|
190
191
|
* <a>DescribeKey</a> operation.</p>
|
|
191
192
|
*
|
|
@@ -132,7 +132,7 @@ declare const DescribeKeyCommand_base: {
|
|
|
132
132
|
* // CreationDate: new Date("TIMESTAMP"),
|
|
133
133
|
* // Enabled: true || false,
|
|
134
134
|
* // Description: "STRING_VALUE",
|
|
135
|
-
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT",
|
|
135
|
+
* // KeyUsage: "SIGN_VERIFY" || "ENCRYPT_DECRYPT" || "GENERATE_VERIFY_MAC" || "KEY_AGREEMENT" || "ENCAPSULATE_DECAPSULATE",
|
|
136
136
|
* // KeyState: "Creating" || "Enabled" || "Disabled" || "PendingDeletion" || "PendingImport" || "PendingReplicaDeletion" || "Unavailable" || "Updating",
|
|
137
137
|
* // DeletionDate: new Date("TIMESTAMP"),
|
|
138
138
|
* // ValidTo: new Date("TIMESTAMP"),
|
|
@@ -142,7 +142,7 @@ declare const DescribeKeyCommand_base: {
|
|
|
142
142
|
* // ExpirationModel: "KEY_MATERIAL_EXPIRES" || "KEY_MATERIAL_DOES_NOT_EXPIRE",
|
|
143
143
|
* // KeyManager: "AWS" || "CUSTOMER",
|
|
144
144
|
* // 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",
|
|
145
|
-
* // 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" || "ML_DSA_44" || "ML_DSA_65" || "ML_DSA_87" || "ECC_NIST_EDWARDS25519",
|
|
145
|
+
* // 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" || "ML_DSA_44" || "ML_DSA_65" || "ML_DSA_87" || "ECC_NIST_EDWARDS25519" || "ML_KEM_512" || "ML_KEM_768" || "ML_KEM_1024",
|
|
146
146
|
* // EncryptionAlgorithms: [ // EncryptionAlgorithmSpecList
|
|
147
147
|
* // "SYMMETRIC_DEFAULT" || "RSAES_OAEP_SHA_1" || "RSAES_OAEP_SHA_256" || "SM2PKE",
|
|
148
148
|
* // ],
|
|
@@ -152,6 +152,9 @@ declare const DescribeKeyCommand_base: {
|
|
|
152
152
|
* // KeyAgreementAlgorithms: [ // KeyAgreementAlgorithmSpecList
|
|
153
153
|
* // "ECDH",
|
|
154
154
|
* // ],
|
|
155
|
+
* // EncapsulationAlgorithms: [ // EncapsulationAlgorithmSpecList
|
|
156
|
+
* // "ML_KEM",
|
|
157
|
+
* // ],
|
|
155
158
|
* // MultiRegion: true || false,
|
|
156
159
|
* // MultiRegionConfiguration: { // MultiRegionConfiguration
|
|
157
160
|
* // MultiRegionKeyType: "PRIMARY" || "REPLICA",
|