getumbrel / umbrel-lightning

The official Lightning Node app for Umbrel, powered by LND.
https://umbrel.com
Other
15 stars 8 forks source link

Possibility to create a 12-word seed phrase instead of 24 #51

Open ffrediani opened 1 month ago

ffrediani commented 1 month ago

Can the Lightning Umbrel App give the option for people to choose to create their seed phrase using just the traditional 12-word instead of the 24-word ?

12 words is well enough to have the wallet secured is stored properly and 24 doesn't seem to bring that much of extra significant advantage, so at least it could let the use choose which one is the preferred option.

nmfretz commented 1 month ago

Hi @ffrediani. LND uses the aezeed cipher seed scheme and encodes that using a 24-word mnemonic. There is no option for a 12 word seed.

Here's some more info: https://github.com/lightningnetwork/lnd/blob/master/aezeed/README.md

ffrediani commented 1 month ago

Hello @nmfretz

I opened an issue on lightning project and the response to this was the following:

If you look at the linked README, you see that the aezeed actually only encodes 16 bytes of real entropy/randomness, which is equivalent to 12 words of a BIP-39 seed. The rest is a version number, the birth date of the seed and a salt/checksum for the encryption. So making the aezeed shorter would mean we would use an insecure amount of entropy.

You can, however, create an lnd wallet from an xprv, which you can derive from a normal 12 word BIP-39 seed.

Would it be possible during the seed creation phrase after first login to Lightning App to let the use choose a 12-word instead of a 24 and then derive whatever needed from it ?

ffrediani commented 1 month ago

Seems that currently the aezeed is the only way to more easily create seed for Lightning usage, although it is possible to use a private key created with a 12-word manually, which isn't the most handy thing.

Could Umbrel Lightning do such thing in order to allow user to choose 12-word instead of only current 24-word ?