_images/keywords.png

Addresses

Within Uplink, all values stored on the ledger are each referenced by a distinct, unique identified called an “address”. There are three values that make up the state of the Uplink ledger: Accounts, Assets, and Contracts. Each of these values needs to be assigned unique addresses such that when values on the ledger are referenced by address there is a guarantee that such a reference points to one value and one value only.

Address Derivation

Accounts, Assets, and Contracts all have unique address derivation schemes, outlined below.

Accounts

In Uplink, users have unique addresses that correspond to their identity. These addresses are derived as the SHA3-256 hashes of their public key point. With the key generation system, the number of possible private keys is \(2^{256}\) and given sufficient random generation, duplicate keys and addresses are computationally intractable to construct. This systems gives every user, and all possible future users, a universally unique address to interact and sign transactions with that can be held in secret. The derivation of an address follows:

A private private key is a single random number that when combined with the base point G of the curve produces a point which is used as the public key.

98296211651717299139762843134195246423141641269875149366667447906894933497213

The public key consists of an (x, y) point on the elliptic curve.

24743765458702092737859495507479160116323479469637210741369089466842052538073
64340202121781598379555822771472089499346994701940280771055750875585295372717

The address itself is derived by converting the two integers into a byte array by concatenating the byte representation of the x and y points and then repeatedly hashing the result to produce a single unique number.

The hashing function then is applied:

address(x,y) = sha256(sha256(ripemd160(sha256(str(x) + str(y)))))

Given the public key point above the resulting hash is the represented as a base58 encoded bytestring, which uniquely identifies the participant on the network.

HemEv9ukwoFSr11XYaKxdmpGVo2cPEbx8csqnD8NSn9gcZAGTtGg5JZQb68B

Assets

Assets are named quantities issued on the Uplink ledger by user accounts. Issuers can circulate asset supply to themselves, and holders of assets can issue transfers to other users on the network; thus, a unique identifier for assets is required. Asset addresses are derived from the base 58 encoding of the base 16 encoding of the SHA3-256 hash of the transaction that issued the creation of the asset.

base58( base16( sha3_256( <CreateAssetTransaction> ) ) )

Contracts

Contracts represent domain specific logic that supposes rules for updating the local state of the contract and/or the Uplink ledger; The logic relies on the current state of the contract itself as well as the current ledger state. These contracts can be created and revoked on the ledger, therefore, they also must be referenced by a unique address on the ledger. The derivation of addresses for contracts is also the base-58 encoding of the base-16 encoding of the SHA3-256 hash of the transaction that issued the creation.

base58( base16( sha3_256( <CreateContractTransaction> ) ) )

Base16 Encoding

Base16 encoding is a canonical encoding used to represent numbers or bytes in the context of computing environments. It follows naturally from the fact that bytes are 8 bits in length, such that the value of two bytes can be represented by a single base16 encoded character. The characters used to represent base16 digits are [0-9a-f] where [a,b,c,d,e,f] correspond to base 10 encodings of 10, 11, 12, 13, 14, 15]. It is common to represent bytestrings in their base16 encoding format because it is more succinct than the bitwise representation as well as base 10 representations of the data.

Base58 Encoding

Base58 is a group of binary-to-text encoding schemes used to represent large integers as alphanumeric text. It is similar to Base64 but has been modified to avoid both non-alphanumeric characters and letters which might look ambiguous when printed. It is therefore designed for human users who manually enter the data, copying from some visual source.

123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz