1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00
ZoKrates/zokrates_stdlib/stdlib/ecc/edwardsNegate.code
2019-03-15 18:04:57 +01:00

10 lines
No EOL
312 B
Text

import "ecc/babyjubjubParams.code" as context
// Function negates a given edwards point.
// Curve parameters are defined with the last argument
// Twisted Edwards Curves, BBJLP-2008, section 2 pg 2
def main(field[2] pt, field[10] context) -> (field[2]):
field u = pt[0]
field v = pt[1]
return [0-u, v]