There is no commentSelect some text and then click Comment, or simply add a comment to this page from below to start a discussion.
Verkle Cryptography API
Introduction
In this document, we describe the API that the cryptography layer needs to expose to the verkle trie layer. If you are creating a verkle trie implementation without the cryptography fully being implemented, you can mock the following APIs.
Elliptic Curve API
We define a Elliptic curve over a base field with a scalar field .
The group exposed by must have prime order. This is so that the verkle trie logic does not need to worry about subgroup attack vectors.
The group exposes two algorithm:
: This algorithm takes in a group element as input and returns a unique encoding of the group element as a byte string.
: This algorithm takes in a group element as input and maps the group element to the base field . The output is a unique encoding of the field element in as a byte string.
MapToFieldBytes returns a byte string so that the verkle trie library does not need to be concerned with , only is exposed through the API.
MultiPoint Scheme API
The multipoint scheme exposes three algorithms:
This algorithm takes in as input a list of tuples of the form and produces a proof that each .
is the commitment to the function and is produced by using the algorithm.
This algorithm takes as input a function and produces a commitment to that function .
This algorithm takes as input a proof , and a list of tuples . The output is true, if the proof can attest to the fact that, for all , commits to a function using and
Summary
The API surface that the cryptography layer exposes to the verkle trie layer is very small; five methods. We note that in some cases, and can uses the same function. The reason why we have two exposed algorithms is because is also expected to be zero knowledge friendly for when we provide a proof of execution for verkle trees, while does not need to be.