Module pedersen

Module pedersen 

Source
Expand description

Pedersen hash on the Grumpkin curve.

Matches the Noir standard library’s pedersen_hash implementation:

generators = derive_generators("pedersen_hash", N, 0)
length_gen = derive_generators("pedersen_hash_length", 1, 0)[0]
H = sum(inputs[i] * generators[i]) + N * length_gen
result = H.x

Functions§

pedersen_hash
Compute the Pedersen hash of a slice of field elements.