zkemail / zk-email-verify

Verify any text in any sent or received email, cryptographically and via only trusting the sending mailserver.
https://prove.email
MIT License
361 stars 77 forks source link

Feat/fix select regex reveal #214

Closed SoraSuegami closed 2 months ago

SoraSuegami commented 2 months ago

Description

This PR has the following three updates.

  1. Fix the SelectRegexReveal template in circuits/utils/regex.circom to constrain that the given startIndex is less than maxArrayLen.
  2. Add a note about an assumption that there should be only one consecutive sequence of non-zero bytes in in given to the SelectRegexReveal template.
  3. Add new tests for the SelectRegexReveal template to circuits/tests/select-regex-reveal.test.ts.

Type of Change

Please delete options that are not relevant.

Checklist:

SoraSuegami commented 2 months ago

Thank you for your review!