N-RLN

The idea was proposed by Magamedrasul Ibragimov @curryrasul

Inputs:

Public

  • x
  • external_nullifier = hash(epoch, rln_identifier) // calculated outside the circuit

Private

  • identity_secret
  • path_elements[]
  • identity_path_index[]
Const

Actually not an inputs, but just a compile-time parameters:

  • n_levels : tree depth
  • limit : message limit

Calculations:

Identity commitment

identity_commitment = Hash(a_0)

The polynomial

A(X) = a_0 + a_1 * X + a_2 * X^2 + ... + a_n * X^n, where:

  • n = limit
  • a_0 = identity_secret
  • a_1 = hash(a_0, external_nullifier)
  • a_2 = hash(a_1)
  • .
  • .
  • a_k = hash(a_(k-1)) for 1 < k <= n

Internal nullifier

internal_nullifier = hash(a_n)

Outputs:

  • y
  • root
  • internal_nullifier

Conclusion

For the limit = 1 it's the same as 1st degree polynomial circuit, but gives us generalization.

Select a repo