Generator points for Pedersen hash.
(pedersen-generator i) → point
The scalars returned by pedersen-scalar
are used to multiply a sequence of BabyJubjub points,
and the resulting points are added up together.
This is described by equation (1) in [IS],
and by the double summation in [ES].
The points are denoted
We have precomputed the points in pedersen-hash-base-points.
The constant
We define this function to return one of the ten points when the index is below 10, or the zero point otherwise. The index will always be below 10, when used in the Semaphore.
Function:
(defun pedersen-generator (i) (declare (xargs :guard (natp i))) (let ((acl2::__function__ 'pedersen-generator)) (declare (ignorable acl2::__function__)) (b* ((i (nfix i))) (if (< i 10) (nth i *pedersen-base-points-for-semaphore*) (ecurve::twisted-edwards-zero)))))
Theorem:
(defthm baby-jubjub-pointp-of-pedersen-generator (b* ((point (pedersen-generator i))) (baby-jubjub-pointp point)) :rule-classes :rewrite)