A keystore file is an encrypted file that contains a wallet's private key. The private key is encrypted with a password chosen by the user, adding a layer of security beyond the raw private key itself.
How It Works
When you create a keystore file, your private key is encrypted using a symmetric encryption algorithm (typically AES-128-CTR) with a key derived from your password. To access your wallet, you need both the keystore file and the password used to encrypt it.
Format
Keystore files are typically in JSON format and contain the encrypted private key, the encryption parameters (cipher, key derivation function), and metadata. Ethereum wallets commonly use the UTC/JSON keystore format.
Security Considerations
Password Strength: The security of a keystore file depends entirely on the strength of the encryption password. Use a strong, unique password.
Backup: Keep copies of the keystore file in secure locations. If you lose both the file and your seed phrase, your funds are unrecoverable.
Migration: Most modern wallets have moved to seed phrase-based recovery, but keystore files are still used in some Ethereum wallets and for validator key management.