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

protect wallet password and private key #4427

Merged
merged 1 commit into from
Jun 11, 2021
Merged

Conversation

simlecode
Copy link
Collaborator

Motivation

Proposed changes

Closes #

@codecov-commenter
Copy link

codecov-commenter commented Apr 30, 2021

Codecov Report

Merging #4427 (069f02f) into master (2447607) will increase coverage by 0%.
The diff coverage is 52%.

❗ Current head 069f02f differs from pull request most recent head b95ca71. Consider uploading reports for the commit b95ca71 to get more accurate results

@@          Coverage Diff           @@
##           master   #4427   +/-   ##
======================================
  Coverage      30%     30%           
======================================
  Files         249     248    -1     
  Lines       20240   20219   -21     
======================================
+ Hits         6084    6134   +50     
+ Misses      12852   12790   -62     
+ Partials     1304    1295    -9     

@simlecode simlecode force-pushed the fix/keys_lack_protect branch from 9464877 to de08bfc Compare May 19, 2021 01:09
@simlecode simlecode changed the title protect wallet password protect wallet password and private key May 19, 2021
Copy link

@keks keks left a comment

Choose a reason for hiding this comment

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

I think this looks pretty promising! There are still a few cases where the keys escape memguard's protection, and I flagged everything I could find throughout the call graph. I did not flag the same issues with the password enclaves, but ideally they also would not leave memguard protected memory. I am aware this is not always possible because you have to deal with external APIs such as scrypt.

I think this biggest step was taken, because the key are only in insecure memory for a very short time, i.e. during processing. The biggest danger came from the long-term storage of keys, which is not encrypted.

@simlecode simlecode force-pushed the fix/keys_lack_protect branch 2 times, most recently from 069f02f to 3dbcf07 Compare June 11, 2021 05:07
@simlecode simlecode force-pushed the fix/keys_lack_protect branch from 3dbcf07 to b95ca71 Compare June 11, 2021 05:09
@hunjixin hunjixin merged commit 273dc3a into master Jun 11, 2021
@zl03jsj zl03jsj deleted the fix/keys_lack_protect branch July 14, 2022 09:51
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.

4 participants