13.06.2017 Views

Whitepaper - Ethereum Classic With Cover

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Ethereum</strong> <strong>Classic</strong> Documentation, Release 0.1<br />

1.3.2 Keyfiles<br />

Every account is defined by a pair of keys, a private key and public key. Accounts are indexed by their address<br />

which is derived from the public key by taking the last 20 bytes. Every private key/address pair is encoded in a<br />

keyfile. Keyfiles are JSON text files which you can open and view in any text editor. The critical component of the<br />

keyfile, your account’s private key, is always encrypted, and it is encrypted with the password you enter when you<br />

create the account. Keyfiles are found in the keystore subdirectory of your <strong>Ethereum</strong> node’s data directory.<br />

Make sure you backup your keyfiles regularly! See the section Backup and restore accounts for more information.<br />

Creating a key is tantamount to creating an account.<br />

• You don’t need to tell anybody else you’re doing it<br />

• You don’t need to synchronize with the blockchain<br />

• You don’t need to run a client<br />

• You don’t even need to be connected to the internet<br />

Of course your new account will not contain any Ether. But it’ll be yours and you can be certain that without your<br />

key and your password, nobody else can ever access it.<br />

It is safe to transfer the entire directory or any individual keyfile between <strong>Ethereum</strong> nodes.<br />

Warning: Note that in case you are adding keyfiles to your node from a different node, the order of accounts<br />

may change. So make sure you do not rely or change the index in your scripts or code snippets.<br />

1.3.3 Creating an account<br />

Warning: Remember your passwords and ‘backup your keyfiles ‘_. In<br />

order to send transactions from an account, including sending ether, you must have BOTH the keyfile and the<br />

password. Be absolutely sure to have a copy of your keyfile AND remember the password for that keyfile,<br />

and store them both as securely as possible. There are no escape routes here; lose the keyfile or forget your<br />

password and all your ether is gone. It is NOT possible to access your account without a password and there<br />

is no forgot my password option here. Do not forget it.<br />

Using geth account new<br />

Once you have the geth client installed, creating an account is merely a case of executing the geth account<br />

new command in a terminal.<br />

Note that you do not have to run the geth client or sync up with the blockchain to use the geth account<br />

command.<br />

$ geth account new<br />

Your new account is locked with a password. Please give a password. Do not forget this password.<br />

Passphrase:<br />

Repeat Passphrase:<br />

Address: {168bc315a2ee09042d83d7c5811b533620531f67}<br />

For non-interactive use you supply a plaintext password file as argument to the --password flag. The data in<br />

the file consists of the raw bytes of the password optionally followed by a single newline.<br />

$ geth --password /path/to/password account new<br />

1.3. Account Management 45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!