-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Body Parsing #53
Closed
Closed
Changes from 3 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
2ec4174
feat: email_auth template with body parsing
shreyas-londhe a9eb5b9
chore: bump zkemail-circuits to 6.1.5
shreyas-londhe 253a02c
feat: extracting command from body in body-parsing
shreyas-londhe 89f39f7
feat: email_auth body parsing circuit working with tests
shreyas-londhe 6f6a726
fix: minor test changes
shreyas-londhe 4de8d4d
chore: update dependencies
shreyas-londhe 8685d3a
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami 885b7a5
(wip) chore: pass github workflow
Bisht13 c88c574
Add a verifier contract
SoraSuegami 48605a6
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami 8a69a61
Update proving key url
SoraSuegami f5164a5
feat: add body parsing
Bisht13 cfa80b0
chore: update
Bisht13 f4dbfce
chore: separated body parsing tests
shreyas-londhe 7214d3b
fix: refactring in recipent_enabled test
shreyas-londhe eedd202
fix: minor
shreyas-londhe e6caddf
chore: update relayer
Bisht13 9ccd3b9
fix: updated command regex
shreyas-londhe e2ed105
chore: changed max_command_bytes to 605
shreyas-londhe a8f2ef0
Update verifier
SoraSuegami 05eaba9
Merge branch 'main' of https://github.com/zkemail/ether-email-auth in…
SoraSuegami 80bdfc7
Merge branch 'main' of https://github.com/zkemail/ether-email-auth in…
SoraSuegami 6b84605
feat: sha precompute test
shreyas-londhe 2587fc8
chore: update relayer utils version
Bisht13 54d1526
feat: command update + relayer changes
Bisht13 19b46df
Fix circuit name in core.py
SoraSuegami 05225ed
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami d192781
chore: update version
Bisht13 4fa904d
chore: update circuit test
Bisht13 3f62a9b
chore: update relayer-uitls dep
shreyas-londhe dca6793
Update verifier
SoraSuegami d8eb920
Change the max header/body sizes in the body-parsing circuits.
SoraSuegami 97094f9
Add test circuits for body parsing
SoraSuegami c5f4bb5
Update verifier
SoraSuegami 648720a
Fixing integration test
SoraSuegami 703ce4e
Update emails for integration tests
SoraSuegami 6edbe7a
Update yarn.lock
SoraSuegami b51d635
Fix scripts and email for integration test
SoraSuegami 0566f14
chore: update circuit test
Bisht13 fbd3844
Integration test worked
SoraSuegami 69963ef
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami d2f59da
fix: body parsing test
Bisht13 74c4557
feat: complete flow
Bisht13 cdf17ec
Replace subject with command.
SoraSuegami 802e284
Merge branch 'feat/body-parsing-circuit' of https://github.com/zkemai…
SoraSuegami 776fa59
Fix compile errors in relayer
SoraSuegami 16eaa85
Remove skipped_command_bytes
SoraSuegami 9885c6e
chore: refactor
Bisht13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pragma circom 2.1.6; | ||
|
||
include "./email_auth_template.circom"; | ||
|
||
component main = EmailAuthWithBodyParsing(121, 17, 1024, 1536, 0); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is a definition of
SelectSubArray
?I expect that it extracts a substring from
command_idx
tocommand_idx + command_len
, but it has an attack vector because a relayer can choose any substring in the email body.To prevent this, the circuit first needs to do a regex validation of
padded_body
for the regex<div id="zkemail">[^<>\r\n/]</div>
and gets a revealed string for[^<>\r\n/]
ascommand_reveal
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It implies that an input
command_len
is unnecessary.