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: stream cipher zk #384

Merged
merged 2 commits into from
Nov 18, 2023
Merged

feat: stream cipher zk #384

merged 2 commits into from
Nov 18, 2023

Conversation

sinui0
Copy link
Member

@sinui0 sinui0 commented Nov 7, 2023

This PR simplifies our stream cipher implementation quite a bit and adds ZK functionality to its public API. This is the first step needed to support #330 and it also provides the changes needed to bump mpz version to support #379

Changes

  • Modified AES-CTR circuit to only compute the encrypted counter block, without directly applying the input text.
  • Removed padding of the input text, this is no longer needed as we apply the keystream to the input text using a dynamically generated XOR circuit.
  • Added the prove_plaintext and verify_plaintext methods
  • General code clean up, refactoring out complexity

Copy link
Member

@th4s th4s left a comment

Choose a reason for hiding this comment

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

nice 👍

Copy link
Member

@themighty1 themighty1 left a comment

Choose a reason for hiding this comment

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

gw, ack

@sinui0 sinui0 merged commit 786195b into dev Nov 18, 2023
12 checks passed
@sinui0 sinui0 deleted the feature/stream-cipher-zk branch November 18, 2023 08:50
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.

3 participants