Documentation
¶
Index ¶
- Variables
- func Commit(x, r *big.Int, h *bn256.G2) (*bn256.G2, error)
- func CommitG1(x, r *big.Int, h *p256.P256) (*p256.P256, error)
- func Decompose(x *big.Int, u int64, l int64) ([]int64, error)
- func Hash(a []*bn256.GT, D *bn256.G2) (*big.Int, error)
- func HashSet(a *bn256.GT, D *bn256.G2) (*big.Int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( G1 = new(bn256.G1).ScalarBaseMult(new(big.Int).SetInt64(1)) G2 = new(bn256.G2).ScalarBaseMult(new(big.Int).SetInt64(1)) E = bn256.Pair(G1, G2) )
Constants that are going to be used frequently, then we just need to compute them once.
Functions ¶
func Commit ¶
Commit method corresponds to the Pedersen commitment scheme. Namely, given input message x, and randomness r, it outputs g^x.h^r.
func CommitG1 ¶
CommitG1 method corresponds to the Pedersen commitment scheme. Namely, given input message x, and randomness r, it outputs g^x.h^r.
func Decompose ¶
Decompose receives as input a bigint x and outputs an array of integers such that x = sum(xi.u^i), i.e. it returns the decomposition of x into base u.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.