[−][src]Module wedpr_crypto::zkp
Zero-knowledge proof (ZKP) functions.
Functions
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. |
prove_value_range | Proves whether a value belongs to (0, 2^RANGE_SIZE_IN_BITS - 1], and create a commitment for the value. It returns: |
prove_value_range_in_batch | Proves whether all values in the list belongs to (0, 2^RANGE_SIZE_IN_BITS - 1], and create commitments for them with provided random blinding values and blinding basepoint. It returns: |
prove_value_range_with_blinding | Proves whether a value belongs to (0, 2^RANGE_SIZE_IN_BITS - 1], and create a commitment for the value with provided random blinding value. It returns: |
prove_value_range_with_blinding_and_blinding_basepoint | Proves whether a value belongs to (0, 2^RANGE_SIZE_IN_BITS - 1], and create a commitment for the value with provided random blinding value and blinding basepoint. It returns: |
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_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_value_range | Verifies whether a value embedded in the commentment belongs to (0, 2^RANGE_SIZE_IN_BITS - 1]. |
verify_value_range_in_batch | Verifies whether all values embedded in the commentment list belongs to (0, 2^RANGE_SIZE_IN_BITS - 1]. |
verify_value_range_with_blinding_basepoint | Verifies whether a value embedded in the commentment belongs to (0, 2^RANGE_SIZE_IN_BITS - 1], and use provided blinding basepoint. |