package tezos-plonk
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=c9007a234fbacaddbc652c139cac56db
sha512=b67825a9259c27ccba51a4cb98056985c93f74f5211d422ce8ee8c35cda748c22bd1e59b3a584a79f96c1be21a409a12ee4b705346e1319c6d8bf45e81029f93
doc/tezos-plonk.aggregation/Aggregation/Polynomial_protocol/Make_aggregation/index.html
Module Polynomial_protocol.Make_aggregationSource
Parameters
module PC : Polynomial_commitment.SSignature
include Plonk.Polynomial_protocol.S with module PC := PC
module Evaluations :
Plonk.Evaluations_map.Evaluations_sig
with type scalar := PC.Scalar.t
and type domain = PC.Polynomial.Domain.t
and type polynomial = PC.Polynomial.Polynomial.t
and type t = PC.Polynomial.Evaluations.tModule to operate with polynomials in FFT evaluations form.
The type of prover public parameters.
The type of verifier public parameters.
The type for prover identities: functions from a (string) map of polynomials in FFT evaluations form to a (string) map of evaluated identities (also polynomials in FFT evaluations form).
type verifier_identities =
PC.Scalar.t ->
PC.Scalar.t Plonk.SMap.t Plonk.SMap.t ->
PC.Scalar.t Plonk.SMap.tThe type for verifier identities: functions which map an evaluation point ξ an a PC.answer into a (string) map of evaluated identities.
type non_committed =
PC.Scalar.t ->
PC.Scalar.t Plonk.SMap.t Plonk.SMap.t ->
PC.Scalar.t Plonk.SMap.tA type to involve in the identities computations corresponding to (public) polynomials that have not been committed by the prover. It maps an evaluation point ξ and a PC.answer into a (string) map of evaluated (non-committed) polynomials.
The type for transcripts, used for applying the Fiat-Shamir heuristic
The type for proofs, containing a commitment to the polynomial T that asserts the satisfiability of the identities over the subset of interest, as well as a PC proof and a list of PC answers.
The type for evaluation points. Either X, GX, or a custom point, which must be specified by an evaluation point name paired with a function that computes it from ξ. For example:
Xcould be implemented asCustom ("x", Fun.id)GXcould be implemented asCustom ("gx", fun x -> Scalar.mul generator x).
val convert_eval_points :
generator:PC.Scalar.t ->
x:PC.Scalar.t ->
eval_point list ->
PC.Scalar.t Plonk.SMap.tconvert_eval_points gen x points maps the polynomial protocol points : eval_point list into scalars, by evaluating the underlying "composition" polynomial at x. The generator gen is used in case the eval_point equals GX, in which case the resulting scalar is x * gen.
get_answer answers p name extracts the evaluation of polynomial name at point p from the given answers.
A function to merge a list of prover identities into one.
A function to merge a list of verifier identities into one.
val compute_t :
n:int ->
alpha:PC.Scalar.t ->
nb_of_t_chunks:int ->
Evaluations.t Plonk.SMap.t ->
Evaluations.polynomial Plonk.SMap.tcompute_t ~n ~alpha evaluations returns a polynomial T splitted in chunks, where T(X) = (sum_i alpha^i evaluations[i]) / (X^n - 1) and the returned chunks { 'T_0' -> T0; 'T_1' -> T1; 'T_2' -> T2 } are such that T = T0 + X^n T1 + X^{2n} T2.
val setup :
setup_params:PC.Public_parameters.setup_params ->
srs:(Bls12_381_polynomial.Srs.t * Bls12_381_polynomial.Srs.t) ->
prover_public_parameters * verifier_public_parametersThe polynomial commitment setup function, requires a labeled argument of setup parameters for the underlying PC and a labeled argument containing the path location of a set of SRS files.
val prove :
prover_public_parameters ->
transcript ->
n:int ->
generator:PC.Scalar.t ->
secrets:
(PC.Polynomial.Polynomial.t Plonk.SMap.t * PC.Commitment.prover_aux) list ->
eval_points:eval_point list list ->
evaluations:Evaluations.t Plonk.SMap.t ->
identities:prover_identities ->
nb_of_t_chunks:int ->
proof * transcriptThe prover function. Takes as input the prover_public_parameters, an initial transcript (possibly including a context if this prove is used as a building block of a bigger protocol), the size n of subgroup H, the canonical generator of subgroup H, a list of secrets including polynomials that have supposedly been committed (and a verifier received such commitments) as well as prover auxiliary information generated during the committing process, a list of evaluation point lists specifying the evaluation points where each secret needs to be evaluated at, a map of the above-mentioned polynomials this time in FFT evaluations form, for efficient polynomial multiplication, and some prover_identities that are supposedly satisfied by the secret polynomials. Outputs a proof and an updated transcript.
val verify :
verifier_public_parameters ->
transcript ->
n:int ->
generator:PC.Scalar.t ->
commitments:PC.Commitment.t list ->
eval_points:eval_point list list ->
?non_committed:non_committed ->
identities:verifier_identities ->
proof ->
bool * transcriptThe verifier function. Takes as input the verifier_public_parameters, an initial transcript (that should coincide with the initial transcript used by prove), the size n of subgroup H, the canonical generator of subgroup H, a list of commitments to the secret polynomials by the prover, a list of evaluation points as in prove, some verifier_identities, and a proof. Outputs a bool value representing acceptance or rejection.
type prover_aux = {answers : PC.Scalar.t SMap.t SMap.t list;batch : PC.Scalar.t SMap.t list;alpha : PC.Scalar.t;x : PC.Scalar.t;r : PC.Scalar.t;cm_answers : PC.Scalar.t;
}val prove_super_aggregation :
prover_public_parameters ->
transcript ->
n:int ->
generator:PC.Scalar.t ->
secrets:(PC.Polynomial.Polynomial.t SMap.t * PC.Commitment.prover_aux) list ->
eval_points:eval_point list list ->
evaluations:Evaluations.t SMap.t ->
identities:prover_identities ->
nb_of_t_chunks:int ->
(proof * prover_aux) * transcriptval verify_super_aggregation :
verifier_public_parameters ->
transcript ->
n:int ->
generator:PC.Scalar.t ->
commitments:PC.Commitment.t list ->
eval_points:eval_point list list ->
s_list:PC.Scalar.t SMap.t list ->
cm_answers:PC.Scalar.t ->
proof ->
(bool * verifier_aux) * PC.transcript