Ethereum key generation

Steps of key generation in ethereum

  1. The private key is a 256 bit binary string generated randomly in ethereum with a generator of sufficiently high entropy.
  2. Elliptic curve encryption is applied using scep256k1 curve to get public key from private key.
  3. The public key is hashed using keccak-256 hashing algorithm and the last 40 characters appended with a ‘0x’ becomes the wallet address.
  4. When a message (or a transaction) is entered, it is first hashed with keccak-256 and then signed with the private key generated at first step. This produces three parts v, r, s which are used while verifying the signature.
  5. At verification step, the public key is used with the parameters to verify that the signature produced was correct.
Try out this interactive key generation and verification to understand how things work at a very level.

Private Key: Not generated

Elliptic curve

Elliptic curve: y^2 = x^3 + 7 (secp256k1 curve)

Public Key: Not generated

Address: Not generated

Message:

Hashing algorithm: Keccak-256

Message hash:

Public key: Not generated

Signed message:
v = 0
r =
s =

Verification result: Not Verified