Versions in this module Expand all Collapse all v5 v5.0.5 May 3, 2024 Changes in this version + const CosContinuous + const CosDiscrete + const HomomorphicDecode + const HomomorphicEncode + const RepackImagAsReal + const SinContinuous + const SplitRealAndImag + const Standard + var CoeffsSignX2Cheby = []string + var CoeffsSignX4Cheby = []string + var DefaultMinimaxCompositePolynomialForSign = [][]string + func EncodeLinearTransformation[T Float](ecd *Encoder, diagonals Diagonals[T], allocated LinearTransformation) (err error) + func GaloisElementsForLinearTransformation(params rlwe.ParameterProvider, lt LinearTransformationParameters) (galEls []uint64) + func GenMinimaxCompositePolynomial(prec uint, logalpha, logerr int, deg []int, f func(*big.Float) *big.Float) (coeffs [][]*big.Float) + func GenMinimaxCompositePolynomialForSign(prec uint, logalpha, logerr int, deg []int) + func GetPrecisionStats(params Parameters, encoder *Encoder, decryptor *rlwe.Decryptor, ...) (prec ckks.PrecisionStats) + func NewCiphertext(params Parameters, degree, level int) *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) *rlwe.Plaintext + func NewPowerBasis(ct *rlwe.Ciphertext, basis bignum.Basis) he.PowerBasis + func PrettyPrintCoefficients(decimals int, coeffs []*big.Float, odd, even, first bool) + func VerifyTestVectors(params Parameters, encoder *Encoder, decryptor *rlwe.Decryptor, ...) + type CoefficientGetter struct + Values []*bignum.Complex + func (c CoefficientGetter) GetSingleCoefficient(pol he.Polynomial, k int) (value *bignum.Complex) + func (c CoefficientGetter) GetVectorCoefficient(pol he.PolynomialVector, k int) (values []*bignum.Complex) + func (c CoefficientGetter) ShallowCopy() he.CoefficientGetter[*bignum.Complex] + type ComparisonEvaluator struct + MinimaxCompositeSignPolynomial MinimaxCompositePolynomial + func NewComparisonEvaluator(params Parameters, eval EvaluatorForMinimaxCompositePolynomial, ...) *ComparisonEvaluator + func (eval ComparisonEvaluator) Max(op0, op1 *rlwe.Ciphertext) (max *rlwe.Ciphertext, err error) + func (eval ComparisonEvaluator) Min(op0, op1 *rlwe.Ciphertext) (min *rlwe.Ciphertext, err error) + func (eval ComparisonEvaluator) Sign(op0 *rlwe.Ciphertext) (sign *rlwe.Ciphertext, err error) + func (eval ComparisonEvaluator) Step(op0 *rlwe.Ciphertext) (step *rlwe.Ciphertext, err error) + type DFTEvaluator struct + func NewDFTEvaluator(params Parameters, eval EvaluatorForDFT) *DFTEvaluator + func (eval *DFTEvaluator) CoeffsToSlots(ctIn *rlwe.Ciphertext, ctsMatrices DFTMatrix, ctReal, ctImag *rlwe.Ciphertext) (err error) + func (eval *DFTEvaluator) CoeffsToSlotsNew(ctIn *rlwe.Ciphertext, ctsMatrices DFTMatrix) (ctReal, ctImag *rlwe.Ciphertext, err error) + func (eval *DFTEvaluator) SlotsToCoeffs(ctReal, ctImag *rlwe.Ciphertext, stcMatrices DFTMatrix, opOut *rlwe.Ciphertext) (err error) + func (eval *DFTEvaluator) SlotsToCoeffsNew(ctReal, ctImag *rlwe.Ciphertext, stcMatrices DFTMatrix) (opOut *rlwe.Ciphertext, err error) + type DFTFormat int + type DFTMatrix struct + Matrices []LinearTransformation + func NewDFTMatrixFromLiteral(params Parameters, d DFTMatrixLiteral, encoder *Encoder) (DFTMatrix, error) + type DFTMatrixLiteral struct + BitReversed bool + Format DFTFormat + LevelStart int + Levels []int + LogBSGSRatio int + LogSlots int + Scaling *big.Float + Type DFTType + func (d *DFTMatrixLiteral) UnmarshalBinary(data []byte) error + func (d DFTMatrixLiteral) Depth(actual bool) (depth int) + func (d DFTMatrixLiteral) GaloisElements(params Parameters) (galEls []uint64) + func (d DFTMatrixLiteral) GenMatrices(LogN int, prec uint) (plainVector []Diagonals[*bignum.Complex]) + func (d DFTMatrixLiteral) MarshalBinary() (data []byte, err error) + type DFTType int + type Diagonals he.Diagonals[T] + func (m Diagonals[T]) DiagonalsIndexList() (indexes []int) + type Encoder struct + func NewEncoder(params Parameters, prec ...uint) *Encoder + func (ecd Encoder) ShallowCopy() *Encoder + type Evaluator struct + func NewEvaluator(params Parameters, evk rlwe.EvaluationKeySet) *Evaluator + func (eval Evaluator) GetParameters() *Parameters + func (eval Evaluator) ShallowCopy() *Evaluator + func (eval Evaluator) WithKey(evk rlwe.EvaluationKeySet) *Evaluator + type EvaluatorForDFT interface + Add func(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + Conjugate func(op0 *rlwe.Ciphertext, opOut *rlwe.Ciphertext) (err error) + Mul func(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + Rescale func(op0 *rlwe.Ciphertext, opOut *rlwe.Ciphertext) (err error) + Rotate func(op0 *rlwe.Ciphertext, k int, opOut *rlwe.Ciphertext) (err error) + Sub func(op0 *rlwe.Ciphertext, op1 rlwe.Operand, opOut *rlwe.Ciphertext) (err error) + type EvaluatorForInverse interface + SetScale func(ct *rlwe.Ciphertext, scale rlwe.Scale) (err error) + type EvaluatorForMinimaxCompositePolynomial interface + ConjugateNew func(ct *rlwe.Ciphertext) (ctConj *rlwe.Ciphertext, err error) + type EvaluatorForMod1 interface + DropLevel func(*rlwe.Ciphertext, int) + GetParameters func() *Parameters + type Float interface + type InverseEvaluator struct + Parameters Parameters + func NewInverseEvaluator(params Parameters, eval EvaluatorForInverse, ...) InverseEvaluator + func (eval InverseEvaluator) EvaluateFullDomainNew(ct *rlwe.Ciphertext, log2min, log2max float64, ...) (cInv *rlwe.Ciphertext, err error) + func (eval InverseEvaluator) EvaluateNegativeDomainNew(ct *rlwe.Ciphertext, log2min, log2max float64) (cInv *rlwe.Ciphertext, err error) + func (eval InverseEvaluator) EvaluatePositiveDomainNew(ct *rlwe.Ciphertext, log2min, log2max float64) (cInv *rlwe.Ciphertext, err error) + func (eval InverseEvaluator) GoldschmidtDivisionNew(ct *rlwe.Ciphertext, log2min float64) (ctInv *rlwe.Ciphertext, err error) + func (eval InverseEvaluator) IntervalNormalization(ct *rlwe.Ciphertext, log2Max float64, btp he.Bootstrapper[rlwe.Ciphertext]) (ctNorm, ctNormFac *rlwe.Ciphertext, err error) + type LinearTransformation he.LinearTransformation + func NewLinearTransformation(params rlwe.ParameterProvider, lt LinearTransformationParameters) LinearTransformation + func (lt LinearTransformation) GaloisElements(params rlwe.ParameterProvider) []uint64 + type LinearTransformationEvaluator struct + func NewLinearTransformationEvaluator(eval he.EvaluatorForLinearTransformation) (linTransEval *LinearTransformationEvaluator) + func (eval LinearTransformationEvaluator) Evaluate(ctIn *rlwe.Ciphertext, linearTransformation LinearTransformation, ...) (err error) + func (eval LinearTransformationEvaluator) EvaluateMany(ctIn *rlwe.Ciphertext, linearTransformations []LinearTransformation, ...) (err error) + func (eval LinearTransformationEvaluator) EvaluateManyNew(ctIn *rlwe.Ciphertext, linearTransformations []LinearTransformation) (opOut []*rlwe.Ciphertext, err error) + func (eval LinearTransformationEvaluator) EvaluateNew(ctIn *rlwe.Ciphertext, linearTransformation LinearTransformation) (opOut *rlwe.Ciphertext, err error) + func (eval LinearTransformationEvaluator) EvaluateSequential(ctIn *rlwe.Ciphertext, linearTransformations []LinearTransformation, ...) (err error) + func (eval LinearTransformationEvaluator) EvaluateSequentialNew(ctIn *rlwe.Ciphertext, linearTransformations []LinearTransformation) (opOut *rlwe.Ciphertext, err error) + type LinearTransformationParameters he.LinearTransformationParameters + type MinimaxCompositePolynomial []bignum.Polynomial + func NewMinimaxCompositePolynomial(coeffsStr [][]string) MinimaxCompositePolynomial + func (mcp MinimaxCompositePolynomial) Evaluate(x interface{}) (y *bignum.Complex) + func (mcp MinimaxCompositePolynomial) MaxDepth() (depth int) + type MinimaxCompositePolynomialEvaluator struct + Parameters Parameters + func NewMinimaxCompositePolynomialEvaluator(params Parameters, eval EvaluatorForMinimaxCompositePolynomial, ...) *MinimaxCompositePolynomialEvaluator + func (eval MinimaxCompositePolynomialEvaluator) Evaluate(ct *rlwe.Ciphertext, mcp MinimaxCompositePolynomial) (res *rlwe.Ciphertext, err error) + type Mod1Evaluator struct + Mod1Parameters Mod1Parameters + PolynomialEvaluator *PolynomialEvaluator + func NewMod1Evaluator(eval EvaluatorForMod1, evalPoly *PolynomialEvaluator, ...) *Mod1Evaluator + func (eval Mod1Evaluator) EvaluateNew(ct *rlwe.Ciphertext) (*rlwe.Ciphertext, error) + type Mod1Parameters struct + LogDefaultScale int + LogMessageRatio int + Mod1Type Mod1Type + func NewMod1ParametersFromLiteral(params Parameters, evm Mod1ParametersLiteral) (Mod1Parameters, error) + func (evp Mod1Parameters) K() float64 + func (evp Mod1Parameters) LevelStart() int + func (evp Mod1Parameters) MessageRatio() float64 + func (evp Mod1Parameters) QDiff() float64 + func (evp Mod1Parameters) ScFac() float64 + func (evp Mod1Parameters) ScalingFactor() rlwe.Scale + type Mod1ParametersLiteral struct + DoubleAngle int + K int + LevelStart int + LogMessageRatio int + LogScale int + Mod1Degree int + Mod1InvDegree int + Mod1Type Mod1Type + Scaling float64 + func (evm *Mod1ParametersLiteral) UnmarshalBinary(data []byte) (err error) + func (evm Mod1ParametersLiteral) Depth() (depth int) + func (evm Mod1ParametersLiteral) MarshalBinary() (data []byte, err error) + type Mod1Type uint64 + type Parameters struct + func NewParametersFromLiteral(paramsLit ParametersLiteral) (Parameters, error) + func (p *Parameters) UnmarshalBinary(d []byte) (err error) + func (p *Parameters) UnmarshalJSON(d []byte) (err error) + func (p Parameters) Equal(other *Parameters) bool + func (p Parameters) MarshalBinary() (d []byte, err error) + func (p Parameters) MarshalJSON() (d []byte, err error) + type ParametersLiteral ckks.ParametersLiteral + type Polynomial he.Polynomial + func NewPolynomial(poly bignum.Polynomial) Polynomial + type PolynomialEvaluator struct + Parameters Parameters + func NewPolynomialEvaluator(params Parameters, eval he.Evaluator) *PolynomialEvaluator + func (eval PolynomialEvaluator) Evaluate(ct *rlwe.Ciphertext, p interface{}, targetScale rlwe.Scale) (opOut *rlwe.Ciphertext, err error) + func (eval PolynomialEvaluator) EvaluateFromPowerBasis(pb he.PowerBasis, p interface{}, targetScale rlwe.Scale) (opOut *rlwe.Ciphertext, err error) + type PolynomialVector he.PolynomialVector + func NewPolynomialVector(polys []bignum.Polynomial, mapping map[int][]int) (PolynomialVector, error) + func (p PolynomialVector) ChangeOfBasis(slots int) (scalar, constant []*big.Float) + func (p PolynomialVector) Depth() int