Post
Topic
Board Hardware wallets
Re: Secure Element in Hardware Wallets
by
Meuserna
on 19/02/2025, 00:35:06 UTC
...
Instead of saving your seed phrase in a secure element, Krux lets you encrypt it (AES-CBC, PBKDF2 Iterations: 100,000 or more) using as strong of a decryption key as you want, and Krux can save the encrypted seed on a micro SD card (I don't) or as an encrypted QR code (yes!).  However you save it, you'll need your decryption key to decrypt it.
...
I find Krux's purpose interesting. I wonder if it's possible to decrypt the encrypted file or QR code of your seed outside of Krux? That is, via the command line, because the algorithm used is AES-CBC, which is already built into Linux...

Yup!  On the Krux github, they've posted a script for doing it, or I'm sure you could just write one (or edit theirs to suit your needs if you have something you're working on).  Krux doesn't use anything proprietary.  It's all open source.

And if you use BIP85, you can use the text from child seed phrases as passphrases or decryption keys, which means it's all deterministic and recoverable if lost.
Are you referring to using the BIP-85 child seeds generated by passphrase and using them as a second or third layer of additional protection? If not, I don't understand...

Yes, I'm referring to BIP85.

Let's say this is your parent seed and passphrase:

Quote
SEED: catalog outer turn nerve immense labor mail jungle session secret crime buffalo

PASSPHRASE: live monkey mask future portion powder

You could use that as a wallet, of course.  But let's say you use it as a parent seed instead, to generate child seeds to use for all kinds of things.

For example, using the above parent seed and passphrase, here's a pair of child seeds:

Quote
BIP85 index #2001

24 word seed phrase:
gallery ill gaze palm medal zero depart negative rent monkey life sugar arch trophy brisk eternal decorate milk author skate rigid south soup foam

12 word seed phrase:
spell hockey enroll runway blast avoid expect pyramid unusual goddess blind rapid

Why not use the 24 word seed phrase as the seed for a wallet, and use the text from the 12 word child seed as the passphrase for the wallet?

That's a 24 word seed phrase with a 12 word passphrase.  Uncrackable.  And both parts are backed up by a master key, which is the parent seed & passphrase.

And let's say you want to create an encrypted disk image, to secure some personal stuff, or some work documents.  Use a child seed from your parent seed as a decryption key:

Quote
BIP85 index #80201:

above lamp soldier ignore eternal recall amused debate vacuum front renew village

If you ever lose that passphrase / decryption key, you can get it back by using BIP85 with your parent seed & passphrase.

Obviously, this makes securing your parent seed and passphrase very important, but that goes without saying for any seed.

I think BIP85 is a mostly overlooked gem.  It's easy to look at it and think "Ooh, deterministic seeds.  Nice!"  But a seed phrase is also text, which means it can be used for much more than just a seed phrase.

Here's another example:  Let's say you have a device that, for whatever reason, only allows numbers to be used as a password.

No problem.  Here's BIP85 index #5050 for that parent, as a standard Seed QR (the words are represented as numbers instead of plaintext).

Quote
023913300541072314561984200001340339188405101019

Using a parent seed with BIP85 gives you a master backup for anything you could ever need a seed phrase or a strong passphrase for.

And, of course, everything needs to be documented for future reference so you'll know why you set everything up the way you did, and so you'll know how to get it all back if anything goes wrong, or if you just want to confirm something ("Did I make a mistake here?  Both 'act' and 'actor' work to form the same checksum.  Am I sure the correct word is 'act'?"  Go back to your parent to confirm it by regenerating the child with the same index number.  ("Yup.  It's just 'act'.  Good to know").

I especially like this for inheritance, because it creates a way for someone else, who gets the documentation, to rebuild everything manually in case anything goes wrong.  "Here's the seed.  Here's the passphrase.  And if there's a problem, here's a more complicated way to prove the seed and the passphrase are correct."

P.S.  Hopefully I didn't make any errors in my examples here.  I just quickly rattled this off to further explain it.  In real world use, when generating BIP85 child seeds, I like to doublecheck my work by using different devices that use different libraries.  I tend to use Krux and a Blockstream Jade, or SeedSigner and a Jade, to doublecheck.  I'm also a huge fan of testnet.