Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: simplify zeroizing and add test to DHKE #197

Merged
merged 1 commit into from Aug 21, 2023

Conversation

AaronFeickert
Copy link
Contributor

@AaronFeickert AaronFeickert commented Aug 16, 2023

Simplifies the implementation of zeroizing support for Diffie-Hellman key exchanges and improves test coverage.

Currently, the DiffieHellmanSharedSecret struct has manual implementations of zeroize and drop to handle zeroizing. Now that we have a more modern version of zeroize as a dependency, we can do better. This PR uses that crate's Zeroize and ZeroizeOnDrop derived traits to handle this more cleanly. It also adds a sanity check that the byte representations of both sides of a key exchange match, which improves test coverage.

Partially addresses #196.

@AaronFeickert AaronFeickert changed the title feat: add ZeroizeOnDrop and test to DHKE feat: simplify zeroizing and add test to DHKE Aug 16, 2023
@SWvheerden SWvheerden merged commit 1e6f603 into tari-project:main Aug 21, 2023
6 checks passed
@AaronFeickert AaronFeickert deleted the dhke-zeroize branch August 21, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants