Skip to content

Conversation

JoeGruffins
Copy link
Member

In core methods and consumers, clear passwords, private keys, and seeds
when possible to protect against some memory scraping attacks.

lightly discussed in #1582

This pr makes it so the crypter cannot be used in goroutines. I think we're not doing so atm, but should be careful going forward.

Copy link
Member

@chappjc chappjc left a comment

Choose a reason for hiding this comment

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

Thanks for this. I'm pretty sure we don't need the new encrypt.Zero given encode.ClearBytes.
I would not be opposed to dex/encrypt/encrypt.go defining type Zero = encode.ClearBytes to smooth some stuff out, but if a package is already importing dex/encode, there's really no need to use encrypt.

@JoeGruffins
Copy link
Member Author

Just rebased.

In core methods and consumers, clear passwords, private keys, and seeds
when possible to protect against some memory scraping attacks.
@JoeGruffins
Copy link
Member Author

JoeGruffins commented Apr 20, 2022

@chappjc chappjc merged commit d54a347 into decred:master Apr 21, 2022
@chappjc chappjc added this to the 0.5 milestone Apr 21, 2022
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.

2 participants