SLIP39 CLI security?

I want to use the SLIP39 CLI to perform the following:

  1. Create a single share
  2. Take the words after the first 4 and before the last 3 as a master password
    for my password manager
  3. Use the master secret of the single share to create a multi share backup
    that I can store on multiple places, to recover my master password if
    neccessary with the CLI

Would it be safe to do this with the shamir-mnemonic CLI installed in Termux on
GrapheneOS?

I want to use the CLI and not my Trezor for this purpose because it would take
much longer with the hardware wallet while the master password is exposed to my
phone anyway.

No safer, or less safe, than entering the resulting passphrase on your PC.

The shamir-mnemonic CLI tool does not have any hardening against processes running on the same computer: side channels may exist, kernel will trivially see contents of the tool’s memory, a screenshot grabber can see the output on your terminal, etc.

So the general answer is, it’s as safe as your PC is.

Wholly unsuitable for cryptocurrency management, but given the kind of exposure you can expect from a password manager, it may be within your security parameters.

1 Like

Thank you for replying

Could any program on Linux or Android do one or would they need a special exploit?
I use GrapheneOS, so its probably unlikely that an app can screw me without some zero day exploit, or am I wrong?

Aren’t I screwed anyway if I have a malicious kernel?

This shouldn’t be a problem on Android or Linux with Wayland

Thank you,
Then I will use the CLI in Termux to create and back up a SLIP39 share as the master password for my main vault, and then store in the main vault the passwords for each device vault and for my 2FA app.

For side-channels you typically don’t need an “exploit”. The nastiest side-channels can steal data from separate VMs on the same hardware.

Good news is, often you need to repeat the same operation at least a couple times in order to steal enough bits to reconstruct the keys. And also side-channel attacks are highly specific to the exact software you are stealing from. I doubt anyone bothered to develop one specifically against the shamir-mnemonic CLI.

Still, just to be on the safe side, make sure your cryptographic libraries (openssl, python-cryptography) are up-to-date.

I mean, maybe. The distinction is, in a good hardened password manager, you get your memory cleaned up immediately, the data is kept encrypted, even if something (such as the kernel) is reading your memory space, it has to work for it to get at the keys at the right time. No such thing exists in shamir-mnemonic.

That said, as long as you type your passphrase into an input box, then yes, a malicious kernel can trivially catch it there.

2 Likes

So its always possible against none hardened applications?

The exact same operation or something related to the same secret?

1 Like

less “always possible”, more “always a risk”

could be either

1 Like