Skip to content

Keys & Addresses

Kennedy Idialu edited this page May 9, 2018 · 3 revisions

Ownership of assets on the network is established through cryptographic keys, Ellcrys addresses and private keys. These digital keys are not stored on the network. They are stored by the end-users in files, flash storage, database and wallets. The keys can be created at anytime, without any interaction or access with the network or even the internet. A private key allows an end-user to claim ownership of assets and to authorize actions that affect these assets.

Private Key

A private key is a 256 bit random number picked at random and combined with elliptic curve multiplication to produce a public key. Anyone who owns a private key is assumed to be the owner of a resource on the network. This is true for all blockchains. The private key is used to create signatures that are required to spend ellies. We use the edwards25519 curve to generate a public key and Ed25519 signature scheme for creating and verifying signatures. A private key must be stored safely away from third-party at all times as revealing it may result in the loss of ellies and other assets. It must be backed up safely since if lost, it cannot be recovered and the ellies and assets controlled by it cannot be recovered and therefore lost forever.

You can generate a private key using the druid client.

$ druid address new -s 385636675
...
Private Key: wdAitkuXmLi5EBeRiBJH1vJXdPEkTKcAHut8392ZpjVuQX525VSkVJP5Y9GCZ9CbPdgk9vnTSsBBmtPyeAL1nsHi5h2SMi
...

The address command generates a private key which is encoded in base58 checksum format. It also generates an address and a public key. The resulting private key is 64 bytes before base58 encoding.

Public Key

The public key is generated from the private key using elliptic curve multiplication. Public keys are used in ellcrys to verify signatures authorizing transfer of ellies or other assets and the execution of a contract's function. An ellcrys public key is 32 bytes in size and encoded in base58 checksum for easy validation.

Address

An address is a hashed version of the public key used to receive ellies and other assets on ellcrys. To create an address, we encode the public key in hex format, hash the hex value using SHA256 and RIPEMD160 and finally encode it using base58 checksum format. Like bitcoin, address length is 33 - 34 characters long. The base58 check version is 93 which produces address beginning with the character e to help differentiate ellcrys addresses from bitcoin.

Clone this wiki locally