mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
25 lines
611 B
Plaintext
25 lines
611 B
Plaintext
# The k parameter defining the number of rows used in our circuit (2^k)
|
|
k = 11;
|
|
field = "pallas";
|
|
|
|
# The constants we define for our circuit
|
|
constant "SecretCommitment" {
|
|
EcFixedPointBase NULLIFIER_K,
|
|
}
|
|
|
|
# The witness values we define in our circuit
|
|
witness "SecretCommitment" {
|
|
# Secret key used to derive the public key
|
|
Base secret,
|
|
}
|
|
|
|
# The definition of our circuit
|
|
circuit "SecretCommitment" {
|
|
# Derive the public key
|
|
pub = ec_mul_base(secret, NULLIFIER_K);
|
|
|
|
# Constrain the public key coordinates
|
|
constrain_instance(ec_get_x(pub));
|
|
constrain_instance(ec_get_y(pub));
|
|
}
|