Closed kobigurk closed 4 years ago
I didn't see this in the diff, but do you check somewhere that
index[i] = 0 or (index[p] + 1)
, wherep
corresponds to the last epoch message that had a non-zero index? I think not including this would mean you can prove non-linear chains, even going back in time.
This is where the change relevant to this happened: https://github.com/celo-org/celo-bls-snark-rs/pull/179/files#diff-680350cbb026168b5a7a9366fb90840fR150.
@psivesely any more comments? :slightly_smiling_face:
Description
In order to have the circuit have a maximum number of epochs, but still support proving a smaller number of epochs, we add the support of padding with dummy epochs.
Regular epochs have index > 1.
These epochs have the following properties:
We change the circuit logic to perform the following:
previous_epoch_index
,previous_public_keys
andprevious_maximum_non_signers
are updated only if the index is not zero.sig = G1, pk = G2, H(m) = G1
satisfye(H(m), pk) = e(sig, G2)
because it'se(G1, G2) = e(G1, G2)
.Tested
We add tests for proofs with dummy epochs.