How are XinFin XDC Network Addresses Generated?

ruslan wing
2 min readApr 22, 2022

XinFin XDC Network is an open-source, Turing complete, community-driven, distributed computing supporting blockchain project which is capable of storing and executing smart contracts. The XinFin core 108 masternode XDPoS algorithm governs the XinFin XDC network.

XinFin XDC Addresses

XinFin addresses are unique, 43 hex string characters, not case-sensitive, and are generated from the private key. They represent an account on the XinFin XDC blockchain. They are generated using the public key and private key of an account and through cryptographic hashes. Unlike a private key and derived public key, an account address is derived and not generated. A XinFin XDC address starts with the xdc prefix.

XinFin XDC Address Generation Basics:

XinFin XDC addresses are acquired by applying the Keccak-256 hash function to the public key, which is derived by applying ECDSA (Elliptic Curve Digital Signature Algorithm) to the randomly generated private key.

XinFin XDC Address Generation Process:

To generate a XinFin address, we must process the public key derived from the private key (128 characters) by applying the Keccak-256 hash to it. This results in a string that is 64 characters. Then, we take the last 40 characters of this public key (Keccak-256). Or, in other words, drop the first 24 characters. These 40 characters are the address to a XinFin XDC account. When prefixed with xdc it becomes 43 characters long, which is the commonly known XinFin address known to the public.

Explanation of Commonly Used Terms

Keccak-256

It is another name and variant of Secure Hash Algorithm Version 3 (SHA-3)، the principle cryptographic algorithm used by the XinFin XDC Network.

XinFin XDC Private Key

The private key is used to prove ownership of the account, it isn’t shared with anyone but kept secure. If the private key is compromised, the account access is effectively lost and funds can be transferred or converted by the person who has it.

XinFin Public Key

The public key can be shared with anyone without compromising security. It is used to derive the final XinFin XDC address. There is no other practical use of the public key, hence its mention isn’t found in documentation or usually displayed by XinFin clients.

XinFin XDC Address

A XinFin XDC address simply denotes a distinct unique account on the network. It is used as an identifier of the account which is sending or receiving the funds.

Hopefully, this gave you a better idea of how XinFin addresses are generated.

For support, let’s connect via XDC Network’s Social media communities on Slack, Twitter, and Discord.

--

--