Blockchain & Cryptocurrency Glossary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • search-icon Clear Definitions
  • search-icon Practical
  • search-icon Technical
  • search-icon Related Terms

JSON Keystore

2 min read
Pronunciation
[jay-son kee-stor]
Analogy
Think of a JSON keystore as a secure digital envelope with clear instructions written on the outside. The valuable content (your private key) is sealed inside with a special lock (encryption), and the envelope itself has printed instructions (the JSON structure) that tell compatible software exactly how the lock works and what steps to follow to open it with your password—but without ever revealing what's inside to anyone who doesn't have the password.
Definition
A standardized file format that uses JavaScript Object Notation (JSON) to store an encrypted cryptocurrency private key along with the parameters needed for decryption. JSON keystores are specifically structured text files that contain the encrypted key material, cryptographic parameters, and metadata formatted in a way that's both human-readable and machine-parsable.
Key Points Intro
JSON keystores provide a standardized approach to private key encryption across different blockchain implementations.
Key Points

Structured format: Uses JSON to organize encryption parameters, making it compatible across different wallet applications and platforms.

Metadata inclusion: Contains information about the encryption method, key derivation parameters, and address information without revealing the private key.

Versioning support: Includes version identifiers that allow wallet software to support multiple encryption standards and upgrades over time.

Self-contained: Includes all information necessary for decryption except the user's password, making it a complete backup solution.

Example
When Michael created an Ethereum wallet using MetaMask, he exported his account as a JSON keystore file for backup. The file contained his encrypted private key along with the cryptographic parameters needed for decryption. Later, when he needed to access his wallet from a different application, he was able to import this standard JSON file and access his account by providing his password.
Technical Deep Dive
The Ethereum JSON keystore format (often called Web3 Secret Storage Definition) is one of the most widely used implementations. It typically includes fields such as: 'crypto' (containing algorithm, ciphertext, cipher parameters, KDF type, KDF parameters), 'id' (a random UUID), 'version', and 'address' (the public address corresponding to the private key). The ciphertext is usually created using AES-128-CTR encryption of the private key. The encryption key is derived from the user's password using a key derivation function like PBKDF2 or scrypt, with parameters like dklen (derived key length), salt (a random value), and n/r/p (work factors) specified in the file. A MAC (Message Authentication Code) is often included to verify the integrity of the decryption process and to confirm the correct password was used.
Security Warning
Never share your JSON keystore file and password together, as this combination provides complete access to your cryptocurrency. When using a keystore file, ensure you're importing it into legitimate, secure wallet software by verifying application signatures and using official sources. Be aware that malware can target JSON keystore files specifically, so avoid importing them on potentially compromised devices.
Caveat
While JSON keystores are designed to be secure containers for private keys, their security is fundamentally limited by the strength of the user's password and the implementation of the encryption parameters. If encryption parameters are set too weakly (e.g., too few iterations in the key derivation function), the keystore may be vulnerable to brute force attacks despite using strong algorithms. Additionally, the human-readable nature of JSON makes these files more identifiable as cryptocurrency wallets compared to binary formats.

JSON Keystore - Related Articles

No related articles for this term.