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
401 stars 111 forks source link

BIP-85 derivation algorithm: unnecessary index limitation #217

Open AnK26-616 opened 1 month ago

AnK26-616 commented 1 month ago

BIP85 based derivation algorithm is very useful not only for storing / deriving child wallet backup phrases but also for other solutions when the 12-24 word list can be used as a password to secure some secret. However the AirGap Vault (as of version 3.32.4) allows only to choose from the first 10 indexes (0-9). That is unnecessary limitation. It would be super useful if one could enter the index number simply by hand and then the app would derive the proper child mnemonic under given index. Is it possible to add that feature, please?

AndreasGassmann commented 3 weeks ago

This limitation was added to prevent accidental misuse. Now that we have the advanced mode, I don't see any problem with allowing any kind of index.

AnK26-616 commented 3 weeks ago

You mean adding it under advance mode? That would be really great! As currently advanced mode allows only BIP-39 passphrases which is different thing than index (tbh way more important than index - but the compatibility between different tools is something I am trying to address with Air Gap Vault)

AndreasGassmann commented 3 weeks ago

Yes. We can make it so that if you have advanced mode enabled, any kind of index can be used. Should we allow any index, or up to 2147483647?

AnK26-616 commented 3 weeks ago

Good question. Well... I am not sure if the effort to implement "any" really is worth spending. I would consider 32 bit integer at least - possibly with 64 bit integer limitation - 18446744073709551615- as the good "balance" between those two options (and also more future proof).