-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
Thank you for this fantastic project!
I noticed that the TwitterVerifier template implemented in Circom might not properly validate whether index < header-length. For instance:
signal isFromIndexValid <== LessThan(log2Ceil(maxHeadersLength))([fromEmailIndex, emailHeaderLength]); |
In this case, if fromEmailIndex = 21888242871839275222246405745257275088548364400416034343698204186575808495614 and emailHeaderLength = 3, the circuit results in isFromIndexValid = 1.
To address this, we should validate the bit-length of both fromEmailIndex and emailHeaderLength using Num2Bits.
If this is acknowledged as a potential bug, I’d be happy to submit a PR with a fix.
Metadata
Metadata
Assignees
Labels
No labels