Skip to main content

Key Generation

Each Bermuda account is controlled by a twofold key pair consisting of a spending and an encryption key pair. The former operates over Curve25519 while the later uses Grumpkin.

With SS being an arbitrary random seed, hash it to a valid BN254 scalar field element following the specification in IRTF RFC 9380:

s=HashToField(S)\quad s = \text{HashToField}(S)

The resulting BN254 scalar field element is the spending private key ss.

Rehash ss with Blake2s and clamp the result as per Curve25519 spec to obtain the encryption private key:

b=Blake2s(s)\quad b = \text{Blake2s}(s) a=Curve25519Clamp(b)\quad a = \text{Curve25519Clamp}(b)

Address

A Bermuda address consists of the concatenation of the Poseidon2 hash of the spending public key's xx and yy coordinates with the 32-byte public key of the encryption key pair:

Poseidon2(x,y)aG\quad \text{Poseidon2}(x, y) \parallel a \cdot G