Multilinear KZG Commitment

We choose a Multilinear KZG commitment scheme to commit to the user balance polynomials for the compatibility with Halo2 API (more on that later). In brief, a Multilinear KZG commitment is a single finite field element CC that uniquely represents a polynomial B(X)B(X).

It is impossible to reconstruct the polynomial from the commitment, so our requirement of user privacy is satisfied because it is impossible to infer any evaluations of the polynomial from the single-value commitment CC.

During the reveal (aka opening) phase, the committed value CC is used along with the claimed polynomial evaluation B(x)B(x) to provide a succinct proof π\pi verifying that the value B(x)B(x) is indeed an evaluation of a polynomial B(X)B(X) at point xx and corresponds to the original commitment CC. Therefore, KZG commitment allows the Custodian to individually provide the opening proofs πi\pi_i to each user to prove that the polynomial B(X)B(X) indeed evaluates to the user balance bib_i at the point xi=ix_i = ⟨i⟩, where ⟨i⟩ is the bit binary representation of i. Knowing C,B(i),π\langle C, B(⟨i⟩),\pi\rangle, the user is able to verify the opening.

Proof Of Inclusion

As described in the Multilinear KZG section, individual users would receive the KZG opening proofs C,B(i),πi\langle C, B(⟨i⟩),\pi_i\rangle at their specific point i⟨i⟩ and they would be able to check that

  • the opening evaluation is equal to their balance: B(i)=biB(⟨i⟩) = b^i;

  • the opening proof πi\pi_i corresponds to the public KZG commitment CC.

The caveat is that if two or more users have the same cryptocurrency balance value, a malicious Custodian could give them the same KZG proof because the user index ii is defined by the Custodian. We will use the following technique to mitigate this:

  • the Custodian has to additionally commit to another polynomial that evaluates to the hashes of user IDs at the specific user points: H(i)=hiH(⟨i⟩) = h_i;

  • the user ID should be known to the user (e.g, the email address used to register with the Custodian), so the user can check that the value hih_i is indeed the hash of their ID;

  • the Custodian then gives two KZG commitments and two opening proofs to the user - CB,B(i),πB\langle C_B, B(⟨i⟩),\pi_B\rangle proving the balance inclusion into the balances polynomial, and CH,H(i),πH\langle C_H, H(⟨i⟩),\pi_H\rangle proving the user ID hash inclusion into the ID hash polynomial.

Last updated