mirror of
https://github.com/arnaucube/go-iden3-crypto.git
synced 2026-02-07 11:36:41 +01:00
Move constants and utils to package, apply small fixes
This commit is contained in:
26
constants/constants.go
Normal file
26
constants/constants.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package constants
|
||||
|
||||
import (
|
||||
"github.com/iden3/go-iden3-crypto/utils"
|
||||
"math/big"
|
||||
)
|
||||
|
||||
// Q is the order of the integer field (Zq) that fits inside the SNARK.
|
||||
var Q *big.Int
|
||||
|
||||
// Zero is 0.
|
||||
var Zero *big.Int
|
||||
|
||||
// One is 1.
|
||||
var One *big.Int
|
||||
|
||||
// MinusOne is -1.
|
||||
var MinusOne *big.Int
|
||||
|
||||
func init() {
|
||||
Zero = big.NewInt(0)
|
||||
One = big.NewInt(1)
|
||||
MinusOne = big.NewInt(-1)
|
||||
Q = utils.NewIntFromString(
|
||||
"21888242871839275222246405745257275088548364400416034343698204186575808495617")
|
||||
}
|
||||
Reference in New Issue
Block a user