-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new checks Test Update after Squeeze and Test Final XOF after Squeeze Digest functions restrict the calls to |update| and |final| after |final| is called via |ctx->digest == NULL| check. Digest |final| functions cleanse the |ctx->md_data|, thus, the check on |ctx->digest| would prevent calling |update| or |final| once |final| has been processed; XOF Squeeze, however, does not finalize the squeeze step, thus, does not cleanse the |ctx->md_digest| (as the final digest functions do) since the XOF Squeeze could be called arbitrary number of times. Therefore, the |update| (SHAKE_Squeeze) and |finalXOF| (SHAKE_Final) return 1 on success and 0 on failure, based on the return value of the underlying SHAKE_ function. Internally, the check is performed via the |ctx->state| flag. The change in the |update| XOF function return value (int, instead of void), all digest |update| functions require a return value. They would always return 1 since a failure would be cought by the higer level EVP_Digest function (i.e., cleansed |ctx| variable
- Loading branch information
1 parent
672a67a
commit 1280353
Showing
7 changed files
with
155 additions
and
101 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
Oops, something went wrong.