Crate wedpr_l_crypto_zkp_discrete_logarithm_proof[][src]

Zero-knowledge proof (ZKP) functions based on DLP construction.

Functions

prove_equality_relationship_proof

Proves two commitments satisfying an equality relationship, i.e. the values embedded in c1_point and c2_point satisfying c1_value = c2_value, where c1_point = c1_value * basepoint1, c2_point = c2_value * basepoint2. It returns a proof for the above equality relationship.

prove_product_relationship

Proves three commitments satisfying a product relationship, i.e. the values embedded in them satisfying c1_value * c2_value = c3_value. c3_value is not in the argument list, and will be directly computed from c1_value * c2_value. c?_blinding are random blinding values used in the commitments. The commitments (c?_valuevalue_basepoint+c?_blindingblinding_basepoint) are not in the argument list, as they are not directly used by the proof generation. It returns a proof for the above product relationship.

prove_sum_relationship

Proves three commitments satisfying a sum relationship, i.e. the values embedded in them satisfying c1_value + c2_value = c3_value. c3_value is not in the argument list, and will be directly computed from c1_value + c2_value. c?_blinding are random blinding values used in the commitments. The commitments (c?_valuevalue_basepoint+c?_blindingblinding_basepoint) are not in the argument list, as they are not directly used by the proof generation. It returns a proof for the above sum relationship.

verify_equality_relationship_proof

Verifies two commitments satisfying an equality relationship, i.e. the values embedded in c1_point, c2_point satisfying c1_value = c2_value, where c1_point = c1_value * basepoint1, c2_point = c2_value * basepoint2.

verify_equality_relationship_proof_in_batch

Verifies all commitment pairs satisfying equality relationships, where each commitment pair contains two commitment points, c1_point = c1_point_list[i], c2_point = c2_point_list[i], and the values embedded in c1_point, c2_point satisfying c1_value = c2_value.

verify_product_relationship

Verifies three commitments satisfying a product relationship, i.e. the values embedded in c1_point, c2_point, c3_point satisfying c1_value * c2_value = c3_value.

verify_product_relationship_in_batch

Verifies all commitment tuples satisfying product relationships, where each commitment tuple contains three commitment points, c1_point = c1_point_list[i], c2_point = c2_point_list[i], c3_point = c3_point_list[i], and the values embedded in c1_point, c2_point, c3_point satisfying c1_value * c2_value = c3_value.

verify_sum_relationship

Verifies three commitments satisfying a sum relationship, i.e. the values embedded in c1_point, c2_point, c3_point satisfying c1_value + c2_value = c3_value.

verify_sum_relationship_in_batch

Verifies all commitment tuples satisfying sum relationships, where each commitment tuple contains three commitment points, c1_point = c1_point_list[i], c2_point = c2_point_list[i], c3_point = c3_point_list[i], and the values embedded in c1_point, c2_point, c3_point satisfying c1_value + c2_value = c3_value.