-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Trade AssumeValidAAD for run-time checks and proofs (#203)
* fix: Trade AssumeValidAAD for run-time checks and proofs DefaultCMM.GetEncryptionMaterials is given a valid encryption context, to which it may append the mapping `[reservedField := enc_vk]`. This would invalidate the encryption context if the new entry causes problems with the size limits. * `reservedField` is not UTF8 or is too long (but we know it's fine, because it's a constant) * `enc_vk` is not UTF8 or is too long after it has been Base64 encoded (but we know it's fine, because of the new and tested postcondition of `Signature.KeyGen`, and because of some new specifications and lemmas regarding `Base64.Encode`) * the updated encryption context exceeds the maximum number of allowed mappings (this is now run-time checked) * the updated encryption context contains too many bytes altogether (this is now run-time checked, which involves walking over all the entries in the encryption context--possibly expensive) Fixes #79 * Remove AssumeValidAAD altogether The previous uses of AssumeValidAAD in test/SDK/Serialize.dfy have now been replaced by proofs, found in test/Util/TestUtils.dfy. * Respond to PR comment * Replace extern postcondition with runtime check
- Loading branch information
1 parent
7cc10af
commit c3cfb9a
Showing
8 changed files
with
140 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters