Skip to content

Commit 6b9a948

Browse files
committed
Verification fixes
1 parent b60430e commit 6b9a948

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

DynamoDbEncryption/dafny/DynamoDbEncryption/test/DynamoDbGetEncryptedDataKeyDescriptionTest.dfy

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ module DynamoDbGetEncryptedDataKeyDescriptionTest {
156156
expect actualDataKeyDescription.EncryptedDataKeyDescriptionOutput[0].keyProviderInfo.value == "keyproviderInfo";
157157
}
158158

159-
method {:test} TestDDBItemInputAwsKmsHDataKeyCase()
159+
method {:test} {:isolate_assertions} TestDDBItemInputAwsKmsHDataKeyCase()
160160
{
161161
var expectedHead := CreatePartialHeader(testVersion, testFlavor0, testMsgID, testLegend, testEncContext, [testAwsKmsHDataKey]);
162162
var serializedHeader := expectedHead.serialize() + expectedHead.msgID;

DynamoDbEncryption/dafny/StructuredEncryption/src/Canonize.dfy

+11
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,14 @@ module {:options "/functionSyntax:4" } Canonize {
663663
exists x :: x in origData && Updated2(x, item, DoDecrypt)
664664
}
665665

666+
ghost function Updated2Item(origData : AuthList, item : CanonCryptoItem) : (result : AuthItem)
667+
requires Updated2Exists(origData, item)
668+
ensures Updated2(result, item, DoDecrypt)
669+
{
670+
var r :| Updated2(r, item, DoDecrypt);
671+
r
672+
}
673+
666674
ghost predicate Updated5Exists(origData : CryptoList, item : CanonCryptoItem)
667675
{
668676
exists x :: x in origData && Updated5(x, item, DoEncrypt)
@@ -693,6 +701,9 @@ module {:options "/functionSyntax:4" } Canonize {
693701
assert forall val <- input :: exists x :: x in origData && Updated2(x, val, DoDecrypt);
694702
assert forall i | 0 <= i < |input| :: exists x :: x in origData && Updated2(x, input[i], DoDecrypt) by {
695703
InputIsInput(origData, input);
704+
forall i | 0 <= i < |input| ensures exists x :: x in origData && Updated2(x, input[i], DoDecrypt) {
705+
var x := Updated2Item(origData, input[i]);
706+
}
696707
}
697708
assert forall newVal <- output :: exists x :: x in origData && Updated3(x, newVal, DoDecrypt);
698709
}

0 commit comments

Comments
 (0)