Skip to main content
Version: 2.1.x

Epoch Key

Epoch keys are public, temporary, identifiers for users.

  • Unique epoch keys are generated for each user in each epoch.
  • They are the users' temporary personas, allowing anonymous interaction with others.
  • Epoch keys receive attestations to change user data.
  • An epoch key is computed by:
const field = 
attesterId +
(epoch << 160) +
(nonce << 208) +
(chainId << 216)
poseidon2([identitySecret, field])

The field looks like:

chain idnonceepochattester id
36 bits8 bits48 bits160 bits

where nonce can be any value between 0 and numEpochKeyNoncePerEpoch - 1, so that a user can have numEpochKeyNoncePerEpoch epoch keys per epoch.

  • Only a user knows their identitySecret, so only they know if they have received an attestation; others see an attestation given to a random value.
  • In the epoch key proof circuit, a user can prove that they own an epochKey, and so are able to receive and process attestations given to that epochKey.