Versions in this module Expand all Collapse all v6 v6.1.0 Oct 14, 2024 Changes in this version type EvaluationKeys + func (b *EvaluationKeys) ReadFrom(r io.Reader) (n int64, err error) + func (b *EvaluationKeys) UnmarshalBinary(p []byte) (err error) + func (b EvaluationKeys) MarshalBinary() (p []byte, err error) + func (b EvaluationKeys) WriteTo(w io.Writer) (n int64, err error) type Evaluator + func (eval Evaluator) EvalModAndScale(ctIn *rlwe.Ciphertext, scaling complex128) (ctOut *rlwe.Ciphertext, err error) v6.0.0 Aug 6, 2024 Changes in this version + const Custom + const DecodeThenModUp + const DefaultCoeffsToSlotsFactorizationDepth + const DefaultCoeffsToSlotsLogScale + const DefaultDoubleAngle + const DefaultEphemeralSecretWeight + const DefaultEvalModLogScale + const DefaultIterations + const DefaultK + const DefaultLogMessageRatio + const DefaultLogN + const DefaultMod1Degree + const DefaultMod1InvDegree + const DefaultMod1Type + const DefaultSlotsToCoeffsFactorizationDepth + const DefaultSlotsToCoeffsLogScale + const ModUpThenEncode + var DefaultParametersDense = []defaultParametersLiteral + var DefaultParametersSparse = []defaultParametersLiteral + var DefaultXe = rlwe.DefaultXe + var DefaultXs = ring.Ternary + var N15QP768H192H32 = defaultParametersLiteral + var N15QP880H16384H32 = defaultParametersLiteral + var N16QP1546H192H32 = defaultParametersLiteral + var N16QP1547H192H32 = defaultParametersLiteral + var N16QP1553H192H32 = defaultParametersLiteral + var N16QP1767H32768H32 = defaultParametersLiteral + var N16QP1788H32768H32 = defaultParametersLiteral + var N16QP1793H32768H32 = defaultParametersLiteral + type Bootstrapper interface + Bootstrap func(ct *rlwe.Ciphertext) (*rlwe.Ciphertext, error) + BootstrapMany func(cts []rlwe.Ciphertext) ([]rlwe.Ciphertext, error) + Depth func() int + MinimumInputLevel func() int + OutputLevel func() int + type CircuitOrder int + type EvaluationKeys struct + EvkCmplxToReal *rlwe.EvaluationKey + EvkDenseToSparse *rlwe.EvaluationKey + EvkN1ToN2 *rlwe.EvaluationKey + EvkN2ToN1 *rlwe.EvaluationKey + EvkRealToCmplx *rlwe.EvaluationKey + EvkSparseToDense *rlwe.EvaluationKey + func (b EvaluationKeys) BinarySize() (dLen int) + type Evaluator struct + C2SDFTMatrix dft.Matrix + DFTEvaluator *dft.Evaluator + Mod1Evaluator *mod1.Evaluator + Mod1Parameters mod1.Parameters + S2CDFTMatrix dft.Matrix + SkDebug *rlwe.SecretKey + func NewEvaluator(btpParams Parameters, evk *EvaluationKeys) (eval *Evaluator, err error) + func (eval Evaluator) Bootstrap(ct *rlwe.Ciphertext) (*rlwe.Ciphertext, error) + func (eval Evaluator) BootstrapMany(cts []rlwe.Ciphertext) ([]rlwe.Ciphertext, error) + func (eval Evaluator) CoeffsToSlots(ctIn *rlwe.Ciphertext) (ctReal, ctImag *rlwe.Ciphertext, err error) + func (eval Evaluator) ComplexToRealNew(ctCmplx *rlwe.Ciphertext) (ctReal *rlwe.Ciphertext) + func (eval Evaluator) Depth() int + func (eval Evaluator) EvalMod(ctIn *rlwe.Ciphertext) (ctOut *rlwe.Ciphertext, err error) + func (eval Evaluator) Evaluate(ctIn *rlwe.Ciphertext) (ctOut *rlwe.Ciphertext, err error) + func (eval Evaluator) EvaluateConjugateInvariant(ctLeftN1Q0, ctRightN1Q0 *rlwe.Ciphertext) (ctLeftN1QL, ctRightN1QL *rlwe.Ciphertext, err error) + func (eval Evaluator) MinimumInputLevel() int + func (eval Evaluator) ModUp(ctIn *rlwe.Ciphertext) (ctOut *rlwe.Ciphertext, err error) + func (eval Evaluator) OutputLevel() int + func (eval Evaluator) Pack(cts []rlwe.Ciphertext, params ckks.Parameters, xPow2 []ring.Poly) ([]rlwe.Ciphertext, error) + func (eval Evaluator) PackAndSwitchN1ToN2(cts []rlwe.Ciphertext) ([]rlwe.Ciphertext, error) + func (eval Evaluator) RealToComplexNew(ctReal *rlwe.Ciphertext) (ctCmplx *rlwe.Ciphertext) + func (eval Evaluator) ScaleDown(ctIn *rlwe.Ciphertext) (*rlwe.Ciphertext, *rlwe.Scale, error) + func (eval Evaluator) ShallowCopy() *Evaluator + func (eval Evaluator) SlotsToCoeffs(ctReal, ctImag *rlwe.Ciphertext) (ctOut *rlwe.Ciphertext, err error) + func (eval Evaluator) SwitchRingDegreeN1ToN2New(ctN1 *rlwe.Ciphertext) (ctN2 *rlwe.Ciphertext) + func (eval Evaluator) SwitchRingDegreeN2ToN1New(ctN2 *rlwe.Ciphertext) (ctN1 *rlwe.Ciphertext) + func (eval Evaluator) UnPack(cts []rlwe.Ciphertext, params ckks.Parameters, LogSlots, Nb int, ...) ([]rlwe.Ciphertext, error) + func (eval Evaluator) UnpackAndSwitchN2Tn1(cts []rlwe.Ciphertext, LogSlots, Nb int) ([]rlwe.Ciphertext, error) + type IterationsParameters struct + BootstrappingPrecision []float64 + ReservedPrimeBitSize int + type Parameters struct + BootstrappingParameters ckks.Parameters + CircuitOrder CircuitOrder + CoeffsToSlotsParameters dft.MatrixLiteral + EphemeralSecretWeight int + IterationsParameters *IterationsParameters + Mod1ParametersLiteral mod1.ParametersLiteral + ResidualParameters ckks.Parameters + SlotsToCoeffsParameters dft.MatrixLiteral + func NewParametersFromLiteral(residualParameters ckks.Parameters, btpLit ParametersLiteral) (Parameters, error) + func (p *Parameters) UnmarshalBinary(data []byte) (err error) + func (p *Parameters) UnmarshalJSON(data []byte) (err error) + func (p Parameters) Depth() (depth int) + func (p Parameters) DepthCoeffsToSlots() (depth int) + func (p Parameters) DepthEvalMod() (depth int) + func (p Parameters) DepthSlotsToCoeffs() (depth int) + func (p Parameters) Equal(other *Parameters) (res bool) + func (p Parameters) GaloisElements(params ckks.Parameters) (galEls []uint64) + func (p Parameters) GenEvaluationKeys(skN1 *rlwe.SecretKey) (btpkeys *EvaluationKeys, skN2 *rlwe.SecretKey, err error) + func (p Parameters) LogMaxDimensions() ring.Dimensions + func (p Parameters) LogMaxSlots() int + func (p Parameters) MarshalBinary() (data []byte, err error) + func (p Parameters) MarshalJSON() (data []byte, err error) + type ParametersLiteral struct + CoeffsToSlotsFactorizationDepthAndLogScales [][]int + DoubleAngle *int + EphemeralSecretWeight *int + EvalModLogScale *int + IterationsParameters *IterationsParameters + K *int + LogMessageRatio *int + LogN *int + LogP []int + LogSlots *int + Mod1Degree *int + Mod1InvDegree *int + Mod1Type mod1.Type + SlotsToCoeffsFactorizationDepthAndLogScales [][]int + Xe ring.DistributionParameters + Xs ring.DistributionParameters + func (p *ParametersLiteral) UnmarshalBinary(data []byte) (err error) + func (p ParametersLiteral) BitConsumption(LogSlots int) (logQ int, err error) + func (p ParametersLiteral) GetCoeffsToSlotsFactorizationDepthAndLogScales(LogSlots int) (CoeffsToSlotsFactorizationDepthAndLogScales [][]int, err error) + func (p ParametersLiteral) GetDefaultXe() (Xe ring.DistributionParameters) + func (p ParametersLiteral) GetDefaultXs() (Xs ring.DistributionParameters) + func (p ParametersLiteral) GetDoubleAngle() (DoubleAngle int, err error) + func (p ParametersLiteral) GetEphemeralSecretWeight() (EphemeralSecretWeight int, err error) + func (p ParametersLiteral) GetEvalMod1LogScale() (EvalModLogScale int, err error) + func (p ParametersLiteral) GetIterationsParameters() (Iterations *IterationsParameters, err error) + func (p ParametersLiteral) GetK() (K int, err error) + func (p ParametersLiteral) GetLogMessageRatio() (LogMessageRatio int, err error) + func (p ParametersLiteral) GetLogN() (LogN int) + func (p ParametersLiteral) GetLogP(NumberOfQi int) (LogP []int) + func (p ParametersLiteral) GetLogSlots() (LogSlots int, err error) + func (p ParametersLiteral) GetMod1Degree() (Mod1Degree int, err error) + func (p ParametersLiteral) GetMod1InvDegree() (Mod1InvDegree int, err error) + func (p ParametersLiteral) GetMod1Type() (Mod1Type mod1.Type) + func (p ParametersLiteral) GetSlotsToCoeffsFactorizationDepthAndLogScales(LogSlots int) (SlotsToCoeffsFactorizationDepthAndLogScales [][]int, err error) + func (p ParametersLiteral) MarshalBinary() (data []byte, err error) + type SecretKeyBootstrapper struct + Counter int + MinLevel int + Values []*bignum.Complex + func NewSecretKeyBootstrapper(params ckks.Parameters, sk *rlwe.SecretKey) *SecretKeyBootstrapper + func (d *SecretKeyBootstrapper) Bootstrap(ct *rlwe.Ciphertext) (*rlwe.Ciphertext, error) + func (d SecretKeyBootstrapper) BootstrapMany(cts []rlwe.Ciphertext) ([]rlwe.Ciphertext, error) + func (d SecretKeyBootstrapper) Depth() int + func (d SecretKeyBootstrapper) MinimumInputLevel() int + func (d SecretKeyBootstrapper) OutputLevel() int