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

Open fully encrypted wallets #747

Closed

Conversation

achow101
Copy link
Member

Allows users to open wallets with encrypted databases (bitcoin/bitcoin#28142) from the GUI.

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.
@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 24, 2023

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, 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.

@DrahtBot
Copy link
Contributor

🐙 This pull request conflicts with the target branch and needs rebase.

@hebasto
Copy link
Member

hebasto commented Sep 22, 2023

Allows users to open wallets with encrypted databases (bitcoin/bitcoin#28142) from the GUI.

While the base PR is still under reviewing, maybe convert this one to a draft?

@achow101 achow101 marked this pull request as draft September 23, 2023 15:43
@DrahtBot
Copy link
Contributor

There hasn't been much activity lately and the patch still needs rebase. What is the status here?

  • Is it still relevant? ➡️ Please solve the conflicts to make it ready for review and to ensure the CI passes.
  • Is it no longer relevant? ➡️ Please close.
  • Did the author lose interest or time to work on this? ➡️ Please close it and mark it 'Up for grabs' with the label, so that it can be picked up in the future.

@achow101 achow101 closed this Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants