zoo_square_roots_fp2.nim
1 # Constantine 2 # Copyright (c) 2018-2019 Status Research & Development GmbH 3 # Copyright (c) 2020-Present Mamy André-Ratsimbazafy 4 # Licensed and distributed under either of 5 # * MIT license (license terms in the root directory or at http://opensource.org/licenses/MIT). 6 # * Apache v2 license (license terms in the root directory or at http://www.apache.org/licenses/LICENSE-2.0). 7 # at your option. This file may not be copied, modified, or distributed except according to those terms. 8 9 import 10 std/macros, 11 ../config/curves, 12 ./bls12_381_sqrt_fp2, 13 ./bn254_nogami_sqrt_fp2, 14 ./bn254_snarks_sqrt_fp2 15 16 {.experimental: "dynamicBindSym".} 17 macro sqrt_fp2*(C: static Curve, value: untyped): untyped = 18 ## Get square_root constants 19 return bindSym($C & "_sqrt_fp2_" & $value)