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

VK summary #1391

Merged
merged 8 commits into from
Jan 10, 2019
Merged

VK summary #1391

merged 8 commits into from
Jan 10, 2019

Conversation

imeckler
Copy link
Member

@imeckler imeckler commented Jan 3, 2019

This PR adds verification key 'summaries' to the snarky verifiers.

Basically we construct a (non-deterministic, non-total) function summary : G1.t list * G2.t list * Fqk.Unitary.t list -> bool list which is injective (if it doesn't throw). By Fqk.Unitary.t I mean Fqk elements which are unitary. a + b beta : Fqk.t is unitary if (a + b beta)(a - b beta) = 1.

The summary works element-wise as follows:

  • G1 elements are mapped to their x coordinate and the parity of their y coordinate
  • G2 elements are mapped to their x coordinate and the parity of the 'real part' of their y coordinate, assuming the real part is non-zero
  • Fqk.t elements a + b beta are mapped to a and the parity of the 'real part' of b, assuming the real part is non-zero. b is determined up to sign by a by unitary-ness.

The point of this is for making hashing more efficient. summary shrinks the size of its input, so you can get away with hashing fewer bits.

in
elts @ signs

let summary_unchecked {Input.g1s; g2s; gts} =
Copy link
Member

Choose a reason for hiding this comment

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

Should we be consistent with style and do an inner module Checked here instead of a suffix _unchecked?

@imeckler imeckler merged commit 56496e6 into master Jan 10, 2019
@imeckler imeckler deleted the feature/vk-summary branch January 10, 2019 20:01
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.

2 participants