Skip to content

Commit

Permalink
Make Main.dfy verify
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewBennington committed Oct 24, 2019
1 parent 313f647 commit 70c1643
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ SRCS = \
src/Crypto/Random.dfy \
src/Crypto/RSAEncryption.dfy \
src/Crypto/Signature.dfy \
src/Main.dfy \
src/SDK/AlgorithmSuite.dfy \
src/SDK/CMM/DefaultCMM.dfy \
src/SDK/CMM/Defs.dfy \
Expand Down
2 changes: 2 additions & 0 deletions src/SDK/ToyClient.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ module ToyClientDef {
method Encrypt(pt: seq<uint8>, ec: Materials.EncryptionContext) returns (res: Result<Encryption>)
requires Valid()
ensures Valid()
ensures res.Success? ==> |res.value.authTag| == ALGORITHM.tagLen as int
ensures res.Success? ==> |res.value.iv| == ALGORITHM.ivLen as int
{
var em :- GetEncMaterials(ec);
if |em.plaintextDataKey.get| != 32 {
Expand Down

0 comments on commit 70c1643

Please sign in to comment.