-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add timing-resistant-secret-traits feature for PartialEq/Hash (#232)
Derived implementations of `PartialEq` and `Hash` are susceptible to timing side channels that make them unsuitable for secret types. This change introduces timing-safe implementations of `PartialEq` and `Hash` to all secret types that compare/hash, respectively, the SHA-256 hash of the secret rather than the secret itself. Because these implementations are significantly more computationally expensive than ordinary `PartialEq` and `Hash` implementations, they're behind a non-default `timing-resistant-secret-traits` feature flag.
- Loading branch information
1 parent
8e66503
commit ed63126
Showing
2 changed files
with
19 additions
and
0 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