# Cryptography and Address format

# Hashing Algorithm

The hashing algorithm used in Zarb is Blake2b. Blake2 (opens new window) is considered to be a very fast cryptographic hash function. Example:

Message: "zarb"
Hash256: 12b38977f2d67f06f0c0cd54aaf7324cf4fee184398ea33d295e8d1543c2ee1a

# Cryptographic Signature Scheme

Zarb is using BLS (opens new window) (Boneh–Lynn–Shacham) threshold signature for cryptographic signing and verification. In Zarb blockchain, we are using Herumi (opens new window), an implementation of BLS threshold signature.

# Example

Private Key: (32 bytes)

Public key: (96 bytes)

Signature: (48 bytes)


# Signature aggregation

One of the advantages of BLS signatures is signature aggregation. BLS individual signatures can be combined into a single aggregate signature so that the overall size does not grow beyond 1 signature.

# Address conversion

Address in Zarb is 160-bit hash of the public key hash.(RIPEMD-160 after Blake2b):

AddressBytes = Hash160(Hash256(PublicKey))

The result will convert from a byte string into a bech32 [1] string.

# Example:

Public key (96 bytes):

Address: (20 bytes)

Address in bech32:

# Treasury address

Treasury address in Zarb is defined as seen below:

TreasuryAddress: 0000000000000000000000000000000000000000

  1. Base32 address format (opens new window) ↩︎