lwe

package
v0.0.0-...-026ee7b Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckParams

func CheckParams(logq uint64, nSamples uint64, pMod uint64) bool

func GaussSample32

func GaussSample32(src mrand.Source) int64

func GaussSample64

func GaussSample64(src mrand.Source) int64

Types

type Params

type Params struct {
	N     uint64  // LWE secret dimension
	Sigma float64 // LWE error distribution stddev
	M     uint64  // LWE samples supported

	Logq uint64 // (logarithm of) ciphertext modulus
	P    uint64 // plaintext modulus

	Delta uint64 // Plaintext multiplier
}

func NewParams

func NewParams(logq uint64, nSamples uint64) *Params

Output LWE parameters for Regev encryption where each ciphertext can support up to 'nSamples' homomorphic additions.

func NewParamsFixedP

func NewParamsFixedP(logq uint64, nSamples uint64, pMod uint64) *Params

func (*Params) PrintParams

func (p *Params) PrintParams()

func (*Params) Round

func (p *Params) Round(x uint64) uint64

Jump to

Keyboard shortcuts

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