• About
  • Landing Page
  • Buy JNews
Newsletter
Impact Crypto News
Advertisement
  • Home
  • DeFi News
  • EVM News
    • Avalanche Network
    • Ethereum
    • Fantom Opera Chain
    • Harmony Chain
    • Huobi Eco Chain
    • Polkadot Chain
    • Polygon Chain
  • NFT News
  • Altcoin News
  • Crypto News
    • Crypto Regulation News
    • Bitcoin
    • Blockchain
    • Crypto Exchanges
    • Crypto Mining
    • Metaverse
    • Scam News
    • Web 3.0
No Result
View All Result
  • Home
  • DeFi News
  • EVM News
    • Avalanche Network
    • Ethereum
    • Fantom Opera Chain
    • Harmony Chain
    • Huobi Eco Chain
    • Polkadot Chain
    • Polygon Chain
  • NFT News
  • Altcoin News
  • Crypto News
    • Crypto Regulation News
    • Bitcoin
    • Blockchain
    • Crypto Exchanges
    • Crypto Mining
    • Metaverse
    • Scam News
    • Web 3.0
No Result
View All Result
Impact Crypto News
No Result
View All Result
Home Crypto News Altcoin News

Understanding & Generating Ethereum Addresses | by Isaac Coffie | The Capital | Dec, 2022

IMPACTCRYPTO by IMPACTCRYPTO
January 3, 2023
in Altcoin News
57 1
0
Understanding & Generating Ethereum Addresses | by Isaac Coffie | The Capital | Dec, 2022
189
SHARES
1.5k
VIEWS
Share on FacebookShare on Twitter


Anyone who has traded or invested in cryptocurrencies may know about wallet addresses. When you set up a Metamask or a Trust wallet account, an address is automatically generated. More so, users who keep their crypto tokens on centralised exchanges such as Binance, Coinbase, and KuCoin also get wallet addresses.

This article aims to uncover the behind-the-scenes of generating a wallet address.

From a layman’s perspective, an address is synonymous with your bank account or an email address. A crypto wallet address gives you a unique digital identity on the internet, specifically, a blockchain network. Your address enables you to sign transactions on the blockchain, receive funds, and send cryptocurrencies to other users.

Ethereum is the second largest blockchain platform by market capitalisation, closely behind Bitcoin, the first ever built blockchain-based cryptocurrency. Ethereum is equally one of the highest used platforms with many use cases and projects ranging from decentralised finance, metaverse, NFTs, etc. That said, it makes sense to study how Ethereum addresses are generated by DApps such as Metamask.

By design (from the yellow paper), Ethereum addresses are hexadecimal characters of 20 bytes or 40 characters long. They are typically prefixed with 0x, making them 42 characters long. An example address is 0x6B96f06B72D5A21d64b9D460534977799c332434. These 42 long characters are generated using public key cryptography, also known as asymmetric cryptography. In an asymmetric cryptographic scheme, two keys (a public and a private key) are needed to provide secure encryption. It turns out that your address is the output of your public key.

To generate an Ethereum address, you need

  1. A 256-bit (or 32-bytes) random private key. A private key can come in several formats: a binary string, a mnemonic, or a secret hexadecimal string.
  2. You then pass your 256-bit private key through an Elliptic Curve Digital Signature Algorithm (ECDSA), the same curve used in generating Bitcoin addresses. The ECDSA is a cryptographic algorithm that offers robust and secure encryption for communications.
  3. The output of the ECDSA (public key) is then hashed using a hashing function, specifically Keccak-256.
  4. Your Ethereum address is the last 20 bytes or 40 characters of the hashed output, prefixed with 0x.

We shall use one of the popular Ethereum crypto libraries. With this utility, we can perform cryptographic operations such as hashing, signing transactions, and generating public keys of different algorithms.

Let’s start by initializing our project folder with node.js and installing the library.

npm install ethereum-cryptography

Part 1: Generating Private Key

We need to generate a random 256-bit or 32-byte (8 bits equals 1 byte) hexadecimal string using a cryptographic random number generator (RNG) function. See the code snippet below.

Private key generation

Running the code (node index.js) gives you the below output — your private key.

Your private key

Part 2: Generating Public Key using ECDSA

In this part, we shall derive a public key for our private key using the secp256k1 curve. See the code below.

Public key generation

The output is a 64-byte integer.

Your public key

Part 3: Hashing the Public Key using Keccak-256

The last technical part is hashing the output of the secp256k1 curve using the famous keccak-256 hashing algorithm. And finally, we take the last 40 characters from the hash (digest)

Keccak-256 of the public key

The output value (0xdf86c04b91b0d2711158d89bf62387f6bba0fb8b) is our Ethereum address.

Final output (Ethereum address)

PS: I have successfully received 0.5 MATIC tokens on this address using the Polygon Test blockchain. See the screenshot below.

Conclusion

If you’ve made it this far, I hope you now understand how wallet providers (such as Metamask) and crypto exchanges (such as Binance) provision new addresses for every crypto user. With these simple steps, anyone can generate their Ethereum addresses as there are 2^ 256 possible addresses to be owned. It is crucial to generate a powerful private key that is impossible to brute-force or hack.



Source link

Related articles

Do Kwon learns his fate

Do Kwon learns his fate

December 12, 2025
SEC Opens Door to Tokenized Trading in US Markets

SEC Opens Door to Tokenized Trading in US Markets

December 12, 2025
Tags: addressesbitcoin newsCapitalCoffiecrypto analysiscrypto newsDecEthereumEthoz EdgeGeneratingIsaacLatest bitcoin newslatest crypto newsUnderstanding
Share76Tweet47

Related Posts

Do Kwon learns his fate

Do Kwon learns his fate

by IMPACTCRYPTO
December 12, 2025
0

Imagine your local grocery store releases a "store dollar." They tell everyone: "This thing is basically like cash - it's...

SEC Opens Door to Tokenized Trading in US Markets

SEC Opens Door to Tokenized Trading in US Markets

by IMPACTCRYPTO
December 12, 2025
0

Enjoyed this article? Share it with your friends! The US Securities and Exchange Commission (SEC) has taken a step toward...

Capital A, Standard Chartered Launch Stablecoin Pilot

Capital A, Standard Chartered Launch Stablecoin Pilot

by IMPACTCRYPTO
December 12, 2025
0

Enjoyed this article? Share it with your friends! Capital A, the parent company of AirAsia, and Standard Chartered Bank Malaysia...

Ripple and AMINA Connect Crypto to Traditional Banking

Ripple and AMINA Connect Crypto to Traditional Banking

by IMPACTCRYPTO
December 12, 2025
0

Enjoyed this article? Share it with your friends! Ripple Payments has reached an agreement with Swiss-based AMINA Bank to bring...

Binance Faces Backlash After Slow Freeze in Upbit Hack

Binance Faces Backlash After Slow Freeze in Upbit Hack

by IMPACTCRYPTO
December 12, 2025
0

Enjoyed this article? Share it with your friends! A recent cyberattack on Upbit $793.64M , a crypto exchange based in...

Load More

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Please enter CoinGecko Free Api Key to get this plugin works.
No Result
View All Result
  • Home
  • DeFi News
  • EVM News
    • Avalanche Network
    • Ethereum
    • Fantom Opera Chain
    • Harmony Chain
    • Huobi Eco Chain
    • Polkadot Chain
    • Polygon Chain
  • NFT News
  • Altcoin News
  • Crypto News
    • Crypto Regulation News
    • Bitcoin
    • Blockchain
    • Crypto Exchanges
    • Crypto Mining
    • Metaverse
    • Scam News
    • Web 3.0

© 2018 JNews by Jegtheme.