Hi I'd like to generate a public/private keypair in node-js, and use the public key to encrypt message and the private key to decrypt the message. I need to encode user's secretKey because I use them for individually validation. And then I should decode it. I guess I can use public/private key encryption for this. Privatekey: Private key of the sender to sign the transaction and actually transfer the tokens; Notice. SignTransaction(tx) is removed because sendTransaction does it internally. Sending Procedures 1. Connect to network (testnet) Set Provider (Infura) Connect to Ropsten testnet.
∟Managing Ethereum Account
∟Ethereum Account Keystore File
This section describes the keystore file that contains the private key of an Ethereum account.
Generate Ethereum Private Key Javascript Free
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:
Then view the keystore file content with the Windows 'type' command:
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 'addres' 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
About This Book
Introduction of Ethereum
Ethereum Blockchain
Ethereum Mist Wallet
geth - Go Ethereum
Testnet - Ropsten network
Private Ethereum Network
64-Bit 'geth' for Private Ethereum Network
Private Network with Custom Genesis Block
Transferring Funds between Ether Accounts
MetaMask - Browser Based Ethereum Wallet
Generate Ethereum Private Key Javascript Download
►Managing Ethereum Account
What Is Ethereum Account
Generate New Ethereum Accounts
Ethereum Public Key and Private Key Example
►Ethereum Account Keystore File
'geth' Commands for Ethereum Accounts
ethereumfaucet.info - Mining Ether with Browser
References
Full Version in PDF/EPUB