Versions in this module Expand all Collapse all v6 v6.1.0 Oct 14, 2024 v6.0.0 Aug 6, 2024 Changes in this version + const GaloisGen + const NTTFlag + var ExampleParameters128BitLogN14LogQP438 = ParametersLiteral + func MulScaleInvariant(params Parameters, a, b rlwe.Scale, level int) (c rlwe.Scale) + func NewCiphertext(params Parameters, degree, level int) (ct *rlwe.Ciphertext) + func NewDecryptor(params Parameters, key *rlwe.SecretKey) *rlwe.Decryptor + func NewEncryptor(params Parameters, key rlwe.EncryptionKey) *rlwe.Encryptor + func NewKeyGenerator(params Parameters) *rlwe.KeyGenerator + func NewPlaintext(params Parameters, level int) (pt *rlwe.Plaintext) + func NewTestVector(params Parameters, encoder *Encoder, encryptor *rlwe.Encryptor, level int, ...) (values []uint64, pt *rlwe.Plaintext, ct *rlwe.Ciphertext) + func VerifyTestVectors(params Parameters, encoder *Encoder, decryptor *rlwe.Decryptor, ...) + type Encoder struct + func NewEncoder(parameters Parameters) *Encoder + func (ecd Encoder) Decode(pt *rlwe.Plaintext, values interface{}) (err error) + func (ecd Encoder) DecodeRingT(pT ring.Poly, scale rlwe.Scale, values IntegerSlice) (err error) + func (ecd Encoder) Embed(values interface{}, metadata *rlwe.MetaData, polyOut interface{}) (err error) + func (ecd Encoder) EmbedScale(values IntegerSlice, scaleUp bool, metadata *rlwe.MetaData, ...) (err error) + func (ecd Encoder) Encode(values interface{}, pt *rlwe.Plaintext) (err error) + func (ecd Encoder) EncodeRingT(values IntegerSlice, scale rlwe.Scale, pT ring.Poly) (err error) + func (ecd Encoder) GetRLWEParameters() *rlwe.Parameters + func (ecd Encoder) RingQ2T(level int, scaleDown bool, pQ, pT ring.Poly) + func (ecd Encoder) RingT2Q(level int, scaleUp bool, pT, pQ ring.Poly) + func (ecd Encoder) ShallowCopy() (e *Encoder) + type Evaluator struct + ScaleInvariant bool + func NewEvaluator(parameters Parameters, evk rlwe.EvaluationKeySet, scaleInvariant ...bool) *Evaluator + func (eval Evaluator) Add(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) AddNew(op0 *rlwe.Ciphertext, op1 rlwe.Operand) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) ApplyEvaluationKeyNew(op0 *rlwe.Ciphertext, evk *rlwe.EvaluationKey) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) BuffQ() [3]ring.Poly + func (eval Evaluator) DropLevel(op0 *rlwe.Ciphertext, levels int) + func (eval Evaluator) GetParameters() *Parameters + func (eval Evaluator) GetRLWEParameters() *rlwe.Parameters + func (eval Evaluator) MatchScalesAndLevel(ct0, opOut *rlwe.Ciphertext) + func (eval Evaluator) Mul(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) MulNew(op0 *rlwe.Ciphertext, op1 rlwe.Operand) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) MulRelin(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) MulRelinNew(op0 *rlwe.Ciphertext, op1 rlwe.Operand) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) MulRelinScaleInvariant(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) MulRelinScaleInvariantNew(op0 *rlwe.Ciphertext, op1 rlwe.Operand) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) MulRelinThenAdd(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) MulScaleInvariant(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) MulScaleInvariantNew(op0 *rlwe.Ciphertext, op1 rlwe.Operand) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) MulThenAdd(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) RelinearizeNew(op0 *rlwe.Ciphertext) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) Rescale(op0, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) RotateColumns(op0 *rlwe.Ciphertext, k int, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) RotateColumnsNew(op0 *rlwe.Ciphertext, k int) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) RotateHoistedLazyNew(level int, rotations []int, op0 *rlwe.Ciphertext, c2DecompQP []ringqp.Poly) (opOut map[int]*rlwe.Element[ringqp.Poly], err error) + func (eval Evaluator) RotateRows(op0, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) RotateRowsNew(op0 *rlwe.Ciphertext) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) ShallowCopy() *Evaluator + func (eval Evaluator) Sub(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + func (eval Evaluator) SubNew(op0 *rlwe.Ciphertext, op1 rlwe.Operand) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator) WithKey(evk rlwe.EvaluationKeySet) *Evaluator + type Integer interface + type IntegerSlice interface + type Parameters struct + func NewParameters(rlweParams rlwe.Parameters, t uint64) (p Parameters, err error) + func NewParametersFromLiteral(pl ParametersLiteral) (Parameters, error) + func (p *Parameters) UnmarshalBinary(data []byte) (err error) + func (p *Parameters) UnmarshalJSON(data []byte) (err error) + func (p Parameters) Equal(other *Parameters) bool + func (p Parameters) GaloisElementForColRotation(k int) uint64 + func (p Parameters) GaloisElementForRowRotation() uint64 + func (p Parameters) GaloisElementsForInnerSum(batch, n int) (galEls []uint64) + func (p Parameters) GaloisElementsForReplicate(batch, n int) (galEls []uint64) + func (p Parameters) GaloisElementsForTrace(logN int) []uint64 + func (p Parameters) GetRLWEParameters() *rlwe.Parameters + func (p Parameters) LogMaxDimensions() ring.Dimensions + func (p Parameters) LogMaxSlots() int + func (p Parameters) LogT() float64 + func (p Parameters) MarshalBinary() ([]byte, error) + func (p Parameters) MarshalJSON() ([]byte, error) + func (p Parameters) MaxDimensions() ring.Dimensions + func (p Parameters) MaxSlots() int + func (p Parameters) ParametersLiteral() ParametersLiteral + func (p Parameters) PlaintextModulus() uint64 + func (p Parameters) RingQMul() *ring.Ring + func (p Parameters) RingT() *ring.Ring + type ParametersLiteral struct + LogN int + LogNthRoot int + LogP []int + LogQ []int + P []uint64 + PlaintextModulus uint64 + Q []uint64 + Xe ring.DistributionParameters + Xs ring.DistributionParameters + func (p *ParametersLiteral) UnmarshalJSON(b []byte) (err error) + func (p ParametersLiteral) GetRLWEParametersLiteral() rlwe.ParametersLiteral + type TestContext struct + Dec *rlwe.Decryptor + Ecd *Encoder + Enc *rlwe.Encryptor + Evl *Evaluator + Kgen *rlwe.KeyGenerator + Params Parameters + Pk *rlwe.PublicKey + Prng sampling.PRNG + Sampler *ring.UniformSampler + Sk *rlwe.SecretKey + func NewTestContext(params ParametersLiteral, scaleInvariant bool) *TestContext + func (tc TestContext) String() string Other modules containing this package github.com/tuneinsight/lattigo/v5