Add verification of missing cases related to length output. #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The SHA-512 proof does not verify the case where an int pointer is provided and the output length should be written to the int. The HMAC proof does not cover the case where this int pointer is null. This PR addresses both issues in the same way: a parameter is added to the spec indicating whether the length output pointer is non-null. Then the both cases are verified in separate crucible_llvm_verify statements. It doesn't appear to be possible to verify both cases symbolically in a single verify statement.
Also as part of this change, I renamed the verify-HMAC-SHA384.saw script to make it clear that this script only checks some input lengths (not all lengths up to the bound).
Resolves #4
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.