RLWE

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 4 Imported by: 2

Documentation

Index

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 EncPack

func EncPack(v []int64, tau int, scale float64, encryptorRLWE rlwe.Encryptor, ringQ *ring.Ring, params rlwe.Parameters) *rlwe.Ciphertext

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL