I just generated new Ethereum account with
geth account new
Your new account is locked with a password. Please give a password. Do not forget this password.
Password:
Repeat password:
Your new key was generated
Public address of the key: 0xE582f436A505EEe5E2D8F2F70752e876F51abC0C
Path of the secret key file: /Users/user/Library/Ethereum/keystore/...--e582f436a505eee5e2d8f2f70752e876f51abc0c
- You can share your public address with anyone. Others need it to interact with you.
- You must NEVER share the secret key with anyone! The key controls access to your funds!
- You must BACKUP your key file! Without the key, it's impossible to access account funds!
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!
Now what exactly here in this JSON is private key?
I have found https://github.com/ethereumjs/keythereum that say geth is using
key derivation functions (PBKDF2-SHA256 or scrypt), symmetric ciphers (AES-128-CTR or AES-128-CBC)
That is again more confusing, as private key should be long number
If private key is encrypted how to decrypt and see it?
{
"address": "e582f436a505eee5e2d8f2f70752e876f51abc0c",
"crypto": {
"cipher": "aes-128-ctr",
"ciphertext": "19f04d75a17df3f6310f934628358ebb137e4b64eb4e320e5df5991d7739e131",
"cipherparams": {
"iv": "b6f5905c11bda21b4fcd68dc1b6e0cb4"
},
"kdf": "scrypt",
"kdfparams": {
"dklen": 32,
"n": 262144,
"p": 1,
"r": 8,
"salt": "1c9005124e67c5cee8cc469b85274c8fde2bc204dcfc9262b49389172231c4d5"
},
"mac": "0ef27b22356a8cb01b5dfab025132b56033a5f2e6c55e21ffca8c5036e19f85f"
},
"id": "54741ac3-7f23-46f9-b2fd-d7358af5ec76",
"version": 3
}
More theory is in How are ethereum addresses generated?