0

I created an BTC+ETH Wallet. I want to store an encrypted key so the next time I run the wallet, it will load with the data from keystore.

I'm working with the node crypto module. And as it is right now, I'm encrypting the seed generated by the mnemonic. But I don't like that. I' dont need to restore my wallet every time I open it.

So which key is to be encrypted and stored in the keystore?

Should I encrypt the private key of each address and create each one of them as I go. For example my keystore file could look like this.

{
id:0 {
       name: "My first address",
       encrypted: "6a4e...."
     }
}

So my guess would be that if I dont encrypt the seed I have to encrypt the account level private key. Because next time I run the wallet i need to be able to generate new adresses or key.

This is my understanding of it

from the seed I generate the root or master keypair

from that root key I create my tree

m / purpose' / coin_type' / account' / change / address_index

So should I save the root key? or go even lower in the three like the account level?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.