Documentation
¶
Index ¶
- func Add(ctRLWE1 *rlwe.Ciphertext, ctRLWE2 *rlwe.Ciphertext, ctRLWE3 *rlwe.Ciphertext, ...) *rlwe.Ciphertext
- func AddVec(ctRLWE1 []*rlwe.Ciphertext, ctRLWE2 []*rlwe.Ciphertext, ...) []*rlwe.Ciphertext
- func Dec(ctRLWE []*rlwe.Ciphertext, decryptorRLWE rlwe.Decryptor, scale float64, ...) []float64
- func DecUnpack(ctRLWE *rlwe.Ciphertext, m int, tau int, decryptorRLWE rlwe.Decryptor, ...) []float64
- func Enc(v []int64, scale float64, encryptorRLWE rlwe.Encryptor, ringQ *ring.Ring, ...) []*rlwe.Ciphertext
- func EncPack(v []int64, tau int, scale float64, encryptorRLWE rlwe.Encryptor, ...) *rlwe.Ciphertext
- func UnpackCt(ctRLWE *rlwe.Ciphertext, n int, tau int, evaluatorRLWE *rlwe.Evaluator, ...) []*rlwe.Ciphertext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(ctRLWE1 *rlwe.Ciphertext, ctRLWE2 *rlwe.Ciphertext, ctRLWE3 *rlwe.Ciphertext, params rlwe.Parameters) *rlwe.Ciphertext
Add RLWE ciphertexts Input - ctRLWE1: RLWE ciphertext - ctRLWE2: RLWE ciphertext Output - ctOut: RLWE ciphertext
func AddVec ¶
func AddVec(ctRLWE1 []*rlwe.Ciphertext, ctRLWE2 []*rlwe.Ciphertext, ctRLWE3 []*rlwe.Ciphertext, params rlwe.Parameters) []*rlwe.Ciphertext
Add RLWE vectors Input - ctRLWE1: n x 1 RLWE vector - ctRLWE2: n x 1 RLWE vector - ctRLWE3: n x 1 RLWE vector Output - ctOut: n x 1 RLWE vector
func Dec ¶
func Dec(ctRLWE []*rlwe.Ciphertext, decryptorRLWE rlwe.Decryptor, scale float64, ringQ *ring.Ring, params rlwe.Parameters) []float64
1) Decrypt RLWE vector -> integer vector 2) Map constant terms of integer vector [0,q/2) -> [-q/2, q/2) 3) Scale down Input - ctRLWE: n x 1 RLWE vector Output - valOut: n x 1 float vector
func DecUnpack ¶
func DecUnpack(ctRLWE *rlwe.Ciphertext, m int, tau int, decryptorRLWE rlwe.Decryptor, scale float64, ringQ *ring.Ring, params rlwe.Parameters) []float64
1) Decrypt RLWE ciphertext 2) Unpack first m slots -> integer vector 3) rescale Input - ctRLWE: RLWE Output - valOut: m x 1 float vector
func Enc ¶
func Enc(v []int64, scale float64, encryptorRLWE rlwe.Encryptor, ringQ *ring.Ring, params rlwe.Parameters) []*rlwe.Ciphertext
return ctOut }
func UnpackCt ¶
func UnpackCt(ctRLWE *rlwe.Ciphertext, n int, tau int, evaluatorRLWE *rlwe.Evaluator, ringQ *ring.Ring, monomials []ring.Poly, params rlwe.Parameters) []*rlwe.Ciphertext
Unpack RLWE ciphertext Input - ctRLWE: RLWE ciphertext - tau : # of total packing slots - n : # of packing slots to unpack Output - ctOut: n x 1 RLWE vector
Types ¶
This section is empty.