@scaleway/sdk-key-manager 2.21.0 → 2.22.1
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.
|
@@ -6,10 +6,7 @@ const GENERATE_KEY_MATERIAL_IMPORT_PARAMETERS_REQUEST_WRAPPING_ALGORITHMS = [
|
|
|
6
6
|
"unknown_wrapping_algorithm",
|
|
7
7
|
"rsa_oaep_2048_sha256",
|
|
8
8
|
"rsa_oaep_3072_sha256",
|
|
9
|
-
"rsa_oaep_4096_sha256"
|
|
10
|
-
"rsa_aes_key_wrap_2048_sha256",
|
|
11
|
-
"rsa_aes_key_wrap_3072_sha256",
|
|
12
|
-
"rsa_aes_key_wrap_4096_sha256"
|
|
9
|
+
"rsa_oaep_4096_sha256"
|
|
13
10
|
];
|
|
14
11
|
/** Lists all values of the enum {@link KeyAlgorithmAsymmetricEncryption}. */
|
|
15
12
|
const KEY_ALGORITHM_ASYMMETRIC_ENCRYPTIONS = [
|
|
@@ -205,7 +205,20 @@ const marshalImportKeyMaterialRequest = (request, defaults) => ({
|
|
|
205
205
|
value: request.encryptedKeyMaterial !== void 0 ? marshalImportKeyMaterialRequestEncryptedKeyMaterial(request.encryptedKeyMaterial, defaults) : void 0
|
|
206
206
|
}])
|
|
207
207
|
});
|
|
208
|
-
const marshalSignRequest = (request, defaults) => ({
|
|
208
|
+
const marshalSignRequest = (request, defaults) => ({ ...resolveOneOf([
|
|
209
|
+
{
|
|
210
|
+
param: "digest",
|
|
211
|
+
value: request.digest
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
param: "msg",
|
|
215
|
+
value: request.msg
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
param: "external_mu",
|
|
219
|
+
value: request.externalMu
|
|
220
|
+
}
|
|
221
|
+
]) });
|
|
209
222
|
const marshalUnwrapKeyRequest = (request, defaults) => ({
|
|
210
223
|
associated_data: request.associatedData,
|
|
211
224
|
ciphertext: request.ciphertext
|
|
@@ -217,8 +230,14 @@ const marshalUpdateKeyRequest = (request, defaults) => ({
|
|
|
217
230
|
tags: request.tags
|
|
218
231
|
});
|
|
219
232
|
const marshalVerifyRequest = (request, defaults) => ({
|
|
220
|
-
|
|
221
|
-
|
|
233
|
+
signature: request.signature,
|
|
234
|
+
...resolveOneOf([{
|
|
235
|
+
param: "digest",
|
|
236
|
+
value: request.digest
|
|
237
|
+
}, {
|
|
238
|
+
param: "msg",
|
|
239
|
+
value: request.msg
|
|
240
|
+
}])
|
|
222
241
|
});
|
|
223
242
|
const marshalWrapKeyRequest = (request, defaults) => ({
|
|
224
243
|
associated_data: request.associatedData,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Region } from "@scaleway/sdk-client";
|
|
2
2
|
//#region src/v1alpha1/types.gen.d.ts
|
|
3
3
|
export type DataKeyAlgorithmSymmetricEncryption = 'unknown_symmetric_encryption' | 'aes_256_gcm';
|
|
4
|
-
export type GenerateKeyMaterialImportParametersRequestWrappingAlgorithm = 'unknown_wrapping_algorithm' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256'
|
|
4
|
+
export type GenerateKeyMaterialImportParametersRequestWrappingAlgorithm = 'unknown_wrapping_algorithm' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256';
|
|
5
5
|
export type KeyAlgorithmAsymmetricEncryption = 'unknown_asymmetric_encryption' | 'rsa_oaep_2048_sha256' | 'rsa_oaep_3072_sha256' | 'rsa_oaep_4096_sha256';
|
|
6
6
|
export type KeyAlgorithmAsymmetricSigning = 'unknown_asymmetric_signing' | 'ec_p256_sha256' | 'ec_p384_sha384' | 'rsa_pss_2048_sha256' | 'rsa_pss_3072_sha256' | 'rsa_pss_4096_sha256' | 'rsa_pkcs1_2048_sha256' | 'rsa_pkcs1_3072_sha256' | 'rsa_pkcs1_4096_sha256' | 'ml_dsa_44' | 'ml_dsa_65' | 'ml_dsa_87' | 'ec_secp256k1_sha256';
|
|
7
7
|
export type KeyAlgorithmKeyEncapsulation = 'unknown_key_encapsulation' | 'ml_kem_768' | 'ml_kem_1024';
|
|
@@ -370,9 +370,8 @@ export type GenerateKeyMaterialImportParametersRequest = {
|
|
|
370
370
|
*/
|
|
371
371
|
keyId: string;
|
|
372
372
|
/**
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
*/
|
|
373
|
+
* Supported values are: `rsa_oaep_2048_sha256`, `rsa_oaep_3072_sha256`, `rsa_oaep_4096_sha256`.
|
|
374
|
+
*/
|
|
376
375
|
wrappingAlgorithm?: GenerateKeyMaterialImportParametersRequestWrappingAlgorithm;
|
|
377
376
|
};
|
|
378
377
|
export interface GenerateKeyMaterialImportParametersResponse {
|
|
@@ -565,9 +564,25 @@ export type SignRequest = {
|
|
|
565
564
|
*/
|
|
566
565
|
keyId: string;
|
|
567
566
|
/**
|
|
568
|
-
|
|
567
|
+
* For ECDSA and RSA keys, the digest generated using the key's hashing algorithm: 32 bytes (SHA-256) or 48 bytes (SHA-384).
|
|
568
|
+
The 64-byte bound only exists for the ML-DSA backward-compatibility case below.
|
|
569
|
+
Also accepted for ML-DSA for backward compatibility only; signatures may not conform to the ML-DSA spec, not recommended for new usage. Prefer `message` or `external_mu` for ML-DSA.
|
|
570
|
+
*
|
|
571
|
+
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
572
|
+
*/
|
|
573
|
+
digest?: string;
|
|
574
|
+
/**
|
|
575
|
+
* Only supported for ML-DSA keys (`raw` signing): the server computes the μ message representative internally before signing. Between 1 and 4096 bytes.
|
|
576
|
+
*
|
|
577
|
+
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
578
|
+
*/
|
|
579
|
+
msg?: string;
|
|
580
|
+
/**
|
|
581
|
+
* Must equal SHAKE256(tr ‖ 0x00 ‖ 0x00 ‖ message), where `tr` is the SHAKE256 of the key's public key. Signatures produced from other pre-hash computations (e.g. HashML-DSA) cannot be verified through this API.
|
|
582
|
+
*
|
|
583
|
+
* One-of ('payload'): at most one of 'digest', 'msg', 'externalMu' could be set.
|
|
569
584
|
*/
|
|
570
|
-
|
|
585
|
+
externalMu?: string;
|
|
571
586
|
};
|
|
572
587
|
export interface SignResponse {
|
|
573
588
|
/**
|
|
@@ -638,9 +653,17 @@ export type VerifyRequest = {
|
|
|
638
653
|
*/
|
|
639
654
|
keyId: string;
|
|
640
655
|
/**
|
|
641
|
-
*
|
|
656
|
+
* For ECDSA and RSA keys, the digest of the original message, generated using the key's hashing algorithm.
|
|
657
|
+
*
|
|
658
|
+
* One-of ('payload'): at most one of 'digest', 'msg' could be set.
|
|
659
|
+
*/
|
|
660
|
+
digest?: string;
|
|
661
|
+
/**
|
|
662
|
+
* For ML-DSA keys, the full original message. This also verifies signatures made with `raw` or `external_mu`: send the message whose μ was signed, not the μ itself (a μ payload always fails). Messages over 4096 bytes cannot be verified through this endpoint.
|
|
663
|
+
*
|
|
664
|
+
* One-of ('payload'): at most one of 'digest', 'msg' could be set.
|
|
642
665
|
*/
|
|
643
|
-
|
|
666
|
+
msg?: string;
|
|
644
667
|
/**
|
|
645
668
|
* The message signature to verify.
|
|
646
669
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk-key-manager",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.22.1",
|
|
4
4
|
"description": "Scaleway SDK key-manager",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -33,14 +33,14 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@scaleway/random-name": "6.0.2",
|
|
36
|
-
"@scaleway/sdk-std": "2.9.
|
|
36
|
+
"@scaleway/sdk-std": "2.9.5"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@repo/configs": "^0.1.1",
|
|
40
|
-
"@scaleway/sdk-client": "^2.
|
|
40
|
+
"@scaleway/sdk-client": "^2.16.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@scaleway/sdk-client": "^2.
|
|
43
|
+
"@scaleway/sdk-client": "^2.16.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"package:check": "pnpm publint",
|