types/registry
Types
Alpha is the generator and beta is the public value. The pair is formed from the relationship g^x = u, where g is the generator and u is the public value. The value x is a secret integer used to create the public value from the generator.
Constructors
-
Register { generator: ByteArray, public_value: ByteArray }
Functions
fiat_shamir_heuristic(
g_b: ByteArray,
g_r_b: ByteArray,
u_b: ByteArray,
b: ByteArray,
) -> ByteArray
A bytearray of a value for the challenge c. This process should act like a random oracle providing a large challenge value for the user. The inputs should be compressed g1 elements but they can also be compressed integers.
registry.fiat_shamir_heuristic(g_b, g_r_b, u_b, b)
A Schnorr proof to prove knowledge of the secret value x without revealing the value in the process. The proof uses, in multiplicative form, g^z = g^r * u^c, where z = r + c*x and u = g^x. This function uses the Fiat-Shamir heuristic for non-interactivity.
registry.prove(datum, z_b, g_r_b, bound)