Accounts

LTO network supports multiple cryptographic algorithms for signatures and encryption.

Creating the address

The public network address is obtained from the (signature) public key and network id. The method is the same regardless of the key type.

  • Public key hash is the first 20 bytes of the SecureHash of the public key. SecureHash is the hash function sha256(Blake2b256(public_key)).

  • Checksum is the first 4 bytes of SecureHash of version, scheme, and hash bytes.

Because the address contains the network id, different networks result in a different address for the same seed / public key.

Example

For public key

GjSacB6a5DFNEHjDSmn724QsrRStKYzkahPH67wyrhAY

for the mainnet network (network id 'T'), this key results in the following address

3JmCa4jLVv7Yn2XkCnBUGsa7WNFVEMxAfWe

Derived identities

The blockchain address of derived identities is calculated from a public key, plus a secret. To calculate the public key hash, hmac is used, instead of a regular sha256 hash.

sha256_hmac(Blake2b256(public_key), secret)

Derived identity addresses are only used for decentralized identifiers (DIDs) and can't be used to sign transactions on the public blockchain.

Last updated