-
Notifications
You must be signed in to change notification settings - Fork 261
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
Open fully encrypted wallets #747
Open fully encrypted wallets #747
Conversation
EncryptedDatabase is a WalletDatabase that encrypts the records before writing them to an underlying WalletDatabase. This encryption occurs transparently to the higher level application logic so the wallet does not need to be concerned about whether the data it is writing is encrypted. In order to work with prefix matching and cursor iteration in an order that we are expecting, EncryptedDatabase maintains a map of the unencrypted record keys to the encrypted record keys. When given the plaintext record key to pull up, it can retrieve the encrypted record key and then retrieve the encrypted record from the underlying database.
It's useful to be able to just read a record without the batch doing any sort of deserialization. The new overload of Read will just place the record's value into the provided DataStream.
EncrytpedDB wallets will use sqlite but with a different application id. This provides downgrade protection in addition to easy identification of encrypted dbs. The application id will be the network magic XOR'd with 0x36932d47 (randomly generated value).
Wallets with encrypted databases need the user to provide their database passphrase which cannot be done on start, so skip any such wallets on startup.
Sometimes we just need the dialog without an attached wallet.
The warning text that appears above the passphrase inputs may need to be customized depending on the context in which the passphrase is being entered, so let the caller optionally set it.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
🐙 This pull request conflicts with the target branch and needs rebase. |
While the base PR is still under reviewing, maybe convert this one to a draft? |
There hasn't been much activity lately and the patch still needs rebase. What is the status here?
|
Allows users to open wallets with encrypted databases (bitcoin/bitcoin#28142) from the GUI.