Homomorphic Scalar Multiplication for ECC Pedersen Commitments
Add support to the pedersen ECC Pedersen Commitments module for homomorphic "scalar" multiplication of sealed & revealed Pedersen Commitments.
- This implements a
multiply(multiplier: int) method and the associated __mul__(multiplier: int) "dunder" method on the SealedPedersenCommitment & RevealedPedersenCommitment classes, which returns another sealed (or revealed, resp.) Pedersen Commitment.
- These methods'
multiplier parameter accepts an integer in the range [0, q-1], where q := O(G): the order of the configured elliptic curve's sub-group <G> generated by the generator (base) point G.
- Therefore a multiplier of zero is valid, but this case must be handled specially to avoid producing the point-at-infinity as the homomorphic product (i.e., otherwise naive scalar multiplication produces
0 * C = O, where C is a Pedersen Commitment ECC point & O is the point-at-infinity unit element).
- Handling a zero multiplier involves essentially reblinding, by producing a new Pedersen Commitment to the value
0, which thereby generates a new random blinding factor.
Note: This scalar homomorphic multiplication feature can also be implemented for Vector Pedersen Commitments, and that extension will be handled by another issue.
Homomorphic Scalar Multiplication for ECC Pedersen Commitments
Add support to the
pedersenECC Pedersen Commitments module for homomorphic "scalar" multiplication of sealed & revealed Pedersen Commitments.multiply(multiplier: int)method and the associated__mul__(multiplier: int)"dunder" method on theSealedPedersenCommitment&RevealedPedersenCommitmentclasses, which returns another sealed (or revealed, resp.) Pedersen Commitment.multiplierparameter accepts an integer in the range [0, q-1], whereq := O(G): the order of the configured elliptic curve's sub-group<G>generated by the generator (base) pointG.0 * C = O, whereCis a Pedersen Commitment ECC point &Ois the point-at-infinity unit element).0, which thereby generates a new random blinding factor.Note: This scalar homomorphic multiplication feature can also be implemented for Vector Pedersen Commitments, and that extension will be handled by another issue.