-
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.
refactor(dht): use CipherKey new type for diffie-hellman key (#4038)
Description --- - Document the DHT public interface - Move forward layer to `outbound` module - Remove unnecessary allocation from `encrypt` helper - Return `CipherKey` new type from Diffie-Hellman helper function - Changes `encrypt` and `decrypt` to take in `CipherKey` newtype - implement zeroize on drop for `CipherKey` new type Motivation and Context --- Documentation. `generate_ecdh_secret` returned a public key, which implies that it is safe to share publicly. The `CipherKey` new type will zero it's contents before releasing it's memory. The forward layer didn't have anything to do with SAF so shouldn't be located in that module. How Has This Been Tested? --- Existing tests pass Manually, no breaking changes. cargo doc --no-deps
- Loading branch information
Showing
41 changed files
with
271 additions
and
163 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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.