Skip to content

Commit 47903b3

Browse files
Update generated code (#1901)
update generated code
1 parent 8fdc23b commit 47903b3

File tree

9 files changed

+58
-29
lines changed

9 files changed

+58
-29
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"variables": {
3-
"${LATEST}": "3.344.3"
3+
"${LATEST}": "3.344.6"
44
},
55
"endpoints": "https://raw.githubusercontent.com/aws/aws-sdk-php/${LATEST}/src/data/endpoints.json",
66
"services": {

src/Service/Kms/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- AWS api-change: AWS KMS announces the support for on-demand rotation of symmetric-encryption KMS keys with imported key material (EXTERNAL origin).
88
- AWS api-change: Rework regions configuration
9+
- AWS api-change: AWS KMS announces the support of ML-DSA key pairs that creates post-quantum safe digital signatures.
910

1011
## 1.9.0
1112

src/Service/Kms/src/Enum/KeySpec.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ final class KeySpec
1212
public const HMAC_256 = 'HMAC_256';
1313
public const HMAC_384 = 'HMAC_384';
1414
public const HMAC_512 = 'HMAC_512';
15+
public const ML_DSA_44 = 'ML_DSA_44';
16+
public const ML_DSA_65 = 'ML_DSA_65';
17+
public const ML_DSA_87 = 'ML_DSA_87';
1518
public const RSA_2048 = 'RSA_2048';
1619
public const RSA_3072 = 'RSA_3072';
1720
public const RSA_4096 = 'RSA_4096';
@@ -29,6 +32,9 @@ public static function exists(string $value): bool
2932
self::HMAC_256 => true,
3033
self::HMAC_384 => true,
3134
self::HMAC_512 => true,
35+
self::ML_DSA_44 => true,
36+
self::ML_DSA_65 => true,
37+
self::ML_DSA_87 => true,
3238
self::RSA_2048 => true,
3339
self::RSA_3072 => true,
3440
self::RSA_4096 => true,

src/Service/Kms/src/Enum/MessageType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
final class MessageType
66
{
77
public const DIGEST = 'DIGEST';
8+
public const EXTERNAL_MU = 'EXTERNAL_MU';
89
public const RAW = 'RAW';
910

1011
public static function exists(string $value): bool
1112
{
1213
return isset([
1314
self::DIGEST => true,
15+
self::EXTERNAL_MU => true,
1416
self::RAW => true,
1517
][$value]);
1618
}

src/Service/Kms/src/Enum/SigningAlgorithmSpec.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ final class SigningAlgorithmSpec
77
public const ECDSA_SHA_256 = 'ECDSA_SHA_256';
88
public const ECDSA_SHA_384 = 'ECDSA_SHA_384';
99
public const ECDSA_SHA_512 = 'ECDSA_SHA_512';
10+
public const ML_DSA_SHAKE_256 = 'ML_DSA_SHAKE_256';
1011
public const RSASSA_PKCS1_V1_5_SHA_256 = 'RSASSA_PKCS1_V1_5_SHA_256';
1112
public const RSASSA_PKCS1_V1_5_SHA_384 = 'RSASSA_PKCS1_V1_5_SHA_384';
1213
public const RSASSA_PKCS1_V1_5_SHA_512 = 'RSASSA_PKCS1_V1_5_SHA_512';
@@ -21,6 +22,7 @@ public static function exists(string $value): bool
2122
self::ECDSA_SHA_256 => true,
2223
self::ECDSA_SHA_384 => true,
2324
self::ECDSA_SHA_512 => true,
25+
self::ML_DSA_SHAKE_256 => true,
2426
self::RSASSA_PKCS1_V1_5_SHA_256 => true,
2527
self::RSASSA_PKCS1_V1_5_SHA_384 => true,
2628
self::RSASSA_PKCS1_V1_5_SHA_512 => true,

src/Service/Kms/src/Input/CreateKeyRequest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ final class CreateKeyRequest extends Input
7878
* - For HMAC KMS keys (symmetric), specify `GENERATE_VERIFY_MAC`.
7979
* - For asymmetric KMS keys with RSA key pairs, specify `ENCRYPT_DECRYPT` or `SIGN_VERIFY`.
8080
* - For asymmetric KMS keys with NIST-recommended elliptic curve key pairs, specify `SIGN_VERIFY` or `KEY_AGREEMENT`.
81-
* - For asymmetric KMS keys with `ECC_SECG_P256K1` key pairs specify `SIGN_VERIFY`.
81+
* - For asymmetric KMS keys with `ECC_SECG_P256K1` key pairs, specify `SIGN_VERIFY`.
82+
* - For asymmetric KMS keys with ML-DSA key pairs, specify `SIGN_VERIFY`.
8283
* - For asymmetric KMS keys with SM2 key pairs (China Regions only), specify `ENCRYPT_DECRYPT`, `SIGN_VERIFY`, or
8384
* `KEY_AGREEMENT`.
8485
*
@@ -142,6 +143,12 @@ final class CreateKeyRequest extends Input
142143
*
143144
* - `ECC_SECG_P256K1` (secp256k1), commonly used for cryptocurrencies.
144145
*
146+
* - Asymmetric ML-DSA key pairs (signing and verification)
147+
*
148+
* - `ML_DSA_44`
149+
* - `ML_DSA_65`
150+
* - `ML_DSA_87`
151+
*
145152
* - SM2 key pairs (encryption and decryption -or- signing and verification -or- deriving shared secrets)
146153
*
147154
* - `SM2` (China Regions only)

src/Service/Kms/src/Input/SignRequest.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,30 @@ final class SignRequest extends Input
5050

5151
/**
5252
* Tells KMS whether the value of the `Message` parameter should be hashed as part of the signing algorithm. Use `RAW`
53-
* for unhashed messages; use `DIGEST` for message digests, which are already hashed.
53+
* for unhashed messages; use `DIGEST` for message digests, which are already hashed; use `EXTERNAL_MU` for 64-byte
54+
* representative μ used in ML-DSA signing as defined in NIST FIPS 204 Section 6.2.
5455
*
5556
* When the value of `MessageType` is `RAW`, KMS uses the standard signing algorithm, which begins with a hash function.
56-
* When the value is `DIGEST`, KMS skips the hashing step in the signing algorithm.
57+
* When the value is `DIGEST`, KMS skips the hashing step in the signing algorithm. When the value is `EXTERNAL_MU` KMS
58+
* skips the concatenated hashing of the public key hash and the message done in the ML-DSA signing algorithm.
5759
*
58-
* ! Use the `DIGEST` value only when the value of the `Message` parameter is a message digest. If you use the `DIGEST`
59-
* ! value with an unhashed message, the security of the signing operation can be compromised.
60+
* ! Use the `DIGEST` or `EXTERNAL_MU` value only when the value of the `Message` parameter is a message digest. If you
61+
* ! use the `DIGEST` value with an unhashed message, the security of the signing operation can be compromised.
6062
*
61-
* When the value of `MessageType`is `DIGEST`, the length of the `Message` value must match the length of hashed
63+
* When the value of `MessageType` is `DIGEST`, the length of the `Message` value must match the length of hashed
6264
* messages for the specified signing algorithm.
6365
*
66+
* When the value of `MessageType` is `EXTERNAL_MU` the length of the `Message` value must be 64 bytes.
67+
*
6468
* You can submit a message digest and omit the `MessageType` or specify `RAW` so the digest is hashed again while
6569
* signing. However, this can cause verification failures when verifying with a system that assumes a single hash.
6670
*
67-
* The hashing algorithm in that `Sign` uses is based on the `SigningAlgorithm` value.
71+
* The hashing algorithm that `Sign` uses is based on the `SigningAlgorithm` value.
6872
*
6973
* - Signing algorithms that end in SHA_256 use the SHA_256 hashing algorithm.
7074
* - Signing algorithms that end in SHA_384 use the SHA_384 hashing algorithm.
7175
* - Signing algorithms that end in SHA_512 use the SHA_512 hashing algorithm.
76+
* - Signing algorithms that end in SHAKE_256 use the SHAKE_256 hashing algorithm.
7277
* - SM2DSA uses the SM3 hashing algorithm. For details, see Offline verification with SM2 key pairs [^1].
7378
*
7479
* [^1]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification

src/Service/Kms/src/Input/VerifyRequest.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,31 @@ final class VerifyRequest extends Input
4949

5050
/**
5151
* Tells KMS whether the value of the `Message` parameter should be hashed as part of the signing algorithm. Use `RAW`
52-
* for unhashed messages; use `DIGEST` for message digests, which are already hashed.
52+
* for unhashed messages; use `DIGEST` for message digests, which are already hashed; use `EXTERNAL_MU` for 64-byte
53+
* representative μ used in ML-DSA signing as defined in NIST FIPS 204 Section 6.2.
5354
*
5455
* When the value of `MessageType` is `RAW`, KMS uses the standard signing algorithm, which begins with a hash function.
55-
* When the value is `DIGEST`, KMS skips the hashing step in the signing algorithm.
56+
* When the value is `DIGEST`, KMS skips the hashing step in the signing algorithm. When the value is `EXTERNAL_MU` KMS
57+
* skips the concatenated hashing of the public key hash and the message done in the ML-DSA signing algorithm.
5658
*
57-
* ! Use the `DIGEST` value only when the value of the `Message` parameter is a message digest. If you use the `DIGEST`
58-
* ! value with an unhashed message, the security of the verification operation can be compromised.
59+
* ! Use the `DIGEST` or `EXTERNAL_MU` value only when the value of the `Message` parameter is a message digest. If you
60+
* ! use the `DIGEST` value with an unhashed message, the security of the signing operation can be compromised.
5961
*
60-
* When the value of `MessageType`is `DIGEST`, the length of the `Message` value must match the length of hashed
62+
* When the value of `MessageType` is `DIGEST`, the length of the `Message` value must match the length of hashed
6163
* messages for the specified signing algorithm.
6264
*
65+
* When the value of `MessageType` is `EXTERNAL_MU` the length of the `Message` value must be 64 bytes.
66+
*
6367
* You can submit a message digest and omit the `MessageType` or specify `RAW` so the digest is hashed again while
6468
* signing. However, if the signed message is hashed once while signing, but twice while verifying, verification fails,
6569
* even when the message hasn't changed.
6670
*
67-
* The hashing algorithm in that `Verify` uses is based on the `SigningAlgorithm` value.
71+
* The hashing algorithm that `Verify` uses is based on the `SigningAlgorithm` value.
6872
*
6973
* - Signing algorithms that end in SHA_256 use the SHA_256 hashing algorithm.
7074
* - Signing algorithms that end in SHA_384 use the SHA_384 hashing algorithm.
7175
* - Signing algorithms that end in SHA_512 use the SHA_512 hashing algorithm.
76+
* - Signing algorithms that end in SHAKE_256 use the SHAKE_256 hashing algorithm.
7277
* - SM2DSA uses the SM3 hashing algorithm. For details, see Offline verification with SM2 key pairs [^1].
7378
*
7479
* [^1]: https://docs.aws.amazon.com/kms/latest/developerguide/offline-operations.html#key-spec-sm-offline-verification

src/Service/Kms/src/KmsClient.php

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,16 @@ public function createAlias($input): Result
184184
* Then, use the `KeyUsage` parameter to determine whether the KMS key will be used to encrypt and decrypt or sign and
185185
* verify. You can't change these properties after the KMS key is created.
186186
*
187-
* Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, or an SM2 key pair (China Regions
188-
* only). The private key in an asymmetric KMS key never leaves KMS unencrypted. However, you can use the GetPublicKey
189-
* operation to download the public key so it can be used outside of KMS. Each KMS key can have only one key usage.
190-
* KMS keys with RSA key pairs can be used to encrypt and decrypt data or sign and verify messages (but not both). KMS
191-
* keys with NIST-recommended ECC key pairs can be used to sign and verify messages or derive shared secrets (but not
192-
* both). KMS keys with `ECC_SECG_P256K1` can be used only to sign and verify messages. KMS keys with SM2 key pairs
193-
* (China Regions only) can be used to either encrypt and decrypt data, sign and verify messages, or derive shared
194-
* secrets (you must choose one key usage type). For information about asymmetric KMS keys, see Asymmetric KMS keys
195-
* [^2] in the *Key Management Service Developer Guide*.
187+
* Asymmetric KMS keys contain an RSA key pair, Elliptic Curve (ECC) key pair, ML-DSA key pair or an SM2 key pair
188+
* (China Regions only). The private key in an asymmetric KMS key never leaves KMS unencrypted. However, you can use
189+
* the GetPublicKey operation to download the public key so it can be used outside of KMS. Each KMS key can have only
190+
* one key usage. KMS keys with RSA key pairs can be used to encrypt and decrypt data or sign and verify messages (but
191+
* not both). KMS keys with NIST-recommended ECC key pairs can be used to sign and verify messages or derive shared
192+
* secrets (but not both). KMS keys with `ECC_SECG_P256K1` can be used only to sign and verify messages. KMS keys with
193+
* ML-DSA key pairs can be used to sign and verify messages. KMS keys with SM2 key pairs (China Regions only) can be
194+
* used to either encrypt and decrypt data, sign and verify messages, or derive shared secrets (you must choose one
195+
* key usage type). For information about asymmetric KMS keys, see Asymmetric KMS keys [^2] in the *Key Management
196+
* Service Developer Guide*.
196197
*
197198
* - `HMAC KMS key`:
198199
*
@@ -875,10 +876,10 @@ public function listAliases($input = []): ListAliasesResponse
875876
* outside of KMS. For information about asymmetric KMS keys, see Asymmetric KMS keys [^2] in the *Key Management
876877
* Service Developer Guide*.
877878
*
878-
* Digital signatures are generated and verified by using asymmetric key pair, such as an RSA or ECC pair that is
879-
* represented by an asymmetric KMS key. The key owner (or an authorized user) uses their private key to sign a message.
880-
* Anyone with the public key can verify that the message was signed with that particular private key and that the
881-
* message hasn't changed since it was signed.
879+
* Digital signatures are generated and verified by using asymmetric key pair, such as an RSA, ECC, or ML-DSA pair that
880+
* is represented by an asymmetric KMS key. The key owner (or an authorized user) uses their private key to sign a
881+
* message. Anyone with the public key can verify that the message was signed with that particular private key and that
882+
* the message hasn't changed since it was signed.
882883
*
883884
* To use the `Sign` operation, provide the following information:
884885
*
@@ -887,8 +888,8 @@ public function listAliases($input = []): ListAliasesResponse
887888
* key.
888889
* - Use the `Message` parameter to specify the message or message digest to sign. You can submit messages of up to 4096
889890
* bytes. To sign a larger message, generate a hash digest of the message, and then provide the hash digest in the
890-
* `Message` parameter. To indicate whether the message is a full message or a digest, use the `MessageType`
891-
* parameter.
891+
* `Message` parameter. To indicate whether the message is a full message, a digest, or an ML-DSA EXTERNAL_MU, use the
892+
* `MessageType` parameter.
892893
* - Choose a signing algorithm that is compatible with the KMS key.
893894
*
894895
* ! When signing a message, be sure to record the KMS key and the signing algorithm. This information is required to

0 commit comments

Comments
 (0)