Ethereum Tutorials - Herong's Tutorial Examples - v1.06, by Herong Yang
Ethereum Account Keystore File
This section describes the keystore file that contains the private key of an Ethereum account.
An Ethereum account keystore file is JSON file, that stores the private key of an Ethereum account.
We can use the importRawKey() function on the "geth" JavaScript console to create keystore file from a private key:
> web3.personal.importRawKey( "8da4ef21b864d2cc526dbdb2a120bd2874c36c9d0a1fb7f8c63d7f7a8b41de8f", "password") "0x63fac9201494f0bd17b9892b9fae4d52fe3bd377"
Then view the keystore file content with the Windows "type" command:
C:\> type \herong\Ethereum\personal\keystore \UTC--2018-03-11T01-55-33.164612300Z--63fac9201494f0bd17b9892b9fae4d52fe3bd377 { "address": "63fac9201494f0bd17b9892b9fae4d52fe3bd377", "crypto": { "cipher": "aes-128-ctr", "ciphertext": "c38f1ae59809b13397737fc4e434fe3d8816c44fd35c2393222823ec1d5600e7", "cipherparams": { "iv": "019ea1f28718220e6157f58532a552e9" }, "kdf": "scrypt", "kdfparams": { "dklen": 32, "n": 262144, "p": 1, "r": 8, "salt": "100afc291aa2eb640f2ff20ca63a11e9ec6474fb59a195d615c5dfd614e5a541" }, "mac": "b418a27158f3735fd01c92e30ec397f10f3f9b3059792a6600a5b13e56408f74" }, "id": "bf502d65-3d11-461f-905d-6f532c626520", "version": 3 }
Note that the above keystore file has been reformatted.
As you can see, the private key has been encrypted by the password and stored to the "ciphertext" property. The public key is stored as the "address" property.
Please do not send any Ether to this public key, since the private key is published, anyone can use it to spend the Ether fund associated to this public key.
Table of Contents
Deprecated: Testnet - Ropsten Network
64-Bit "geth" for Private Ethereum Network
Private Network with Custom Genesis Block
Transferring Funds between Ether Accounts
MetaMask - Browser Based Ethereum Wallet
Getting Free Ether on Test Networks
Generate New Ethereum Accounts
Ethereum Public Key and Private Key Example
►Ethereum Account Keystore File
"geth" Commands for Ethereum Accounts