Versions in this module Expand all Collapse all v0 v0.0.1 Aug 22, 2023 Changes in this version + type DIPPE struct + G1ToA data.MatrixG1 + G1ToUA data.MatrixG1 + P *big.Int + func NewDIPPE(secLevel int) (*DIPPE, error) + func (d *DIPPE) Decrypt(cipher *DIPPECipher, keys []data.VectorG2, v data.Vector, gid string) (string, error) + func (d *DIPPE) Encrypt(msg string, x data.Vector, pubKeys []*DIPPEPubKey) (*DIPPECipher, error) + func (d *DIPPE) NewDIPPEAuth(id int) (*DIPPEAuth, error) + func (d DIPPE) AttributeVecInit(attrib []int, numAttrib int) (data.Vector, error) + func (d DIPPE) ConjunctionPolicyVecInit(attrib []int, numAttrib int) (data.Vector, error) + func (d DIPPE) ExactThresholdPolicyVecInit(attrib []int, threshold int, numAttrib int) (data.Vector, error) + type DIPPEAuth struct + ID int + Pk DIPPEPubKey + Sk DIPPESecKey + func (a *DIPPEAuth) DeriveKeyShare(v data.Vector, pubKeys []*DIPPEPubKey, gid string) (data.VectorG2, error) + type DIPPECipher struct + C data.MatrixG1 + C0 data.VectorG1 + CPrime *bn256.GT + Iv []byte + SymEnc []byte + X data.Vector + type DIPPEPubKey struct + G1ToWtA data.MatrixG1 + G2ToSigma *bn256.G2 + GToAlphaA data.VectorGT + type DIPPESecKey struct + Alpha data.Vector + Sigma *big.Int + W data.Matrix + type FAME struct + P *big.Int + func NewFAME() *FAME + func (a *FAME) Decrypt(cipher *FAMECipher, key *FAMEAttribKeys, pk *FAMEPubKey) (string, error) + func (a *FAME) Encrypt(msg string, msp *MSP, pk *FAMEPubKey) (*FAMECipher, error) + func (a *FAME) GenerateAttribKeys(gamma []string, sk *FAMESecKey) (*FAMEAttribKeys, error) + func (a *FAME) GenerateMasterKeys() (*FAMEPubKey, *FAMESecKey, error) + type FAMEAttribKeys struct + AttribToI map[string]int + K [][3]*bn256.G1 + K0 [3]*bn256.G2 + KPrime [3]*bn256.G1 + type FAMECipher struct + Ct [][3]*bn256.G1 + Ct0 [3]*bn256.G2 + CtPrime *bn256.GT + Iv []byte + Msp *MSP + SymEnc []byte + type FAMEPubKey struct + PartG2 [2]*bn256.G2 + PartGT [2]*bn256.GT + type FAMESecKey struct + PartG1 [3]*bn256.G1 + PartInt [4]*big.Int + type GPSW struct + Params *GPSWParams + func NewGPSW(l int) *GPSW + func (a *GPSW) Decrypt(cipher *GPSWCipher, key *GPSWKey) (string, error) + func (a *GPSW) Encrypt(msg string, gamma interface{}, pk *GPSWPubKey) (*GPSWCipher, error) + func (a *GPSW) GenerateMasterKeys() (*GPSWPubKey, data.Vector, error) + func (a *GPSW) GeneratePolicyKey(msp *MSP, sk data.Vector) (*GPSWKey, error) + type GPSWCipher struct + AttribToI map[int]int + E data.VectorG2 + E0 *bn256.GT + Gamma []int + Iv []byte + SymEnc []byte + type GPSWKey struct + D data.VectorG1 + Msp *MSP + type GPSWParams struct + L int + P *big.Int + type GPSWPubKey struct + T data.VectorG2 + Y *bn256.GT + type MAABE struct + G1 *bn256.G1 + G2 *bn256.G2 + Gt *bn256.GT + P *big.Int + func NewMAABE() *MAABE + func (a *MAABE) Decrypt(ct *MAABECipher, ks []*MAABEKey) (string, error) + func (a *MAABE) Encrypt(msg string, msp *MSP, pks []*MAABEPubKey) (*MAABECipher, error) + func (a *MAABE) NewMAABEAuth(id string, attribs []string) (*MAABEAuth, error) + type MAABEAuth struct + ID string + Maabe *MAABE + Pk *MAABEPubKey + Sk *MAABESecKey + func (auth *MAABEAuth) AddAttribute(attrib string) error + func (auth *MAABEAuth) GenerateAttribKeys(gid string, attribs []string) ([]*MAABEKey, error) + func (auth *MAABEAuth) PubKeys() *MAABEPubKey + func (auth *MAABEAuth) RegenerateKey(attrib string) error + type MAABECipher struct + C0 *bn256.GT + C1x map[string]*bn256.GT + C2x map[string]*bn256.G2 + C3x map[string]*bn256.G2 + Iv []byte + Msp *MSP + SymEnc []byte + type MAABEKey struct + Attrib string + Gid string + Key *bn256.G1 + type MAABEPubKey struct + Attribs []string + EggToAlpha map[string]*bn256.GT + GToY map[string]*bn256.G2 + type MAABESecKey struct + Alpha map[string]*big.Int + Attribs []string + Y map[string]*big.Int + type MSP struct + Mat data.Matrix + P *big.Int + RowToAttrib []string + func BooleanToMSP(boolExp string, convertToOnes bool) (*MSP, error)