Sitemap
Press enter or click to view image in full size
Photo by Angela Merenkova on Unsplash

Member-only story

The Basics of Ethereum Keys, IDs and Signatures

3 min readApr 15, 2022

--

Node.js is a great advancement in creating back-end code. So, let’s use it to understand how Ethereum uses its keys and signs for messages. Overall, we use public-key encryption and which uses the elliptic curve that Satoshi Nakamoto selected for Bitcoin: secp256k1. With this, we have a random private key of 32 bytes (256 bits). If we run our local blockchain with Ganache, it will show us a number of account addresses:

Press enter or click to view image in full size

This is a public identifier for each user. Underneath this is a private key, and which should not be exposed to anyone:

Press enter or click to view image in full size

This private key is used to sign for transactions and has an associated public key. The conversion of the private address to a public address is to perform an ECDSA signature, and then take a hash of this with Keccak-256. The address is the first 40 bytes of this signature:

--

--

Prof Bill Buchanan OBE FRSE
Prof Bill Buchanan OBE FRSE

Written by Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.