package tezos-plonk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Scalar = Bls12_381.Fr
module G1 = Bls12_381.G1
module G2 = Bls12_381.G2
module GT = Bls12_381.GT
module Pairing = Bls12_381.Pairing
module Fr_generation : sig ... end
module Poly = Polynomial.Polynomial
type prover_public_parameters = {
  1. length : int;
  2. srs2_s : G2.t array;
  3. srs2_t : G2.t array;
  4. g1_s : G1.t;
  5. g1_t : G1.t;
}
type verifier_public_parameters = {
  1. g1_s : G1.t;
  2. g1_t : G1.t;
}
val verifier_public_parameters_encoding : verifier_public_parameters Data_encoding.t
type data = G1.t
type commitment = {
  1. cmt_s : GT.t;
  2. cmt_t : GT.t;
  3. cmt_len : int;
}
val commitment_encoding : commitment Data_encoding.t
type randomness = Scalar.t
type packed = G1.t
val packed_encoding : Bls12_381.G1.t Data_encoding.encoding
type ipa_proof = {
  1. s_Ls : GT.t array;
  2. s_Rs : GT.t array;
  3. t_Ls : GT.t array;
  4. t_Rs : GT.t array;
  5. r_Ls : G1.t array;
  6. r_Rs : G1.t array;
  7. a0 : G1.t;
  8. s0 : G2.t;
  9. t0 : G2.t;
}
val ipa_proof_encoding : ipa_proof Data_encoding.t
val empty_ipa_proof : int -> ipa_proof
type kzg_proof = G2.t * G2.t
val kzg_proof_encoding : kzg_proof Data_encoding.t
type proof = ipa_proof * kzg_proof
val proof_encoding : proof Data_encoding.t
type transcript = Stdlib.Bytes.t
type setup_params = int
val powers : one:'a -> mul:('a -> 'b -> 'a) -> int -> 'b -> 'a array
val hash : transcript:bytes -> random:(?state:Stdlib.Random.State.t -> unit -> 'a) -> ?g1s:G1.t array list -> ?g2s:G2.t array list -> ?gts:GT.t array list -> ?scalars:Scalar.t array list -> unit -> 'a * bytes
val ip_pairing : Bls12_381.G1.t array -> Bls12_381.G2.t array -> Bls12_381.GT.t
val setup : ?state:Stdlib.Random.State.t -> int -> prover_public_parameters * verifier_public_parameters
val prv_import : int -> ((string * string) * (string * string)) -> prover_public_parameters
val import : int -> ((string * string) * (string * string)) -> prover_public_parameters * verifier_public_parameters
val get_setup_params : prover_public_parameters -> int
val public_parameters_to_bytes : prover_public_parameters -> Stdlib.Bytes.t
val commit : prover_public_parameters -> Bls12_381.G1.t array -> commitment
val commitment_cardinal : commitment -> int
val bytes_of_commitment : commitment -> bytes
val pack : G1.Scalar.t array -> G1.t array -> G1.t
val array_split_in_half : 'a array -> 'a array * 'a array
val array_padded_with_zero : 'a array -> int -> 'a -> 'a array
val prove_but_not_pack : prover_public_parameters -> bytes -> Scalar.t -> G1.t array -> G1.t -> (ipa_proof * (G2.t * G2.t)) * bytes
val prove_single : prover_public_parameters -> bytes -> Scalar.t -> G1.t array -> (G1.t * (ipa_proof * (G2.t * G2.t))) * bytes
val prove : prover_public_parameters -> bytes -> Scalar.t -> G1.t array list -> (G1.t list * (ipa_proof * (G2.t * G2.t))) * bytes
val verify_single : verifier_public_parameters -> bytes -> commitment -> Scalar.t -> (G1.t * (ipa_proof * (G2.t * G2.t))) -> bool * bytes
val verify : verifier_public_parameters -> bytes -> commitment list -> Scalar.t -> (G1.t list * (ipa_proof * (G2.t * G2.t))) -> bool * bytes
OCaml

Innovation. Community. Security.