-
Notifications
You must be signed in to change notification settings - Fork 15
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 7 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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, 640, 768, 256, 0, 0); | ||
shreyas-londhe marked this conversation as resolved.
Show resolved
Hide resolved
|
5 changes: 5 additions & 0 deletions
5
packages/circuits/src/email_auth_with_body_parsing_with_qp_encoding.circom
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, 640, 768, 256, 0, 1); | ||
shreyas-londhe marked this conversation as resolved.
Show resolved
Hide resolved
|
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,16 @@ | ||
{ | ||
"parts": [ | ||
{ | ||
"is_public": false, | ||
"regex_def": "<div dir=3D\"zkemail\">" | ||
}, | ||
{ | ||
"is_public": true, | ||
"regex_def": "[^<>/]+" | ||
}, | ||
{ | ||
"is_public": false, | ||
"regex_def": "</div>" | ||
} | ||
] | ||
} |
Oops, something went wrong.
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.
Can we fix the value of
is_qp_encoded
when operating the service?Or do we need to deploy two circuits and choose which circuit is used for each email?
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.
The second option, because the flag will be turned on for email with big commands (which have soft-line breaks) and should be turned off for small ones as the proving time improves.
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.
Do you think a malicious relayer can choose an inappropriate circuit, which can be an attack vector?
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.
If the reason to turn off the flag is only for efficiency, I think we can always use a circuit with soft-line breaks.
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.
I don't see any attack surface here as the regex just won't pass if you send a body with QP encoding but don't remove those in the circuit. We can do the swapping thing imo