verify.gno
0.44 Kb · 19 lines
1package poker
2
3import (
4 "crypto/modexp"
5
6 "gno.land/p/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/poker/cards"
7)
8
9// This file is the only one importing crypto/modexp. For networks without it,
10// replace it with verify_nomodexp.gno.txt (renamed to verify.gno).
11
12const challengesEnabled = true
13
14var primeP = cards.P()
15
16// powModP returns base^exp mod P as 256 bytes.
17func powModP(base, exp []byte) []byte {
18 return modexp.ModExp(base, exp, primeP)
19}