Ethereum: Where does Metamask store the private key (when the account is only locked with a machine-specific password)?
Ethereum: where is the private key stored for evm-accounts?
When a user creates an Ethereum account and locks their private key using a machine-specific password, the private key is not stored on the user’s device. Instead, it is stored in a secure location within Ethereum’s blockchain, specifically on-chain. This is done to
Metamask: The Wallet Service for Ethereum
Metamask is a popular Ethereum Wallet Service Developed by Binance Labs. It allows users to interact with their Ethereum accounts from other blockchains, including EVM (Ethereum Virtual Machine) accounts. When using metamask to unlock an evm-account, the private key is stored securely on-chain and not transferred to the user’s device.
How Private Keys Are Stored in Metamask
When a user creates an evm-account with metamask, they can recover their account by generating a new Mnemonic The Private Keys of the Evm-Account are stored within Ethereum’s blockchain in a special database called the “Ethereum Mainnet”. This database is encrypted using a cryptographic algorithm, such as argon2 or pbkdf2.
The private keys are not ciphered before being written to storage; instead, they are hashed and salted with a random value. The Mnemonic phrase used to generate it.
Security Features of Metamask’s Private Key Storage
The security features of Metamask’s private key storage are designed to prevent unauthorized access and compromise. Some of these features include:
- Encryption
:
- Hashing : the private keys are hashed and salted with a random value before being written to storage.
.
- Mnemonic phrase storage
: metamask stores the mnemonic phrase
Conclusion
The private key is stored by securely on-chain within Ethereum’s blockchain. The private keys are not ciphered before. This secure storage mechanism ensures that user data remains safe and secure.
References
- “Metamask Wallet” Documentation
- “Ethereum Mainnet Database” Documentation
- “Argon2-128” Cryptographic Algorithm Documentation
- “PBKDF2” Cryptographic Algorithm Documentation