Skip to content

Commit 88abd76

Browse files
fix duvet annotations
1 parent 912305a commit 88abd76

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryption/src/AwsCryptographyDbEncryptionSdkDynamoDbOperations.dfy

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ module AwsCryptographyDbEncryptionSdkDynamoDbOperations refines AbstractAwsCrypt
5353
match input.input
5454
{
5555
//= specification/dynamodb-encryption-client/ddb-get-encrypted-data-key-description.md#behavior
56-
//= type=implication
5756
//# - If the input is a encrypted DynamoDB item, it MUST attempt to extract "aws_dbe_head" attribute from the DynamoDB item to get binary header.
5857
case plaintextItem(plainTextItem) =>{
5958
:- Need("aws_dbe_head" in plainTextItem && plainTextItem["aws_dbe_head"].B?, E("Header not found in the DynamoDB item."));
@@ -63,16 +62,13 @@ module AwsCryptographyDbEncryptionSdkDynamoDbOperations refines AbstractAwsCrypt
6362
header := headerItem;
6463
}
6564
//= specification/dynamodb-encryption-client/ddb-get-encrypted-data-key-description.md#behavior
66-
//= type=implication
6765
//# - This operation MUST deserialize the header bytes according to the header format.
6866
var deserializedHeader :- Header.PartialDeserialize(header).MapFailure(e => AwsCryptographyDbEncryptionSdkStructuredEncryption(e));
6967
//= specification/dynamodb-encryption-client/ddb-get-encrypted-data-key-description.md#behavior
70-
//= type=implication
7168
//# - This operation MUST extract the dataKeys from the deserialize header.
7269
var datakeys := deserializedHeader.dataKeys;
7370
var list : EncryptedDataKeyDescriptionList := [];
7471
//= specification/dynamodb-encryption-client/ddb-get-encrypted-data-key-description.md#behavior
75-
//= type=implication
7672
//# - For every Data Key in Data Keys, the operation MUST attempt to extract a description of the Data Key.
7773
for i := 0 to |datakeys| {
7874
var extractedKeyProviderId :- UTF8.Decode(datakeys[i].keyProviderId).MapFailure(e => E(e));
@@ -82,7 +78,6 @@ module AwsCryptographyDbEncryptionSdkDynamoDbOperations refines AbstractAwsCrypt
8278
:- Need(deserializedHeader.flavor == 0 || deserializedHeader.flavor == 1, E("Invalid format flavor."));
8379
var algorithmSuite;
8480
//= specification/dynamodb-encryption-client/ddb-get-encrypted-data-key-description.md#behavior
85-
//= type=implication
8681
//# - This operation MUST extract the Format Flavor from the deserialize header.
8782
if deserializedHeader.flavor == 0{
8883
algorithmSuite := AlgorithmSuites.DBE_ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_SYMSIG_HMAC_SHA384;

DynamoDbEncryption/dafny/DynamoDbEncryption/test/DynamoDbGetEncryptedDataKeyDescriptionTest.dfy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
261261
expect |actualDataKeyDescription.EncryptedDataKeyDescriptionOutput| > 0;
262262

263263
var i := 0;
264+
//= specification/dynamodb-encryption-client/ddb-get-encrypted-data-key-description.md#behavior
265+
//= type=test
266+
//# - For every Data Key in Data Keys, the operation MUST attempt to extract a description of the Data Key.
264267
while (i < |expectedHead.dataKeys|) {
265268
var expectedkeyProviderId :- expect UTF8.Decode(expectedHead.dataKeys[i].keyProviderId);
266269
var expectedkeyProviderInfo :- expect UTF8.Decode(expectedHead.dataKeys[i].keyProviderInfo);
@@ -287,6 +290,9 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
287290
expect |actualDataKeyDescription.EncryptedDataKeyDescriptionOutput| == |expectedHead.dataKeys|;
288291
expect |actualDataKeyDescription.EncryptedDataKeyDescriptionOutput| > 0;
289292

293+
//= specification/dynamodb-encryption-client/ddb-get-encrypted-data-key-description.md#behavior
294+
//= type=test
295+
//# - For every Data Key in Data Keys, the operation MUST attempt to extract a description of the Data Key.
290296
var i := 0;
291297
while (i < |expectedHead.dataKeys|) {
292298
var expectedkeyProviderId :- expect UTF8.Decode(expectedHead.dataKeys[i].keyProviderId);

0 commit comments

Comments
 (0)