Documentation
¶
Index ¶
- func ADD(x, y *pbc.Element) *pbc.Element
- func COPY(x *pbc.Element) *pbc.Element
- func DIV(x, y *pbc.Element) *pbc.Element
- func GenLSSSPBCMatrices(M *PBCMatrix, pl *PolicyList, BooleanFormulas string)
- func GenerateBigNumber(bitLen int64) *big.Int
- func GenerateBigPrime(bitLen int64) *big.Int
- func GenerateBigRange(bitLen int64) *big.Int
- func GetNdonr(group pbc.Field, curveName curve.Curve) *big.Int
- func GetZq(q *big.Int) *big.Int
- func H_PBC_1_1(pairing *pbc.Pairing, field pbc.Field, m *pbc.Element) *pbc.Element
- func H_PBC_1_native_1(m *pbc.Element) *big.Int
- func H_PBC_2_1(pairing *pbc.Pairing, field pbc.Field, m1, m2 *pbc.Element) *pbc.Element
- func H_PBC_3_1(pairing *pbc.Pairing, field pbc.Field, m1, m2, m3 *pbc.Element) *pbc.Element
- func H_PBC_3_native_1(m1, m2, m3 *pbc.Element) *big.Int
- func H_String_1_PBC_1(pairing *pbc.Pairing, field pbc.Field, m string) *pbc.Element
- func H_native_1_1(m *big.Int) *big.Int
- func H_native_2_1(m1, m2 *big.Int) *big.Int
- func INVERT(x *pbc.Element) *pbc.Element
- func MUL(x, y *pbc.Element) *pbc.Element
- func NEG(x *pbc.Element) *pbc.Element
- func NewTimer(testName string, repeat int) *timer
- func POWBIG(x *pbc.Element, i *big.Int) *pbc.Element
- func POWZN(x, i *pbc.Element) *pbc.Element
- func SUB(x, y *pbc.Element) *pbc.Element
- type AttributeList
- type BooleanFormulaParser
- type EncText
- type H_2_element
- type NativeMatrix
- type Node
- type NodePBC
- type PBCMatrix
- func (m *PBCMatrix) GetNewElement() *pbc.Element
- func (m *PBCMatrix) GetOneElement() *pbc.Element
- func (m *PBCMatrix) GetZeroElement() *pbc.Element
- func (m *PBCMatrix) PrintMatrix()
- func (m *PBCMatrix) Prodith(y *PBCVector, i int) *pbc.Element
- func (matrix *PBCMatrix) Resize(n, m int)
- func (m *PBCMatrix) Solve(S *AttributeList) *PBCVector
- type PBCVector
- type PlaText
- type PolicyList
- type TokenType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenLSSSPBCMatrices ¶
func GenLSSSPBCMatrices(M *PBCMatrix, pl *PolicyList, BooleanFormulas string)
func GenerateBigNumber ¶
generate a random number with bitLen
func GenerateBigPrime ¶
generate a prime number with bitLen
func H_String_1_PBC_1 ¶
Types ¶
type AttributeList ¶
type AttributeList struct {
Attrs map[string]struct{}
}
func NewAttributeList ¶
func NewAttributeList() *AttributeList
func (*AttributeList) Add ¶
func (al *AttributeList) Add(attr string)
func (*AttributeList) CopyFrom ¶
func (al *AttributeList) CopyFrom(other *AttributeList)
func (*AttributeList) Print ¶
func (al *AttributeList) Print()
type BooleanFormulaParser ¶
type BooleanFormulaParser struct {
// contains filtered or unexported fields
}
func NewBooleanFormulaParser ¶
func NewBooleanFormulaParser(pl *PolicyList, BooleanFormulas string) (*BooleanFormulaParser, error)
func (*BooleanFormulaParser) SetToNativeMatrix ¶
func (bfp *BooleanFormulaParser) SetToNativeMatrix() *NativeMatrix
func (*BooleanFormulaParser) SetToPBCMatrix ¶
func (bfp *BooleanFormulaParser) SetToPBCMatrix(M *PBCMatrix)
type EncText ¶
func NewEncText ¶
type NativeMatrix ¶
type NativeMatrix struct {
M [][]int16
}
func GenLSSSNativeMatrices ¶
func GenLSSSNativeMatrices(pl *PolicyList, booleanFormulas string) *NativeMatrix
func (*NativeMatrix) Print ¶
func (m *NativeMatrix) Print()
func (*NativeMatrix) Resize ¶
func (matrix *NativeMatrix) Resize(n, m int)
type PBCMatrix ¶
type PBCMatrix struct {
Pairing *pbc.Pairing
G pbc.Field
M [][]*pbc.Element
Policy []string
Formula string
}
func (*PBCMatrix) GetNewElement ¶
func (*PBCMatrix) GetOneElement ¶
func (*PBCMatrix) GetZeroElement ¶
func (*PBCMatrix) PrintMatrix ¶
func (m *PBCMatrix) PrintMatrix()
func (*PBCMatrix) Solve ¶
func (m *PBCMatrix) Solve(S *AttributeList) *PBCVector
type PBCVector ¶
func NewPBCVector ¶
type PlaText ¶
func NewPlaText ¶
type PolicyList ¶
type PolicyList struct {
Policy []string
}
func (*PolicyList) Print ¶
func (pl *PolicyList) Print()
func (*PolicyList) Resize ¶
func (pl *PolicyList) Resize(n int)
Click to show internal directories.
Click to hide internal directories.