Skip to content

Implement Validation Process for Verifying Key Contract #299

@sifnoc

Description

@sifnoc

The user who wants to verify their proofs on the Summa contract, can access the verifying key contract registered within the Summa contract. However, there is currently no way to ensure that the bytes correctly represent polynomials, permutations, or fixed commitments. As a result, users have no choice but to trust that the proof generated from the publicly known circuit and its verifying keys is correct, without any means to independently verify the verifying key.

Objective: We need a validation process for the verifying key contract that includes commitments, key digest and others.

Feature Description:
This issue proposes implementing a validation process for the vk_digest from the registered verifying key contract in the Summa contract, allowing it to be compared with the vk_digest generated by the user.

  • The validation process should be based on the UnivariateGrandSum circuit known from the GitHub repo.
  • To initiate the circuit, the N_BYTES and N_CURRENCIES parameters are required, either by reading the verifying key contract or as provided by the prover.
  • The vk_digest is a hash of the entire text of parameters, which is initiated with the circuit and parameters. The hash process is detailed in this repository - halo2-solidity-verifier.
  • The implementation should prioritize UX, ensuring that the comparison process is straightforward and user-friendly.

Additional Context:

  • The verifying key contracts consist of multiple bytes in an assembly block, as shown below:

        constructor() {
            assembly {
                mstore(0x0000, 0x00996ed64113d5d86f42caab0f3d25466b0856015472de4bb809f168aabc2567) // vk_digest
                mstore(0x0020, 0x0000000000000000000000000000000000000000000000000000000000000011) // k
                mstore(0x0040, 0x30643640b9f82f90e83b698e5ea6179c7c05542e859533b48b9953a2f5360801) // n_inv
                mstore(0x0060, 0x304cd1e79cfa5b0f054e981a27ed7706e7ea6b06a7f266ef8db819c179c2c3ea) // omega
  • This issue arose while considering this related issue: Wrong verifying key contract permutation length can be considered valid by validateVKPermutationsLength yAudit/summa-solvency#10

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions