solutions/zokrates_prover/.zokrates/stdlib/ecc/edwardsNegate.zok

10 lines
248 B
Plaintext
Raw Normal View History

2023-12-05 06:06:28 +00:00
// Negate a point on an Edwards curve
// Curve parameters are defined with the last argument
// Twisted Edwards Curves, BBJLP-2008, section 2 pg 2
def main(field[2] pt) -> field[2] {
field u = pt[0];
field v = pt[1];
return [-u, v];
}