Versions in this module Expand all Collapse all v0 v0.1.0 May 5, 2020 Changes in this version + func CheckPolicy(policy string, userattrsJson string) string + func Decode(x string) []byte + func Decrypt(ctJson string, userattrsJson string) string + func Encode(x []byte) string + func Encrypt(secret string, policy string, authpubsJson string) string + func ExtractAttrsFromPolicy(policy string) string + func ExtractAuthsFromPolicy(policy string) string + func ExtractPolicyFromCiphertext(ctJson string) string + func ExtractVarsFromUserAttrs(userattrsJson string) map[string]int + func GetCurve(curveStr string) string + func JsonObj2Str(x interface{}) string + func NewRandomAuth(orgJson string) string + func NewRandomOrg(lib string, curveJson string) string + func NewRandomSecret(orgJson string, seed string) string + func NewRandomUserkey(user string, attr string, authprvJson string) string + func RewritePolicy(policy string) string + func SelectUserAttrs(user string, policy string, userattrsJson string) string + func SolvePolicy(policy string, userattrsJson string) map[string]int + type AuthKeys struct + AuthPrv string + AuthPub string + type AuthPrv struct + Alpha string + Org string + Y string + func (authprv *AuthPrv) Decode() *AuthPrv + func (authprv *AuthPrv) Encode() *AuthPrv + type AuthPub struct + Ealpha string + G1y string + Org string + func (authpub *AuthPub) Decode() *AuthPub + func (authpub *AuthPub) Encode() *AuthPub + type AuthPubs struct + AuthPub map[string]string + type Ciphertext struct + C map[string][][]string + C0 string + Org string + Policy string + func (ct *Ciphertext) Decode() *Ciphertext + func (ct *Ciphertext) Encode() *Ciphertext + type Curve interface + Decode func() Curve + Div func(g1 Point, g2 Point) Point + Encode func() Curve + HashToGroup func(x string, group string) Point + HashToPow func(x string, g Point) Point + Inv func(g1 Point) Point + Mul func(g1 Point, g2 Point) Point + NewPointOn func(group string) Point + NewRandomExp func() *big.Int + NewRandomPointOn func(group string) Point + NewRandomSecret func(n int, zerosecret bool) []*big.Int + Pair func(g1 Point, g2 Point) Point + Pow func(g1 Point, e1 *big.Int) Point + Pow2 func(g1 Point, e1 *big.Int, g2 Point, e2 *big.Int) Point + Pow3 func(g1 Point, e1 *big.Int, g2 Point, e2 *big.Int, g3 Point, e3 *big.Int) Point + ProdPair func(g1 []Point, g2 []Point) Point + UnitOnGroup func(group string) Point + type Org struct + Curve string + E string + G1 string + G2 string + Lib string + func (org *Org) Decode() *Org + func (org *Org) Encode() *Org + type PbcCurve struct + Maxrndexp string + Params string + func (curve *PbcCurve) Decode() Curve + func (curve *PbcCurve) Div(g1 Point, g2 Point) Point + func (curve *PbcCurve) Encode() Curve + func (curve *PbcCurve) HashToGroup(x string, group string) Point + func (curve *PbcCurve) HashToPow(x string, g Point) Point + func (curve *PbcCurve) Inv(g1 Point) Point + func (curve *PbcCurve) Mul(g1 Point, g2 Point) Point + func (curve *PbcCurve) NewPointOn(group string) Point + func (curve *PbcCurve) NewRandomExp() *big.Int + func (curve *PbcCurve) NewRandomPointOn(group string) Point + func (curve *PbcCurve) NewRandomSecret(n int, zerosecret bool) []*big.Int + func (curve *PbcCurve) Pair(g1 Point, g2 Point) Point + func (curve *PbcCurve) Pow(g1 Point, e1 *big.Int) Point + func (curve *PbcCurve) Pow2(g1 Point, e1 *big.Int, g2 Point, e2 *big.Int) Point + func (curve *PbcCurve) Pow3(g1 Point, e1 *big.Int, g2 Point, e2 *big.Int, g3 Point, e3 *big.Int) Point + func (curve *PbcCurve) ProdPair(g1 []Point, g2 []Point) Point + func (curve *PbcCurve) UnitOnGroup(group string) Point + type PbcPoint struct + Group string + P string + func (p *PbcPoint) Decode(curve Curve) Point + func (p *PbcPoint) Encode() Point + func (p *PbcPoint) GetGroup() string + func (p *PbcPoint) GetP() string + type Point interface + Decode func(curve Curve) Point + Encode func() Point + GetGroup func() string + GetP func() string + type PolicyAttrs struct + Row map[string][]int + type UserAttrs struct + Coeff map[string][]int + User string + Userkey map[string]string + type Userkey struct + K string + KP string + Org string + func (userkey *Userkey) Decode() *Userkey + func (userkey *Userkey) Encode() *Userkey