Versions in this module Expand all Collapse all v0 v0.0.2 Dec 20, 2024 v0.0.1 Oct 31, 2024 Changes in this version + const DefaultNoise + const DefaultNoiseBound + const GaloisGen + const MaxLogN + const MaxModuliSize + const MinLogN + const ScalePrecision + const Signed + const SignedBalanced + const Unsigned + const XsUniformTernary + var DefaultXe = ring.DiscreteGaussian + var DefaultXs = ring.Ternary + var ExampleParametersLogN14LogQP438 = ParametersLiteral + var ScalePrecisionLog10 = int(math.Ceil(float64(ScalePrecision) / math.Log2(10))) + func AddPlaintextToMatrix(rQ, rP ring.RNSRing, pt, buff ring.RNSPoly, ct ring.Matrix, ...) (err error) + func CheckModuli(q, p []uint64) error + func GaloisElementsForInnerSum(params ParameterProvider, batch, n int) (galEls []uint64) + func GaloisElementsForReplicate(params ParameterProvider, batch, n int) (galEls []uint64) + func GaloisElementsForTrace(params ParameterProvider, logN int) (galEls []uint64) + func GenModuli(LogN, LogNthRoot int, logQ, logP []int, have map[uint64]bool) (q, p []uint64, err error) + func NTTSparseAndMontgomery(r ring.RNSRing, metadata *MetaData, pol ring.RNSPoly) + func NoiseCiphertext(ct *Ciphertext, pt *Plaintext, sk *SecretKey, params Parameters) (noise float64) + func NoiseEvaluationKey(evk *EvaluationKey, skIn, skOut *SecretKey, params Parameters) float64 + func NoiseGadgetCiphertext(gct *GadgetCiphertext, pt ring.RNSPoly, sk *SecretKey, params Parameters) float64 + func NoiseGaloisKey(gk *GaloisKey, sk *SecretKey, params Parameters) float64 + func NoisePublicKey(pk *PublicKey, sk *SecretKey, params Parameters) (noise float64) + func NoiseRelinearizationKey(rlk *RelinearizationKey, sk *SecretKey, params Parameters) float64 + func Norm(ct *Ciphertext, dec *Decryptor) (std, min, max float64) + func NormStats(vec []big.Int) (float64, float64, float64) + type Ciphertext struct + func GetSmallestLargest(el0, el1 *Ciphertext) (smallest, largest *Ciphertext, sameDegree bool) + func NewCiphertext(params ParameterProvider, Degree, LevelQ, LevelP int) (ct *Ciphertext) + func NewCiphertextAtLevelFromPoly(LevelQ, LevelP int, pQ, pP []ring.RNSPoly) (*Ciphertext, error) + func (ct *Ciphertext) AsCiphertext() *Ciphertext + func (ct *Ciphertext) AsPlaintext() *Plaintext + func (ct *Ciphertext) AsVector() *ring.Vector + func (ct *Ciphertext) BinarySize() (size int) + func (ct *Ciphertext) BufferSize(params ParameterProvider, Degree, LevelQ, LevelP int) int + func (ct *Ciphertext) Clone() *Ciphertext + func (ct *Ciphertext) ConcatPtoQ(n int) *Ciphertext + func (ct *Ciphertext) ConcatQtoP(n int) *Ciphertext + func (ct *Ciphertext) Copy(other *Ciphertext) + func (ct *Ciphertext) Degree() int + func (ct *Ciphertext) Equal(other *Ciphertext) bool + func (ct *Ciphertext) FromBuffer(params ParameterProvider, Degree, LevelQ, LevelP int, buf []uint64) + func (ct *Ciphertext) MarshalBinary() (data []byte, err error) + func (ct *Ciphertext) Randomize(params ParameterProvider, source *sampling.Source) + func (ct *Ciphertext) ReadFrom(r io.Reader) (n int64, err error) + func (ct *Ciphertext) ResizeDegree(degree int) + func (ct *Ciphertext) SwitchRingDegree(rQ, rP ring.RNSRing, buff []uint64, ctOut *Ciphertext) + func (ct *Ciphertext) UnmarshalBinary(p []byte) (err error) + func (ct *Ciphertext) WriteTo(w io.Writer) (n int64, err error) + type CiphertextWrapper interface + AsCiphertext func() *Ciphertext + type CompressionInfos struct + Pi structs.Vector[uint64] + Qi structs.Vector[uint64] + Seed [32]byte + func (c *CompressionInfos) ReadFrom(r io.Reader) (n int64, err error) + func (c *CompressionInfos) UnmarshalBinary(p []byte) (err error) + func (c CompressionInfos) BinarySize() (size int) + func (c CompressionInfos) MarshalBinary() (data []byte, err error) + func (c CompressionInfos) WriteTo(w io.Writer) (n int64, err error) + type Decryptor struct + func NewDecryptor(params ParameterProvider, sk *SecretKey) *Decryptor + func (d Decryptor) Decrypt(ct *Ciphertext, pt *Plaintext) + func (d Decryptor) DecryptNew(ct *Ciphertext) (pt *Plaintext) + func (d Decryptor) GetRLWEParameters() *Parameters + func (d Decryptor) ShallowCopy() *Decryptor + func (d Decryptor) WithKey(sk *SecretKey) *Decryptor + type DigitDecomposition struct + Log2Basis int + Type DigitDecompositionType + func ResolveEvaluationKeyParameters(params ParameterProvider, evkParams []EvaluationKeyParameters) (int, int, DigitDecomposition) + func (dd DigitDecomposition) ToString() string + type DigitDecompositionType int + type Distribution struct + AbsBound float64 + Std float64 + func NewDistribution(params ring.DistributionParameters, logN int) (d Distribution) + type DistributionLiteral interface + type Element interface + AsCiphertext func() *Ciphertext + AsPlaintext func() *Plaintext + AsPoint func() *ring.Point + AsVector func() *ring.Vector + Degree func() int + Level func() int + LevelP func() int + LevelQ func() int + LogN func() int + N func() int + type EncryptionKey interface + type Encryptor struct + func NewEncryptor(params ParameterProvider, key EncryptionKey) *Encryptor + func (enc *Encryptor) WithSeededPublicRandomness(seed [32]byte) *Encryptor + func (enc *Encryptor) WithSeededSecretRandomness(seed [32]byte) *Encryptor + func (enc Encryptor) Encrypt(pt *Plaintext, ct interface{}) (err error) + func (enc Encryptor) EncryptZero(ct interface{}) (err error) + func (enc Encryptor) GetRLWEParameters() *Parameters + func (enc Encryptor) KeySwitch(key *SecretKey, eFlood float64, ct *Ciphertext) (err error) + func (enc Encryptor) ShallowCopy() *Encryptor + func (enc Encryptor) WithKey(key EncryptionKey) *Encryptor + type EncryptorBuffers struct + BuffP [4]ring.RNSPoly + BuffQ [3]ring.RNSPoly + type EvaluationKey struct + func NewEvaluationKey(params ParameterProvider, evkParams ...EvaluationKeyParameters) (evk *EvaluationKey) + func (evk *EvaluationKey) BufferSize(params ParameterProvider, evkParams ...EvaluationKeyParameters) int + func (evk *EvaluationKey) FromBuffer(params ParameterProvider, buf []uint64, evkParams ...EvaluationKeyParameters) + func (evk EvaluationKey) Clone() *EvaluationKey + func (evk EvaluationKey) Equal(other *EvaluationKey) bool + type EvaluationKeyParameters struct + LevelP *int + LevelQ *int + type EvaluationKeySet interface + GetGaloisKey func(galEl uint64) (evk *GaloisKey, err error) + GetGaloisKeysList func() (galEls []uint64) + GetRelinearizationKey func() (evk *RelinearizationKey, err error) + type Evaluator struct + Decomposers structs.Vector[ring.Decomposer] + RingP structs.Vector[ring.RNSRing] + func NewEvaluator(params ParameterProvider, evk EvaluationKeySet) (eval *Evaluator) + func (eval *Evaluator) GetRLWEParameters() *Parameters + func (eval Evaluator) ApplyEvaluationKey(ctIn *Ciphertext, evk *EvaluationKey, opOut *Ciphertext) (err error) + func (eval Evaluator) Automorphism(ctIn *Ciphertext, galEl uint64, opOut *Ciphertext) (err error) + func (eval Evaluator) AutomorphismHoisted(ctIn *Ciphertext, buf HoistingBuffer, galEl uint64, opOut *Ciphertext) (err error) + func (eval Evaluator) AutomorphismHoistedLazy(LevelQ int, ctIn *Ciphertext, buf HoistingBuffer, galEl uint64, ...) (err error) + func (eval Evaluator) AutomorphismIndex(galEl uint64) []uint64 + func (eval Evaluator) CheckAndGetGaloisKey(galEl uint64) (evk *GaloisKey, err error) + func (eval Evaluator) CheckAndGetRelinearizationKey() (evk *RelinearizationKey, err error) + func (eval Evaluator) DecomposeSingleNTT(LevelQ, LevelP, BaseRNSDecompositionVectorSize int, ...) + func (eval Evaluator) FillHoistingBuffer(LevelQ, LevelP int, cx ring.RNSPoly, cxIsNTT bool, buf HoistingBuffer) + func (eval Evaluator) GadgetProduct(LevelQ int, cx ring.RNSPoly, cxIsNTT bool, gadgetCt *GadgetCiphertext, ...) + func (eval Evaluator) GadgetProductHoisted(LevelQ int, buf HoistingBuffer, gadgetCt *GadgetCiphertext, ct *Ciphertext) + func (eval Evaluator) GadgetProductHoistedLazy(LevelQ int, overwrite bool, buf HoistingBuffer, gadgetCt *GadgetCiphertext, ...) (err error) + func (eval Evaluator) GadgetProductLazy(LevelQ int, overwrite bool, cx ring.RNSPoly, cxIsNTT bool, ...) (err error) + func (eval Evaluator) GetBuffCt() *Ciphertext + func (eval Evaluator) GetBuffP() [6]ring.RNSPoly + func (eval Evaluator) GetBuffQ() [6]ring.RNSPoly + func (eval Evaluator) GetEvaluatorBuffer() *EvaluatorBuffers + func (eval Evaluator) InitOutputBinaryOp(op0, op1 *Ciphertext, opInTotalMaxDegree int, opOut *Ciphertext) (degree, level int, err error) + func (eval Evaluator) InitOutputUnaryOp(op0, opOut *Ciphertext) (degree, level int, err error) + func (eval Evaluator) InnerFunction(ctIn []Ciphertext, batchSize, n int, f func(a, b, c []Ciphertext) (err error), ...) (err error) + func (eval Evaluator) InnerSum(ctIn *Ciphertext, batchSize, n int, buf HoistingBuffer, opOut *Ciphertext) (err error) + func (eval Evaluator) ModDown(LevelQ, LevelP int, elQP, elQ *Ciphertext) + func (eval Evaluator) ModDownNTT(LevelQ, LevelP int, p1Q, p1P, p2Q ring.RNSPoly) + func (eval Evaluator) NewHoistingBuffer(LevelQ, LevelP int) (buf HoistingBuffer) + func (eval Evaluator) PrecomputeLevelAware(LevelQ int, gadgetCt *GadgetCiphertext, buf []uint64) *GadgetCiphertext + func (eval Evaluator) Relinearize(ctIn, opOut *Ciphertext) (err error) + func (eval Evaluator) RelinearizeInplace(op *Ciphertext, c2 ring.RNSPoly) (err error) + func (eval Evaluator) Replicate(ctIn *Ciphertext, batchSize, n int, buf HoistingBuffer, opOut *Ciphertext) (err error) + func (eval Evaluator) ShallowCopy() *Evaluator + func (eval Evaluator) Trace(ctIn *Ciphertext, logN int, opOut *Ciphertext) (err error) + func (eval Evaluator) WithKey(evk EvaluationKeySet) *Evaluator + type EvaluatorBuffers struct + BuffCt *Ciphertext + BuffDigitDecomp [2][]uint64 + BuffGadgetCt []uint64 + BuffGadgetP [2]ring.RNSPoly + BuffGadgetQP [2]ring.RNSPoly + BuffInvNTT ring.RNSPoly + BuffModDownP ring.RNSPoly + BuffModDownQ ring.RNSPoly + BuffNTT ring.RNSPoly + BuffP [6]ring.RNSPoly + BuffQ [6]ring.RNSPoly + func NewEvaluatorBuffers(p Parameters) *EvaluatorBuffers + type GadgetCiphertext struct + CoalescingConstant ring.RNSScalar + CoalescingFactor int + func NewGadgetCiphertext(params ParameterProvider, Degree, LevelQ, LevelP int, DD DigitDecomposition) (ct *GadgetCiphertext) + func (ct *GadgetCiphertext) At(i, j int) (el *Ciphertext) + func (ct *GadgetCiphertext) BinarySize() (dataLen int) + func (ct *GadgetCiphertext) BufferSize(params ParameterProvider, Degree, LevelQ, LevelP int, DD DigitDecomposition) (size int) + func (ct *GadgetCiphertext) Clone() (ctCopy *GadgetCiphertext) + func (ct *GadgetCiphertext) Coalesce(params ParameterProvider, LevelQ, coalescing int, buf []uint64) (coalesced *GadgetCiphertext) + func (ct *GadgetCiphertext) ConcatPtoQ(n int) *GadgetCiphertext + func (ct *GadgetCiphertext) ConcatQtoP(n int) *GadgetCiphertext + func (ct *GadgetCiphertext) Degree() int + func (ct *GadgetCiphertext) Dims() (dims []int) + func (ct *GadgetCiphertext) DropGadget(n int) *GadgetCiphertext + func (ct *GadgetCiphertext) Equal(other *GadgetCiphertext) bool + func (ct *GadgetCiphertext) FromBuffer(params ParameterProvider, Degree, LevelQ, LevelP int, DD DigitDecomposition, ...) + func (ct *GadgetCiphertext) LevelP() int + func (ct *GadgetCiphertext) LevelQ() int + func (ct *GadgetCiphertext) LogN() int + func (ct *GadgetCiphertext) MarshalBinary() (data []byte, err error) + func (ct *GadgetCiphertext) OptimalCoalescingFactor(LevelQ int) (coalescing int) + func (ct *GadgetCiphertext) ReadFrom(r io.Reader) (n int64, err error) + func (ct *GadgetCiphertext) UnmarshalBinary(p []byte) (err error) + func (ct *GadgetCiphertext) WriteTo(w io.Writer) (n int64, err error) + type GadgetPlaintext struct + Value structs.Vector[ring.RNSPoly] + func NewGadgetPlaintext(p Parameters, value interface{}, LevelQ, LevelP int, dd DigitDecomposition) (pt *GadgetPlaintext, err error) + type GaloisKey struct + GaloisElement uint64 + NthRoot uint64 + func NewGaloisKey(params ParameterProvider, evkParams ...EvaluationKeyParameters) (gk *GaloisKey) + func (gk *GaloisKey) BufferSize(params ParameterProvider, evkParams ...EvaluationKeyParameters) int + func (gk *GaloisKey) FromBuffer(params ParameterProvider, buf []uint64, evkParams ...EvaluationKeyParameters) + func (gk *GaloisKey) ReadFrom(r io.Reader) (n int64, err error) + func (gk *GaloisKey) UnmarshalBinary(p []byte) (err error) + func (gk GaloisKey) BinarySize() (size int) + func (gk GaloisKey) Clone() *GaloisKey + func (gk GaloisKey) Equal(other *GaloisKey) bool + func (gk GaloisKey) MarshalBinary() (p []byte, err error) + func (gk GaloisKey) WriteTo(w io.Writer) (n int64, err error) + type HoistingBuffer structs.Vector[ring.Point] + type KeyGenerator struct + Point ring.Point + func NewKeyGenerator(params ParameterProvider) *KeyGenerator + func (kgen *KeyGenerator) GenSecretKeyWithHammingWeightNew(hw int) (sk *SecretKey) + func (kgen KeyGenerator) GenEvaluationKey(skInput, skOutput *SecretKey, evk *EvaluationKey) + func (kgen KeyGenerator) GenEvaluationKeyNew(skInput, skOutput *SecretKey, evkParams ...EvaluationKeyParameters) (evk *EvaluationKey) + func (kgen KeyGenerator) GenEvaluationKeysForRingSwapNew(skStd, skConjugateInvariant *SecretKey, evkParams ...EvaluationKeyParameters) (stdToci, ciToStd *EvaluationKey) + func (kgen KeyGenerator) GenGaloisKey(galEl uint64, sk *SecretKey, gk *GaloisKey) + func (kgen KeyGenerator) GenGaloisKeyNew(galEl uint64, sk *SecretKey, evkParams ...EvaluationKeyParameters) (gk *GaloisKey) + func (kgen KeyGenerator) GenGaloisKeys(galEls []uint64, sk *SecretKey, gks []*GaloisKey) + func (kgen KeyGenerator) GenGaloisKeysNew(galEls []uint64, sk *SecretKey, evkParams ...EvaluationKeyParameters) (gks []*GaloisKey) + func (kgen KeyGenerator) GenKeyPairNew() (sk *SecretKey, pk *PublicKey) + func (kgen KeyGenerator) GenPublicKey(sk *SecretKey, pk *PublicKey) + func (kgen KeyGenerator) GenPublicKeyNew(sk *SecretKey) (pk *PublicKey) + func (kgen KeyGenerator) GenRelinearizationKey(sk *SecretKey, rlk *RelinearizationKey) + func (kgen KeyGenerator) GenRelinearizationKeyNew(sk *SecretKey, evkParams ...EvaluationKeyParameters) (rlk *RelinearizationKey) + func (kgen KeyGenerator) GenSecretKey(sk *SecretKey) + func (kgen KeyGenerator) GenSecretKeyFromSampler(sampler ring.Sampler, sk *SecretKey) + func (kgen KeyGenerator) GenSecretKeyNew() (sk *SecretKey) + func (kgen KeyGenerator) GenSecretKeyWithHammingWeight(hw int, sk *SecretKey) + func (kgen KeyGenerator) ShallowCopy() *KeyGenerator + type MemEvaluationKeySet struct + GaloisKeys structs.Map[uint64, GaloisKey] + RelinearizationKey *RelinearizationKey + func NewMemEvaluationKeySet(relinKey *RelinearizationKey, galoisKeys ...*GaloisKey) (eks *MemEvaluationKeySet) + func (evk *MemEvaluationKeySet) ReadFrom(r io.Reader) (n int64, err error) + func (evk *MemEvaluationKeySet) UnmarshalBinary(p []byte) (err error) + func (evk MemEvaluationKeySet) BinarySize() (size int) + func (evk MemEvaluationKeySet) GetGaloisKey(galEl uint64) (gk *GaloisKey, err error) + func (evk MemEvaluationKeySet) GetGaloisKeysList() (galEls []uint64) + func (evk MemEvaluationKeySet) GetRelinearizationKey() (rk *RelinearizationKey, err error) + func (evk MemEvaluationKeySet) MarshalBinary() (p []byte, err error) + func (evk MemEvaluationKeySet) WriteTo(w io.Writer) (n int64, err error) + type MetaData struct + IsBatched bool + IsMontgomery bool + IsNTT bool + LogDimensions ring.Dimensions + Scale Scale + func (m *MetaData) Clone() *MetaData + func (m *MetaData) Equal(other *MetaData) (res bool) + func (m *MetaData) ReadFrom(r io.Reader) (n int64, err error) + func (m *MetaData) UnmarshalBinary(p []byte) (err error) + func (m MetaData) BinarySize() int + func (m MetaData) LogScale() float64 + func (m MetaData) LogSlots() int + func (m MetaData) MarshalBinary() (p []byte, err error) + func (m MetaData) Slots() int + func (m MetaData) WriteTo(w io.Writer) (n int64, err error) + type Operand interface + type ParameterProvider interface + GetRLWEParameters func() *Parameters + type Parameters struct + func NewCustomParameters(LogN int, qi, pi []uint64, xe, xs Distribution, ringQ, ringP ring.RNSRing, ...) Parameters + func NewParameters(logn int, q, p []uint64, xs, xe DistributionLiteral, ringType ring.Type, ...) (params Parameters, err error) + func NewParametersFromLiteral(paramDef ParametersLiteral) (params Parameters, err error) + func (p *Parameters) ReadFrom(r io.Reader) (n int64, err error) + func (p *Parameters) UnmarshalBinary(data []byte) (err error) + func (p *Parameters) UnmarshalJSON(data []byte) (err error) + func (p Parameters) BinarySize() int + func (p Parameters) CoalescedRingP(coalescing int) ring.RNSRing + func (p Parameters) DecompositionMatrixDimensions(levelQ, levelP int, dd DigitDecomposition) (dims []int) + func (p Parameters) DefaultScale() Scale + func (p Parameters) Equal(other *Parameters) (res bool) + func (p Parameters) GaloisElement(k int) uint64 + func (p Parameters) GaloisElementOrderTwoOrthogonalSubgroup() uint64 + func (p Parameters) GaloisElements(k []int) (galEls []uint64) + func (p Parameters) GetRLWEParameters() *Parameters + func (p Parameters) LogN() int + func (p Parameters) LogNthRoot() int + func (p Parameters) LogP() (logp float64) + func (p Parameters) LogPi() (logpi []int) + func (p Parameters) LogQ() (logq float64) + func (p Parameters) LogQP() (logqp float64) + func (p Parameters) LogQi() (logqi []int) + func (p Parameters) MarshalBinary() (data []byte, err error) + func (p Parameters) MarshalJSON() ([]byte, error) + func (p Parameters) MaxBit(levelQ, levelP int) (c int) + func (p Parameters) MaxCoalescing() (maxCoalescing int) + func (p Parameters) MaxLevel() int + func (p Parameters) MaxLevelP() int + func (p Parameters) MaxLevelQ() int + func (p Parameters) ModInvGaloisElement(galEl uint64) uint64 + func (p Parameters) N() int + func (p Parameters) NTTFlag() bool + func (p Parameters) NewScale(scale interface{}) Scale + func (p Parameters) NoiseBound() float64 + func (p Parameters) NoiseFreshPK() (std float64) + func (p Parameters) NoiseFreshSK() (std float64) + func (p Parameters) NthRoot() int + func (p Parameters) P() []uint64 + func (p Parameters) PBigInt() *big.Int + func (p Parameters) PCount() int + func (p Parameters) ParametersLiteral() ParametersLiteral + func (p Parameters) PiOverflowMargin(level int) int + func (p Parameters) Q() []uint64 + func (p Parameters) QBigInt() *big.Int + func (p Parameters) QCount() int + func (p Parameters) QP() []uint64 + func (p Parameters) QPBigInt() *big.Int + func (p Parameters) QPCount() int + func (p Parameters) QiOverflowMargin(level int) int + func (p Parameters) RingP() ring.RNSRing + func (p Parameters) RingPAtLevel(LevelP int) (rP ring.RNSRing) + func (p Parameters) RingQ() ring.RNSRing + func (p Parameters) RingQAtLevel(LevelQ int) (rQ ring.RNSRing) + func (p Parameters) RingType() ring.Type + func (p Parameters) SolveDiscreteLogGaloisElement(galEl uint64) (k int) + func (p Parameters) StandardParameters() (pci Parameters, err error) + func (p Parameters) UnpackLevelParams(args []int) (levelQ, levelP int) + func (p Parameters) WriteTo(w io.Writer) (n int64, err error) + func (p Parameters) Xe() ring.DistributionParameters + func (p Parameters) Xs() ring.DistributionParameters + func (p Parameters) XsHammingWeight() int + type ParametersLiteral struct + DefaultScale Scale + LogN int + LogNthRoot int + LogP structs.Vector[int] + LogQ structs.Vector[int] + NTTFlag bool + P structs.Vector[uint64] + Q structs.Vector[uint64] + RingType ring.Type + Xe ring.DistributionParameters + Xs ring.DistributionParameters + func (p *ParametersLiteral) ReadFrom(r io.Reader) (n int64, err error) + func (p *ParametersLiteral) UnmarshalBinary(data []byte) (err error) + func (p *ParametersLiteral) UnmarshalJSON(b []byte) (err error) + func (p ParametersLiteral) BinarySize() (size int) + func (p ParametersLiteral) MarshalBinary() (data []byte, err error) + func (p ParametersLiteral) WriteTo(w io.Writer) (n int64, err error) + type Plaintext struct + func NewPlaintext(params ParameterProvider, LevelQ, LevelP int) (pt *Plaintext) + func NewPlaintextAtLevelFromPoly(LevelQ, LevelP int, pQ, pP ring.RNSPoly) (pt *Plaintext, err error) + func (pt *Plaintext) AsCiphertext() *Ciphertext + func (pt *Plaintext) AsPlaintext() *Plaintext + func (pt *Plaintext) AsPoint() *ring.Point + func (pt *Plaintext) BufferSize(params ParameterProvider, LevelQ, LevelP int) int + func (pt *Plaintext) FromBuffer(params ParameterProvider, LevelQ, LevelP int, buf []uint64) + func (pt *Plaintext) Randomize(params ParameterProvider, source *sampling.Source) + func (pt *Plaintext) ReadFrom(r io.Reader) (n int64, err error) + func (pt *Plaintext) UnmarshalBinary(p []byte) (err error) + func (pt Plaintext) BinarySize() (size int) + func (pt Plaintext) Clone() (ptCpy *Plaintext) + func (pt Plaintext) Degree() int + func (pt Plaintext) MarshalBinary() (data []byte, err error) + func (pt Plaintext) WriteTo(w io.Writer) (n int64, err error) + type PlaintextWrapper interface + AsPlaintext func() *Plaintext + type PublicKey struct + func NewPublicKey(params ParameterProvider) (pk *PublicKey) + func (pk *PublicKey) AsCiphertext() *Ciphertext + func (pk *PublicKey) BufferSize(params ParameterProvider) int + func (pk *PublicKey) FromBuffer(params ParameterProvider, buf []uint64) + func (pk *PublicKey) ReadFrom(r io.Reader) (n int64, err error) + func (pk *PublicKey) UnmarshalBinary(p []byte) (err error) + func (pk PublicKey) BinarySize() (size int) + func (pk PublicKey) Clone() *PublicKey + func (pk PublicKey) MarshalBinary() (data []byte, err error) + func (pk PublicKey) WriteTo(w io.Writer) (n int64, err error) + type RelinearizationKey struct + func NewRelinearizationKey(params ParameterProvider, evkParams ...EvaluationKeyParameters) (rlk *RelinearizationKey) + func (rlk *RelinearizationKey) BufferSize(params ParameterProvider, evkParams ...EvaluationKeyParameters) int + func (rlk *RelinearizationKey) FromBuffer(params ParameterProvider, buf []uint64, evkParams ...EvaluationKeyParameters) + func (rlk RelinearizationKey) Clone() *RelinearizationKey + func (rlk RelinearizationKey) Equal(other *RelinearizationKey) bool + type Scale struct + Mod *big.Int + Value big.Float + func NewScale(s interface{}) Scale + func NewScaleModT(s interface{}, mod uint64) Scale + func (s *Scale) ReadFrom(r io.Reader) (n int64, err error) + func (s *Scale) UnmarshalBinary(p []byte) (err error) + func (s Scale) BigInt() (sInt *big.Int) + func (s Scale) BinarySize() int + func (s Scale) Cmp(s1 Scale) (cmp int) + func (s Scale) Div(s1 Scale) Scale + func (s Scale) Equal(s1 Scale) bool + func (s Scale) Float64() float64 + func (s Scale) InDelta(s1 Scale, log2Delta float64) bool + func (s Scale) Log2() float64 + func (s Scale) Log2Delta(s1 Scale) float64 + func (s Scale) MarshalBinary() (p []byte, err error) + func (s Scale) MarshalJSON() (p []byte, err error) + func (s Scale) Max(s1 Scale) (max Scale) + func (s Scale) Min(s1 Scale) (max Scale) + func (s Scale) Mul(s1 Scale) Scale + func (s Scale) Uint64() uint64 + func (s Scale) UnnMarshalJSON(p []byte) (err error) + func (s Scale) WriteTo(w io.Writer) (n int64, err error) + type SecretKey struct + func NewSecretKey(params ParameterProvider) (sk *SecretKey) + func (sk *SecretKey) AsPlaintext() *Plaintext + func (sk *SecretKey) BufferSize(params ParameterProvider) int + func (sk *SecretKey) FromBuffer(params ParameterProvider, buf []uint64) + func (sk *SecretKey) ReadFrom(r io.Reader) (n int64, err error) + func (sk *SecretKey) UnmarshalBinary(p []byte) (err error) + func (sk SecretKey) BinarySize() (size int) + func (sk SecretKey) Clone() *SecretKey + func (sk SecretKey) Equal(other *SecretKey) bool + func (sk SecretKey) MarshalBinary() (data []byte, err error) + func (sk SecretKey) WriteTo(w io.Writer) (n int64, err error)