Polynomial_protocol.Make_impl
Functor building an implementation of a polynomial protocol given a polynomial commitment scheme PC
.
module PC : Kzg.Interfaces.Polynomial_commitment
module PC = PC
type prover_public_parameters = PC.Public_parameters.prover
val prover_public_parameters_t : PC.Public_parameters.prover Repr.t
type verifier_public_parameters = PC.Public_parameters.verifier
val verifier_public_parameters_t : PC.Public_parameters.verifier Repr.t
val proof_t : proof Repr.t
val split_t :
int ->
Kzg.Bls.Poly.t ->
int ->
Kzg.Bls.Poly.t Plonk.Identities.SMap.t
split_t n t nb_of_t_chunks
splits t
polynomial in nb_of_t_chunks
polynomials of at most n
coefficients (and at most degree n
-1), except the last one that may have more coeffictients depending on t
’s degree
val compute_t :
n:int ->
alpha:Kzg.Bls.Scalar.t ->
nb_of_t_chunks:int ->
Identities.Evaluations.t Plonk.Identities.SMap.t ->
Kzg.Bls.Poly.t Plonk.Identities.SMap.t
val eval_and_batch_ids :
(Kzg.Bls.Scalar.t * 'a) ->
'b Plonk.Identities.SMap.t Plonk.Identities.SMap.t list ->
('c ->
'b Plonk.Identities.SMap.t Plonk.Identities.SMap.t ->
Kzg.Bls.Scalar.t Plonk.Identities.SMap.t) ->
Kzg.Bls.Scalar.t
val verify_t :
int ->
Kzg.Bls.Scalar.t ->
Kzg.Bls.Scalar.t ->
Kzg.Bls.Scalar.t list ->
bool
val setup :
setup_params:PC.Public_parameters.setup_params ->
srs:(Kzg.Bls.Srs.t * Kzg.Bls.Srs.t) ->
PC.Public_parameters.prover
* PC.Public_parameters.verifier
* Kzg.Utils.Transcript.t
val prove_aux :
PC.Public_parameters.prover ->
Kzg__Utils.Transcript.t ->
int ->
Kzg.Bls.Scalar.t ->
(Kzg.Bls.Poly.t Plonk.Identities.SMap.t * PC.Commitment.prover_aux) list ->
Identities.eval_point list list ->
'a ->
('b -> Identities.Evaluations.t Plonk.Identities.SMap.t) ->
int ->
(Kzg.Bls.Scalar.t * Kzg.Bls.Scalar.t * PC.answer list * PC.Commitment.t)
* Kzg.Bls.Poly.t Plonk.Identities.SMap.t list
* PC.Commitment.prover_aux list
* Kzg.Bls.Scalar.t Plonk.Identities.SMap.t list
* Kzg__Utils.Transcript.t
val prove :
PC.Public_parameters.prover ->
Kzg__Utils.Transcript.t ->
n:int ->
generator:Kzg.Bls.Scalar.t ->
secrets:
(Kzg.Bls.Poly.t Plonk.Identities.SMap.t * PC.Commitment.prover_aux) list ->
eval_points:Identities.eval_point list list ->
evaluations:'a ->
identities:('b -> Identities.Evaluations.t Plonk.Identities.SMap.t) ->
nb_of_t_chunks:int ->
proof * Kzg.Utils.Transcript.t
type pp_commit_to_t_r = Identities.Evaluations.t Plonk.Identities.SMap.t
val pp_commit_to_t_r_t :
Identities.Evaluations.t Plonk.Identities.SMap.t Repr.ty
val verify_aux :
Kzg__Utils.Transcript.t ->
Kzg.Bls.Scalar.t ->
PC.Commitment.t list ->
Identities.eval_point list list ->
proof ->
Kzg.Bls.Scalar.t
* Kzg.Bls.Scalar.t
* Kzg__Utils.Transcript.t
* PC.Commitment.t list
* Kzg.Bls.Scalar.t Plonk.Identities.SMap.t list
val verify :
PC.Public_parameters.verifier ->
Kzg__Utils.Transcript.t ->
n:int ->
generator:Kzg.Bls.Scalar.t ->
commitments:PC.Commitment.t list ->
eval_points:Identities.eval_point list list ->
identities:
(Kzg.Bls.Scalar.t ->
Kzg.Bls.Scalar.t Plonk.Identities.SMap.t Plonk.Identities.SMap.t ->
Kzg.Bls.Scalar.t Plonk.Identities.SMap.t) ->
proof ->
bool * Kzg.Utils.Transcript.t