-
Notifications
You must be signed in to change notification settings - Fork 906
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
hsm_secret encryption #3129
hsm_secret encryption #3129
Commits on Oct 10, 2019
-
daemons: initialize libsodium at setup
According to the doc (https://download.libsodium.org/doc): "sodium_init() initializes the library and should be called before any other function provided by Sodium. [...] the function ensures that the system's random number generator has been properly seeded.".
Configuration menu - View commit details
-
Copy full SHA for c0e3a74 - Browse repository at this point
Copy the full SHA c0e3a74View commit details -
lightningd: '--encrypted-hsm', a new startup option
Add a new startup option which will, if set, prompt the user for a password to derive a key from. This key will later be used to encrypt and/or decrypt `hsm_secret`. This was made a noarg option even if it would have been preferable to let the user the choice of how to specify the password. Since we have to chose, better to not let the password in the commands history.
Configuration menu - View commit details
-
Copy full SHA for 28e00e3 - Browse repository at this point
Copy the full SHA 28e00e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e51ef4 - Browse repository at this point
Copy the full SHA 6e51ef4View commit details -
hsmd: encrypt hsm_secret if 'lightningd' pass an encryption key
This splits maybe_create_hsm_secret() in two parts (either encrypted or in clear) for clarity, and adds an encryption detection in load_hsm(). There are actually three cases if an encryption key is passed: - There is no hsm_secret => just create it and store the encrypted seed - There is an encrypted hsm_secret => the provided key should be able to decrypt the seed, if the wrong key is passed libsodium will nicely error and hsmd will exit() to not throw a backtrace (using status_failed() as for other errors) at the face of an user who mistyped its password. - There is a non-encrypted hsm_secret => load the seed, delete the hsm_secret, create the hsm_secret, store the encrypted seed.
Configuration menu - View commit details
-
Copy full SHA for 7a45061 - Browse repository at this point
Copy the full SHA 7a45061View commit details -
lightningd: prevent hsmd from interpretating an encrypted hsm_secret …
…as not encrypted
Configuration menu - View commit details
-
Copy full SHA for 5cbf091 - Browse repository at this point
Copy the full SHA 5cbf091View commit details -
pytest: allow to set stdin, stdout and stderr at lightningd startup
And also allow to not wait for it to be started. Passing stderr=subprocess.STDOUT can be useful to wait_for_log() also on stderr messages.
Configuration menu - View commit details
-
Copy full SHA for 8d04ba1 - Browse repository at this point
Copy the full SHA 8d04ba1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9c576cb - Browse repository at this point
Copy the full SHA 9c576cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for e1af450 - Browse repository at this point
Copy the full SHA e1af450View commit details