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

Conversation

Projects
None yet
2 participants
@imeckler
Copy link
Contributor

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.

@bkase

bkase approved these changes Jan 4, 2019

in
elts @ signs

let summary_unchecked {Input.g1s; g2s; gts} =

This comment has been minimized.

@bkase

bkase Jan 4, 2019

Contributor

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

imeckler added some commits Jan 5, 2019

@imeckler imeckler merged commit 56496e6 into master Jan 10, 2019

8 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_public Your tests passed on CircleCI!
Details
ci/circleci: build_withsnark Your tests passed on CircleCI!
Details
ci/circleci: test-all_sig_integration_tests Your tests passed on CircleCI!
Details
ci/circleci: test-all_stake_integration_tests Your tests passed on CircleCI!
Details
ci/circleci: test-unit-test Your tests passed on CircleCI!
Details
ci/circleci: test-withsnark Your tests passed on CircleCI!
Details
ci/circleci: tracetool Your tests passed on CircleCI!
Details

@imeckler imeckler deleted the feature/vk-summary branch Jan 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment