File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
DynamoDbEncryption/dafny/DynamoDbEncryption/test Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -40,8 +40,12 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
40
40
expect EdkWrapping. GetProviderWrappedMaterial (expectedHead.dataKeys[0].ciphertext, algorithmSuite). Success?;
41
41
var providerWrappedMaterial := EdkWrapping. GetProviderWrappedMaterial (expectedHead.dataKeys[0].ciphertext, algorithmSuite). Extract ();
42
42
43
- expect |providerWrappedMaterial| >= (28 + 16);
44
- var expectedBranchKeyVersionUuid := UUID. FromByteArray (providerWrappedMaterial[28 .. (28 + 16)]);
43
+ // The ciphertext structure in the hierarchy keyring contains Salt and IV before Version.
44
+ // The length of Salt is 16 and IV is 12 bytes. The length of Version is 16 bytes.
45
+ // https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/aws-kms/aws-kms-hierarchical-keyring.md#ciphertext
46
+
47
+ expect |providerWrappedMaterial| >= (16 + 12 + 16);
48
+ var expectedBranchKeyVersionUuid := UUID. FromByteArray (providerWrappedMaterial[16 + 12 .. (16 + 12 + 16)]);
45
49
var ddbEncResources :- expect DynamoDbEncryption. DynamoDbEncryption ();
46
50
47
51
var inputVariable: Types. GetEncryptedDataKeyDescriptionInput :=
You can’t perform that action at this time.
0 commit comments