BenWestgate / Bails

Bails is a Bitcoin solution protecting against surveillance, censorship, and confiscation. It installs Bitcoin Core on the encrypted Persistent Storage of Tails, creates and recovers Bitcoin Core wallets from Codex32 (BIP93) seed backups, and creates backup Bails USB sticks and shareable blank Bails USB sticks. Learn more in README.md.
MIT License
38 stars 7 forks source link

Option to Restart Spaced Repetition #181

Open 84adam opened 3 days ago

84adam commented 3 days ago

Is your feature request related to a problem? Please describe. / Describe the solution you'd like

Some users have limited time to work with their Bails setup. Allowing users the option of continuing from where they left off in Spaced Repetition could help with memorizing the Persistent Storage passphrase. It could continue from the last interval that was set.

BenWestgate commented 3 days ago

Okay, I can implement this how you've described.

I'm not going to set the user account password to the Persistent Storage passphrase on subsequent starts because that password should be different because it can be much shorter.

84adam commented 3 days ago

Sounds great. Thank you. (Yes, I agree on the account password, that it should be different.)

Cheers~

BenWestgate commented 1 day ago

Okay, I've had a few problems testing my proposed solution: the luks2 passphrase check is pretty slow, 2 seconds and the PC may stop responding during.

And it requires saving a large file before the Persistent Storage features are turned on.

I'd like to generalize it so there is a folder of luks2 volumes that the spaced-repetition automatically does spaced repetition training on.

Whatever the file is named is what the passphrase prompt will say: "Persistent Storage.img" will say Enter your Persistent Storage passphrase, for example.

This way you can use it to train ALL your passphrases that you want to memorize, not just the Persistent Storage passphrase. Each with a separate interval depending on how well you know it already.

I'll have to make some more modifications to generalize it like this, but it should be easy.

Regarding the lag, my VM has 2GB ram so checking uses half of it. If others report this problem on better machines, I will reduce the memory and CPUs required and process priority at the cost of an even longer delay to be told the entry was wrong or not.

Another thing I'll have to think about is plausible deniability if we ever create or receive in a clone a luks2 volume the user doesn't know the passphrase of so users can claim that it is not in use. We're still going to have to prompt to enter the passphrase for that volume:

For example if the user recognizes the name of a vault they know they can't open, they could click skip and it would update the interval as if they had entered it correctly. But the fact they skipped would not be logged in any way.

I don't think the Persistent Storage passphrase prompts should be skipable, we tell them to destroy the written copy, but the rest should. As in some setups you'd write the wallet encryption passphrase down.

Let me know any thoughts. @epiccurious any comments on this feature? It looks really useful if I do it right.

BenWestgate commented 1 day ago

I think the proper place to store wallet encryption passphrase training files may be in the .bitcoin/wallets folder.

We don't want to be asking for a user's wallet passphrase for a wallet that is not even decrypted from its luks2 volume (vault) and loaded. As that would reveal it exists! For example "Enter the wallet encryption passphrase" would be a bad prompt to get while pretending your decoy is the real wallet if the decoy's passphrase is rejected! You could lose funds.

So wallet passphrase repetition training needs to be on what has been currently loaded into Bitcoin Core ONLY.

Wallet vaults (these luks2 volumes if they store a wallet) can be always on.

BenWestgate commented 1 day ago

As a bonus; if you only test the wallet encryption passphrase while it is loaded into core, we can use Bitcoin core's RPC to test the passphrase and not need an additional large file that is a resource hog to test on.

Similarly vaults can test the actual img file that contains secret wallets. Only the current Persistent Storage passphrase needs a unique file made to test the passphrase as amnesia cannot read /dev/sda2 to test the passphrase of it.