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 + func SplitDegree(n int) (a, b int) + type BabyStep struct + Degree int + Value *rlwe.Ciphertext + type CoefficientGetter interface + GetSingleCoefficient func(pol Polynomial, k int) (value T) + GetVectorCoefficient func(pol PolynomialVector, k int) (values []T) + type Evaluator struct + func (eval Evaluator[T]) Evaluate(input interface{}, p interface{}, targetScale rlwe.Scale, ...) (opOut *rlwe.Ciphertext, err error) + func (eval Evaluator[T]) EvaluateBabyStep(i int, poly PatersonStockmeyerPolynomialVector, pb PowerBasis) (ct *BabyStep, err error) + func (eval Evaluator[T]) EvaluateGianStep(i int, giantSteps []int, babySteps []*BabyStep, pb PowerBasis) (err error) + func (eval Evaluator[T]) EvaluateMonomial(a, b, xpow *rlwe.Ciphertext) (err error) + func (eval Evaluator[T]) EvaluatePatersonStockmeyerPolynomialVector(poly PatersonStockmeyerPolynomialVector, pb PowerBasis) (res *rlwe.Ciphertext, err error) + func (eval Evaluator[T]) EvaluatePolynomialVectorFromPowerBasis(targetLevel int, pol PolynomialVector, pb PowerBasis, targetScale rlwe.Scale) (res *rlwe.Ciphertext, err error) + type PatersonStockmeyerPolynomial struct + Base int + Degree int + Level int + Scale rlwe.Scale + Value []Polynomial + type PatersonStockmeyerPolynomialVector struct + Mapping map[int][]int + Value []PatersonStockmeyerPolynomial + type Polynomial struct + Lazy bool + Lead bool + Level int + MaxDeg int + Scale rlwe.Scale + func NewPolynomial(poly bignum.Polynomial) Polynomial + func (p Polynomial) Factorize(n int) (pq, pr Polynomial) + func (p Polynomial) PatersonStockmeyerPolynomial(params rlwe.ParameterProvider, inputLevel int, ...) PatersonStockmeyerPolynomial + type PolynomialVector struct + Mapping map[int][]int + Value []Polynomial + func NewPolynomialVector(polys []bignum.Polynomial, mapping map[int][]int) (PolynomialVector, error) + func (p PolynomialVector) Factorize(n int) (polyq, polyr PolynomialVector) + func (p PolynomialVector) IsEven() (even bool) + func (p PolynomialVector) IsOdd() (odd bool) + func (p PolynomialVector) PatersonStockmeyerPolynomial(params rlwe.Parameters, inputLevel int, inputScale, outputScale rlwe.Scale, ...) PatersonStockmeyerPolynomialVector + type PowerBasis struct + Value structs.Map[int, rlwe.Ciphertext] + func NewPowerBasis(ct *rlwe.Ciphertext, basis bignum.Basis) (p PowerBasis) + func (p *PowerBasis) GenPower(n int, lazy bool, eval schemes.Evaluator) (err error) + func (p *PowerBasis) ReadFrom(r io.Reader) (n int64, err error) + func (p *PowerBasis) UnmarshalBinary(data []byte) (err error) + func (p PowerBasis) BinarySize() (size int) + func (p PowerBasis) MarshalBinary() (data []byte, err error) + func (p PowerBasis) WriteTo(w io.Writer) (n int64, err error) + type SimEvaluator interface + MulNew func(op0, op1 *SimOperand) *SimOperand + PolynomialDepth func(degree int) int + Rescale func(op0 *SimOperand) + UpdateLevelAndScaleBabyStep func(lead bool, tLevelOld int, tScaleOld rlwe.Scale) (tLevelNew int, tScaleNew rlwe.Scale) + UpdateLevelAndScaleGiantStep func(lead bool, tLevelOld int, tScaleOld, xPowScale rlwe.Scale) (tLevelNew int, tScaleNew rlwe.Scale) + type SimOperand struct + Level int + Scale rlwe.Scale + type SimPowerBasis map[int]*SimOperand + func (d SimPowerBasis) GenPower(params rlwe.ParameterProvider, n int, eval SimEvaluator)