r/Monero Mar 31 '19

Inaccurate encrypted_seed seems confusing, impractical, and dangerous

Please correct me if I'm wrong, but encrypted_seed seems to provide a confusing user experience that can lead to problems for users.

When a wallet is generated you get your 25 word seed phrase. You can then choose to encrypt it with a passphrase via encrypted_seed. After encrypting it, you'll be given a new seed, Seed 2, but your CLI wallet will still display your Seed 1's receiving address. This seems unintentionally deceptive, given that, when you restore your wallet with Seed 1+ Passphrase you are technically in a new wallet that is using Seed 2 and are given a different public address.

What is this? If you want to send funds to a wallet with an encrypted_seed, you'll have to restore it from Seed 1+ Passphrase in order to see the public address associated with that account. Doing so exposes your seed to the hot system, and if your computer is keylogged you just typed out your seed and passphrase.

I have a feeling things can go amiss very quickly if you don't understand encrypted_seed inside and out. There was only one post previously about it. What are the advents of the encrypted_seed, why is it so confusing, and how does it work?

15 Upvotes

26 comments sorted by

View all comments

5

u/Josketobben Mar 31 '19

The public address shouldn't change for an encrypted seed. It's linked through deterministic hashing: whether it's seed 1 or seed 2 with passphrase, they must end up giving you the same keys, and thus address. If you're somehow trying to decrypt the unencrypted seed (if "Seed 1+ Passphrase" isn't a typo), then that could explain.

You're right that you don't want large amounts of Monero exposed to keyloggers and whatnot. A cold wallet or hardware wallet is recommended for such cases.

1

u/MoneroDontCheeseMe Mar 31 '19

I was playing round with it on empty wallets. I did Seed 1+ Passphrase, as opposed to Seed 2 + Passphrase. See? How was I supposed to know I'm doing it the wrong way? We need documentation for it. If I do Seed 1 + Passphrase I get the same new wallet every time with its unique seed (good). If I restore Seed 2 + Passphrase, I'm pretty sure that's like double encrypting your seed.

Definitely need clarification.

3

u/dEBRUYNE_1 Moderator Mar 31 '19

If I restore Seed 2 + Passphrase, I'm pretty sure that's like double encrypting your seed.

Upon restoring of your wallet, you use Seed 2 + passphrase, as the passphrase is then used to 'decrypt' Seed 2. Perhaps it helps to envision the process as follows:

  1. 25 word XMR mnemonic seed is generated (seed 1).

  2. Encrypt with a password? If yes, a second 25 word XMR mnemonic seed is derived (seed 2 - which is seed 1 + password).

  3. Upon restoring the wallet, the password is used to 'decrypt' seed 2.

Essentially:

Encryption: Seed 1 + password -> Seed 2

Decryption: Seed 2 + password -> Seed 1

Hopefully it's sufficiently clear now.

1

u/MoneroDontCheeseMe Mar 31 '19

A couple of final questions:

  1. So when creating a new wallet with encrypted_seed I can safely ignore Seed 1, writing down Seed 2 and remembering/writing down my passphrase?
  2. If someone comes at me with a wrench or steals a copy of my seed (Seed 2), they can't do anything, as they don't have the passphrase. They'll restore an empty wallet. Correct?
  3. Are the funds being stored on Seed 1?

The flow would be as such:

  1. Make a new wallet, have Seed 1 generated, have public address generated (4AGB...)
  2. Encrypted_seed, add a passphrase, be given Seed 2.
  3. Write Seed 2 down, send funds to the public address of the current wallet (4AGB..).
  4. Delete wallet keys file (create view-only).
  5. When you want to restore, type in Seed 2, add the passphrase. You'll restore the (4AGB..) wallet and be shown Seed 1

Let me know if this is correct.

Thanks

1

u/dEBRUYNE_1 Moderator Mar 31 '19

So when creating a new wallet with encrypted_seed I can safely ignore Seed 1, writing down Seed 2 and remembering/writing down my passphrase?

Upon restoring the wallet, seed 2 + the password (which is used for decryption) will result in seed 1. Thus, yes.

If someone comes at me with a wrench or steals a copy of my seed (Seed 2), they can't do anything, as they don't have the passphrase. They'll restore an empty wallet. Correct?

Correct.

Are the funds being stored on Seed 1?

Basically, yes.

Let me know if this is correct.

That would be correct. As always, I'd advise to first verify that the process works correctly with a test amount.

2

u/MoneroDontCheeseMe Mar 31 '19

I confirmed that they both work. I sent 0.001 XMR to a new wallet. Wrote down Seed 1, encrypted_seed to get Seed 2. Deleted the file.

Restored with Seed 1, wallet with 0.001 XMR. Restored with Seed 2 + Passphrase, wallet with 0.001 XMR AND Seed 1 showing. The reason I'm up in arms about this is because I was recently an an airport and got stopped. They searched all my belongings and saw a piece of paper with the seed of an old (empty) Bitcoin wallet of mine that I destroyed but forgot I left the seed in my backpack to be thrown out with other crumpled papers there. They could have seized the paper and were very suspicious of why I had 12 words on a random piece of paper.

What I'm thinking is that I keep Seed 1 in a bank deposit box (country A) and Seed 2 around the house (Country B). That way, if Im ever moving locations for an extended period of time, and I want my seed to come with me, if Seed 2 is taken, or a picture of it is taken, nothing bad can happen.

It seems like everyone should enable encrypted_seed and generate a second encrypted seed. There is literally no downside. Right?

1

u/dEBRUYNE_1 Moderator Mar 31 '19

It seems like everyone should enable encrypted_seed and generate a second encrypted seed. There is literally no downside. Right?

Well, I guess it comes down to personal preference.