-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add _ctx_release() functions to support 3rd party FIPS202 implementat…
…ions using dynamically allocated state Some consumers may want to provide their own Kecak implementations instead of using the ones provided by us. Such implementations may be using Keccak implementations using dynamic memory allocations, e.g., the Keccak from OpenSSL does that. In that case, we need to explicitly free the state once it is no longer needed. This PR adds corresponding functions called _ctx_release() and calls them in the appropriate places. Since all of our Keccak implementations use a statically allocated state, the xxx_ctx_release() is implemented as a no-op here. Naming of functions follows PQClean and liboqs. Signed-off-by: Matthias J. Kannwischer <[email protected]>
- Loading branch information
1 parent
b5a9034
commit 4ec1573
Showing
7 changed files
with
31 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,5 +61,7 @@ int main(void) { | |
print_hex("ss", ss1, sizeof(ss1)); | ||
} | ||
|
||
shake256_inc_ctx_release(&state); | ||
|
||
return 0; | ||
} |