Pedersen Hash Function

​HH is a Pedersen hash on two field elements, (a,b)(a, b) represented as 252252-bit integers, defined as follows:

H(a,b)=[P0+alowβ‹…P1+ahighβ‹…P2+blowβ‹…P3+bhighβ‹…P4]xH(a, b) = [P_0 + a_{\text{low}} \cdot P_1 + a_{\text{high}} \cdot P_2 + b_{\text{low}} \cdot P_3 + b_{\text{high}} \cdot P_4]_x

where alowa_{\text{low}}is the 248248low bits of aa , ahigha_{\text{high}}is the 44high bits of aa(and similarly for bb). [P]x[P]_x denotes the xx-coordinate of an elliptic-curve point PP. P0,P1,P2,P3,P4P_0, P_1, P_2, P_3, P_4 are constant points on the elliptic curve, derived from the decimal digits of Ο€\pi . The shift point P0P_0 was added for technical reasons to make sure the point at infinity on the elliptic curve does not appear during the computation. You can check the python and javascript reference implementation of this function.

Constant Points