Versions in this module Expand all Collapse all v0 v0.0.1 Aug 22, 2023 Changes in this version + type DDH struct + Params *DDHParams + func NewDDH(l, modulusLength int, bound *big.Int) (*DDH, error) + func NewDDHFromParams(params *DDHParams) *DDH + func NewDDHPrecomp(l, modulusLength int, bound *big.Int) (*DDH, error) + func (d *DDH) Decrypt(cipher data.Vector, key *big.Int, y data.Vector) (*big.Int, error) + func (d *DDH) DeriveKey(masterSecKey, y data.Vector) (*big.Int, error) + func (d *DDH) Encrypt(x, masterPubKey data.Vector) (data.Vector, error) + func (d *DDH) GenerateMasterKeys() (data.Vector, data.Vector, error) + type DDHMulti struct + Slots int + func NewDDHMulti(slots, l, modulusLength int, bound *big.Int) (*DDHMulti, error) + func NewDDHMultiFromParams(slots int, params *DDHParams) *DDHMulti + func NewDDHMultiPrecomp(slots, l, modulusLength int, bound *big.Int) (*DDHMulti, error) + func (dm *DDHMulti) Decrypt(cipher []data.Vector, key *DDHMultiDerivedKey, y data.Matrix) (*big.Int, error) + func (dm *DDHMulti) DeriveKey(secKey *DDHMultiSecKey, y data.Matrix) (*DDHMultiDerivedKey, error) + func (dm *DDHMulti) GenerateMasterKeys() (data.Matrix, *DDHMultiSecKey, error) + type DDHMultiClient struct + func NewDDHMultiClient(params *DDHParams) *DDHMultiClient + func (e *DDHMultiClient) Encrypt(x data.Vector, pubKey, otp data.Vector) (data.Vector, error) + type DDHMultiDerivedKey struct + Keys data.Vector + OTPKey *big.Int + type DDHMultiSecKey struct + Msk data.Matrix + OtpKey data.Matrix + type DDHParams struct + Bound *big.Int + G *big.Int + L int + P *big.Int + Q *big.Int + type LWE struct + Params *LWEParams + func NewLWE(l int, boundX, boundY *big.Int, n int) (*LWE, error) + func (s *LWE) Decrypt(ct, skY, y data.Vector) (*big.Int, error) + func (s *LWE) DeriveKey(y data.Vector, SK data.Matrix) (data.Vector, error) + func (s *LWE) Encrypt(x data.Vector, PK data.Matrix) (data.Vector, error) + func (s *LWE) GeneratePublicKey(SK data.Matrix) (data.Matrix, error) + func (s *LWE) GenerateSecretKey() (data.Matrix, error) + type LWEParams struct + A data.Matrix + BoundX *big.Int + BoundY *big.Int + L int + LSigma *big.Int + M int + N int + P *big.Int + Q *big.Int + SigmaQ *big.Float + type RingLWE struct + Params *RingLWEParams + func NewRingLWE(sec, l int, boundX, boundY *big.Int) (*RingLWE, error) + func (s *RingLWE) Decrypt(CT *RingLWECipher, skY, y data.Vector) (data.Vector, error) + func (s *RingLWE) DeriveKey(y data.Vector, SK data.Matrix) (data.Vector, error) + func (s *RingLWE) Encrypt(X data.Matrix, PK data.Matrix) (*RingLWECipher, error) + func (s *RingLWE) GeneratePublicKey(SK data.Matrix) (data.Matrix, error) + func (s *RingLWE) GenerateSecretKey() (data.Matrix, error) + type RingLWECipher struct + Ct0 data.Matrix + Ct1 data.Vector + K int + type RingLWEParams struct + A data.Vector + BoundX *big.Int + BoundY *big.Int + L int + N int + P *big.Int + Q *big.Int + Sigma1 *big.Float + Sigma2 *big.Float + Sigma3 *big.Float