Skip to main content

Key Management

A cryptocurrency wallet's mnemonic phrase, also known as a seed phrase, is a collection of words that can be used to retrieve or restore access to the wallet if the original access is lost. It serves as a safety net to ensure that digital assets can still be accessed in case the primary wallet is lost or forgotten.

Typically, a mnemonic phrase is generated when a wallet is created and consists of 12-24 words. It is important to keep this phrase secure and private, as it can be used to regain access to the wallet.

It is essential to store your mnemonic phrases in a secure location, such as a physical paper or a secure digital file. Additionally, it is recommended to create multiple copies and store them in different places, so that you can access your funds in case of any emergency.

danger

Mnemonic Phrase vs Private Key: A seed phrase is a string of words used to create a private key. It is also referred to as a recovery phrase or backup phrase. It is used to recover or restore access to a cryptocurrency wallet in the event that the original private key is compromised or lost, and commonly consists of a set of 12 or 24 words. Multiple private keys that can be used to access various bitcoin addresses and balances can be created using a seed phrase.

A long string of characters known as a private key, on the other hand, is used to sign transactions and grant access to your cryptocurrency holdings. The private key, which is specific to each cryptocurrency address, is produced from the seed phrase. In order to verify that a transaction is authentic and has been approved by the rightful owner of the funds, it is used to establish digital signatures for transactions.

In conclusion, it is crucial to protect the confidentiality of your private keys and mnemonic phrase. Your connected accounts may be at risk if your private keys are stolen. However, since your mnemonic phrase is used to generate numerous private keys, losing it can have even worse repercussions. To prevent any catastrophic loss, it is essential to take the necessary precautions to secure both your private keys and mnemonic phrase.

Mnemonics from the Humans CLI

note

Please make sure you have humansd installed before using the CLI. You may find installation instructions here.

You'll get a mnemonic phrase when you generate a new key that you can use to retrieve it later. Support the mnemonic phrase with:

humansd keys add dev0
{
"name": "dev0",
"type": "local",
"address": "human19ugs5jrk79srm2x0n75ulh0twh8lw3g495ceyj",
"pubkey": '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"GhMn7e3iW6LpHfF4ViAsU/rBGx7Yr7U4+XKV2MN4n+Dp"}',
"mnemonic": ""
}

**Important** write this mnemonic phrase in a safe place.
It is the only way to recover your account if you ever forget your password.

# <24 word mnemonic phrase>

To restore the key:

$ humansd keys add dev0-restored --recover
> Enter your bip39 mnemonic
tree order volcano lizard useful verb fossil ill swift seven gentle rebel guide mad book outside motion crater amateur calm reunion final venture element
{
"name": "dev0-restored",
"type": "local",
"address": "human19ugs5jrk79srm2x0n75ulh0twh8lw3g495ceyj",
"pubkey": '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"GhMn7e3iW6LpHfF4ViAsU/rBGx7Yr7U4+XKV2MN4n+Dp"}'
}

Export Key

Tendermint-Formatted Private Keys

Without the mnemonic, perform the following steps to backup this kind of key:

humansd keys export dev0
Enter passphrase to decrypt your key:
Enter passphrase to encrypt the exported key:
-----BEGIN TENDERMINT PRIVATE KEY-----
kdf: bcrypt
salt: 14559BB13D881A86E0F4D3872B8B2C82
type: secp256k1

# <Tendermint private key>
-----END TENDERMINT PRIVATE KEY-----

$ echo "\
-----BEGIN TENDERMINT PRIVATE KEY-----
kdf: bcrypt
salt: 14559BB13D881A86E0F4D3872B8B2C82
type: secp256k1

# <Tendermint private key>
-----END TENDERMINT PRIVATE KEY-----" > dev0.export

Ethereum-Formatted Private Keys

tip

Note: These keys are compatible with MetaMask.

Do the following to backup this kind of key without the mnemonic:

humansd keys unsafe-export-eth-key dev0 > dev0.export
**WARNING** this is an unsafe way to export your unencrypted private key, are you sure? [y/N]: y
Enter keyring passphrase:

Import Key

Tendermint-Formatted Private Keys

$ humansd keys import dev0-imported ./dev0.export
Enter passphrase to decrypt your key:

Ethereum-Formatted Private Keys

$ humansd keys unsafe-import-eth-key dev0-imported ./dev0.export
Enter passphrase to encrypt your key:

Verification

Use the following command to confirm that your key has been recovered:

$ humansd keys list
[
{
"name": "dev0-imported",
"type": "local",
"address": "human19ugs5jrk79srm2x0n75ulh0twh8lw3g495ceyj",
"pubkey": '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"GhMn7e3iW6LpHfF4ViAsU/rBGx7Yr7U4+XKV2MN4n+Dp"}'
},
{
"name": "dev0-restored",
"type": "local",
"address": "human19ugs5jrk79srm2x0n75ulh0twh8lw3g495ceyj",
"pubkey": '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"GhMn7e3iW6LpHfF4ViAsU/rBGx7Yr7U4+XKV2MN4n+Dp"}'
},
{
"name": "dev0",
"type": "local",
"address": "human19ugs5jrk79srm2x0n75ulh0twh8lw3g495ceyj",
"pubkey": '{"@type":"/ethermint.crypto.v1.ethsecp256k1.PubKey","key":"GhMn7e3iW6LpHfF4ViAsU/rBGx7Yr7U4+XKV2MN4n+Dp"}'
}
]