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

[IMPROVED] crypto: effectively zeroize mem. content #501

Merged
merged 1 commit into from
Jan 10, 2022

Conversation

paoloteti
Copy link
Contributor

When libsodim is not used, memory content is zeroized using a simple memset() and de-allocated using free(), so compiler may decide to remove memset().

This patch add secure_memzero(), similar to sodium_zero(), to be sure to zeroize memory content also when libsodium is not used.

When libsodim is not used, memory content is zeroized using a simple
memset() and de-allocated using free(), so compiler may decide to remove
memset().

This patch add secure_memzero(), similar to sodium_zero(), to be sure to
zeroize memory content also when libsodium is not used.
Copy link
Member

@kozlovic kozlovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks again Paolo for your contributions!

@kozlovic kozlovic merged commit 24729b2 into nats-io:main Jan 10, 2022
@paoloteti paoloteti deleted the memzero branch January 10, 2022 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants