1
0
Fork 0
mirror of synced 2025-09-24 04:40:05 +00:00
ZoKrates/zokrates_stdlib/stdlib/ecc/edwardsNegate.zok
2022-04-07 16:04:40 +02:00

9 lines
248 B
Text

// 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];
}