-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update message and signature key types (#5064)
Description --- Updates communications message and signature keys to use the new `Hidden` and `SafeArray` designs. Minor refactoring for clarity of design intent. Motivation and Context --- Communications messages are encrypted using the `ChaCha20` unauthenticated stream cipher, and signatures are encrypted using the `ChaCha20-Poly1305` authenticated stream cipher. However, the keys used for these purposes are defined using zeroize-on-drop `GenericArray` types; further, the hash derivation of the keys results in copies left in memory. This work updates the key types to use the new `Hidden` and `SafeArray` designs. They are renamed to reflect their specific purposes, instantiated in place to reduce in-memory copies, and associated functions are also renamed to make their intent more clear. How Has This Been Tested? --- Existing tests pass.
- Loading branch information
1 parent
b2bed79
commit a94189d
Showing
6 changed files
with
78 additions
and
92 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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