Skip to content
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: Circuit for Removing the Quoted Printable Encoding Newlines in Email Body #202

Merged
merged 11 commits into from
Jul 30, 2024

Conversation

shreyas-londhe
Copy link
Member

@shreyas-londhe shreyas-londhe commented Jul 11, 2024

Description

This PR adds a helper circuit which proves the removal of soft line breaks introduced in Quoted Printable Encoding. Aims to resolve #187. Note this does not undo all character encodings, just newlines.

Type of Change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist:

  • I have discussed with the team prior to submitting this PR
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

packages/circuits/helpers/remove-soft-line-breaks.circom Outdated Show resolved Hide resolved
packages/circuits/helpers/remove-soft-line-breaks.circom Outdated Show resolved Hide resolved
packages/circuits/helpers/remove-soft-line-breaks.circom Outdated Show resolved Hide resolved
packages/circuits/helpers/remove-soft-line-breaks.circom Outdated Show resolved Hide resolved
sum_enc[i] <== sum_enc[i - 1] + r_enc[i] * processed[i];
}

// Calculate rlc for decoded
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking of we need to verify the k characters it got replaced by were zero? Tho I think the random computation should cover but but not sure

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the RLC takes care of that

@Divide-By-0
Copy link
Member

Core circuit looks good to me. Can you make it an argument in the main EmailVerifier component arguments and if on, then apply it to the body string? Also, have you tested it on real emails at all? I'm not convinced they all use \r.

@Divide-By-0 Divide-By-0 merged commit 0bc2538 into main Jul 30, 2024
5 checks passed
@Divide-By-0 Divide-By-0 changed the title Feat: Circuit for Removing the Quoted Printable Encoding in Email Body Feat: Circuit for Removing the Quoted Printable Encoding Newlines in Email Body Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make bodyparsing hashing work for more mail clients
3 participants