ntt

package
v0.0.0-...-27b77c7 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const NTTratio uint8 = 1

This value is the ratio between:

  • The degree n
  • The number of complex coefficients of the NTT

While here this ratio is 1, it is possible to develop a short NTT such that it is 2.

Variables

View Source
var (
	ErrDivByZero = errors.New("Division by zero")
)

Functions

func DivZq

func DivZq(f, g []int16) ([]int16, error)

Division of two polynomials (coefficient representation).

func INTT

func INTT(fNTT []int16) []int16

INTT compute the inverse NTT of a polynomial. fNTT: a NTT of a polynomial Format: input as NTT, output as coefficients

func MergeNTT

func MergeNTT(f_list_NTT [][]int16) []int16

MergeNTT merge two polynomials into a single polynomial f f_list_NTT: an array of polynomials Format: NTT

func MulZq

func MulZq(f, g []int16) []int16

Multiplication of two polynomials (coefficient representation).

func NTT

func NTT(f []int16) []int16

NTT compute the NTT of a polynomial f: a polynomial Format: input as coefficients, output as NTT

func SplitNTT

func SplitNTT(fNTT []int16) [][]int16

SplitNTT split a polynomial f in two or three polynomials fNTT: a polynomial Format: NTT

func SubZq

func SubZq(f, g []int16) []int16

Substraction of two polynomials (any representation).

Types

This section is empty.

Jump to

Keyboard shortcuts

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