Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c1c6d5b

Browse files
committedApr 12, 2024
fix
1 parent 8ab7586 commit c1c6d5b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎DynamoDbEncryption/dafny/StructuredEncryption/src/AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations.dfy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,10 @@ module AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations refines Abst
543543

544544
function method UnBuildCryptoMap(list : CryptoList, dataSoFar : StructuredDataMap := map[], actionsSoFar : CryptoSchemaMap := map[]) :
545545
(res : Result<(StructuredDataMap, CryptoSchemaMap), Error>)
546-
requires dataSoFar.Keys == actionsSoFar.Keys
546+
requires forall k <- actionsSoFar :: k in dataSoFar
547547
requires (forall v :: v in actionsSoFar.Values ==> IsAuthAttr(v))
548548
ensures res.Success? ==>
549-
&& res.value.0.Keys == res.value.1.Keys
549+
&& (forall k <- res.value.1 :: k in res.value.0)
550550
&& (forall v :: v in res.value.1.Values ==> IsAuthAttr(v))
551551
{
552552
if |list| == 0 then
@@ -557,7 +557,7 @@ module AwsCryptographyDbEncryptionSdkStructuredEncryptionOperations refines Abst
557557
if IsAuthAttr(list[0].action) then
558558
UnBuildCryptoMap(list[1..], dataSoFar[key := list[0].data], actionsSoFar[key := list[0].action])
559559
else
560-
UnBuildCryptoMap(list[1..], dataSoFar, actionsSoFar)
560+
UnBuildCryptoMap(list[1..], dataSoFar[key := list[0].data], actionsSoFar)
561561
}
562562

563563

‎DynamoDbEncryption/dafny/StructuredEncryption/test/HappyCaseTests.dfy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ module HappyCaseTests {
7979
//# - [Stored Encryption Context](./header.md#encryption-context): The Encryption Context stored in the header.
8080
//# - [Encrypted Data Keys](./header.md#encrypted-data-keys): The Encrypted Data Keys stored in the header.
8181
var parsedHeader := decryptRes.value.parsedHeader;
82-
expect decryptRes.value.cryptoSchema == StructuredDataTestFixtures.TEST_CRYPTO_SCHEMA;
82+
expect decryptRes.value.cryptoSchema == StructuredDataTestFixtures.TEST_CRYPTO_SCHEMA_AUTH_ONLY;
8383
expect parsedHeader.algorithmSuiteId == algSuiteId;
8484
expect encContext.Keys <= parsedHeader.storedEncryptionContext.Keys;
8585
expect forall k <- encContext.Keys :: parsedHeader.storedEncryptionContext[k] == encContext[k];

0 commit comments

Comments
 (0)
Please sign in to comment.