package octez-plonk
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=7062cd57addd452852598a2214ade393130efa087b99068d53713bdf912b3680
sha512=08e4091144a03ce3c107fb91a66501bd8b65ca3278917c455a2eaac6df3e108ade63f6ab8340a4bb152d60f404326e464d0ec95d26cafe8e82f870465d24a5fc
doc/octez-plonk.distribution/Plonk_for_distribution/Polynomial_protocol/Make/index.html
Module Polynomial_protocol.Make
Source
Parameters
module PC : Kzg.PC_for_distribution_sig
Signature
module PC = PC
include Plonk.Polynomial_protocol.S with module PC := PC
The type of prover public parameters.
The type of verifier public parameters.
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.
val setup :
setup_params:PC.Public_parameters.setup_params ->
srs:
(Octez_bls12_381_polynomial.Bls12_381_polynomial.Srs.t
* Octez_bls12_381_polynomial.Bls12_381_polynomial.Srs.t) ->
prover_public_parameters * verifier_public_parameters
The 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:Plonk.Bls.Scalar.t ->
secrets:(Plonk.Bls.Poly.t Plonk.SMap.t * PC.Commitment.prover_aux) list ->
eval_points:Plonk.Identities.eval_point list list ->
evaluations:Plonk.Bls.Evaluations.t Plonk.SMap.t ->
identities:Plonk.Identities.prover_identities ->
nb_of_t_chunks:int ->
proof * transcript
The 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:Plonk.Bls.Scalar.t ->
commitments:PC.Commitment.t list ->
eval_points:Plonk.Identities.eval_point list list ->
identities:Plonk.Identities.verifier_identities ->
proof ->
bool * transcript
The 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.
val compute_t :
n:int ->
alpha:Plonk.Bls.Scalar.t ->
nb_of_t_chunks:int ->
Plonk.Bls.Evaluations.t Plonk.SMap.t ->
Plonk.Bls.Evaluations.polynomial Plonk.SMap.t
compute_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
.