airgap-it / airgap-vault

The AirGap Vault is installed on a spare smartphone that has no connection to any network, thus it is air gapped. This app handles the private key.
MIT License
386 stars 109 forks source link

12-word recovery phrase? #75

Closed Ahmed-Ali closed 3 years ago

Ahmed-Ali commented 3 years ago

IMHO, one of the worst security issues with all self-custody wallets (hardware, software, air-gapped or not) is the difficulty of remembering the recovery phrase; it makes it mandatory to have a copy of it outside your own brain memory, and this is the worst nightmare for me. It can be distracted, stolen, or simply lost.

I tried to work around this with way too many things. i.e encrypted USB thumbs, biometric protected devices, etc... at the end, if the device is lost, you lost the recovery phrase. And writing recovery phrase as a plain text on any material is just a not an option for me (you can't be too paranoid when it comes to crypto).

Hence this request, 24-word is much harder to remember than 12-word recovery phrase. Meanwhile, brute forcing 12-word, as far as I know, is still pretty damn unlikely (or maybe I am wrong?).

Any chance we can add option for 12-word Mnemonic phrase?

AndreasGassmann commented 3 years ago

First of all, AirGap Vault does support mnemonics that are shorter than 24 words. Specifically, it supports mnemonics of length 12, 15, 18, 21 and 24. However, when generating a new mnemonic with AirGap Vault, the output will always be a 24 word recovery phrase.

So if you want a 12 word seed, you will have to generate it elsewhere and then import it into your Vault. If you do this, make sure it's also generated on an offline device.

The reason we chose to only generate 24 words is not because 12 word mnemonics are insecure, but if the handling of shorter mnemonics is riskier in a few ways:

So basically it's not really a "mathematical" reason why we use 24 words, but rather to protect our users from losing their funds if they make mistakes.

That being said, I personally actually highly discourage memorising your seed word, especially if you don't have a backup.

I agree with you that the storage of a mnemonic is a very hard problem. However, I still feel that a proper backup is more secure than (only) memorising it.

I would recommend a combination of BIP39 Passphrases for decoy wallets / plausible deniability, as well as social recovery as an emergency backup. We just released a blogpost about social recovery / shamir's secret sharing a few days ago: https://medium.com/airgap-it/how-social-recovery-can-prevent-you-from-losing-all-your-funds-1259e685ee8b

EDIT:

I forgot to mention, in an upcoming release we will add secure recovery phrase generation by using dice or coin-flips, which might be interesting to you.

AndreasGassmann commented 3 years ago

I actually just realised that you can in fact generate a 12 word mnemonic in AirGap Vault with a workaround and using BIP85:

  1. You generate a new mnemonic, which will be 24 words long.
  2. Go to the settings, open your newly generated Secret and select "BIP85".
  3. Select 12 words as the output (and for extra paranoia, enter a long, random BIP39 passphrase)
  4. Write down the derived/generated 12 word phrase as your new seed phrase.
  5. Delete / Destroy the original 24 word phrase because it could be used to derive your new mnemonic again.

If the 24 word phrase is destroyed, this process should be just as secure as directly generating a 12 word mnemonic (it could actually even be more secure if you choose a strong BIP39 passphrase, because you can add additional randomness).

Ahmed-Ali commented 3 years ago

Hey Andreas, thanks a lot! That's a lot of helpful context! And I agree with all the points you raised!