PALISADE Lattice Crypto Library  1.11.9
A lattice crypto library for software engineers by software engineers.
Static Public Member Functions | Static Public Attributes | List of all members
lbcrypto::BluesteinFFT< VecType > Class Template Reference

Bluestein Fast Fourier Transform implemetation. More...

#include <transfrm.h>

Static Public Member Functions

static VecType ForwardTransform (const VecType &element, const IntType &root, const usint cycloOrder)
 
static VecType ForwardTransform (const VecType &element, const IntType &root, const usint cycloOrder, const ModulusRoot< IntType > &nttModulusRoot)
 
static VecType PadZeros (const VecType &a, const usint finalSize)
 
static VecType Resize (const VecType &a, usint lo, usint hi)
 
static void PreComputeDefaultNTTModulusRoot (usint cycloOrder, const IntType &modulus)
 Precomputes the modulus needed for NTT operation in forward Bluestein transform. More...
 
static void PreComputeRootTableForNTT (usint cycloOrder, const ModulusRoot< IntType > &nttModulusRoot)
 Precomputes the root of unity table needed for NTT operation in forward Bluestein transform. More...
 
static void PreComputePowers (usint cycloOrder, const ModulusRoot< IntType > &modulusRoot)
 precomputes the powers of root used in forward Bluestein transform. More...
 
static void PreComputeRBTable (usint cycloOrder, const ModulusRootPair< IntType > &modulusRootPair)
 precomputes the NTT transform of the power of root of unity used in the Bluestein transform. More...
 
static void Reset ()
 

Static Public Attributes

static std::map< ModulusRoot< IntType >, VecType > m_rootOfUnityTableByModulusRoot
 
static std::map< ModulusRoot< IntType >, VecType > m_rootOfUnityInverseTableByModulusRoot
 
static std::map< ModulusRoot< IntType >, VecType > m_powersTableByModulusRoot
 
static std::map< ModulusRootPair< IntType >, VecType > m_RBTableByModulusRootPair
 

Detailed Description

template<typename VecType>
class lbcrypto::BluesteinFFT< VecType >

Bluestein Fast Fourier Transform implemetation.

Member Function Documentation

◆ ForwardTransform()

template<typename VecType >
VecType lbcrypto::BluesteinFFT< VecType >::ForwardTransform ( const VecType &  element,
const IntType &  root,
const usint  cycloOrder 
)
static

Forward transform.

Parameters
elementis the element to perform the transform on.
rootOfUnityTablethe root of unity table.
cycloOrderis the cyclotomic order.
Returns
is the output result of the transform.

◆ PadZeros()

template<typename VecType >
VecType lbcrypto::BluesteinFFT< VecType >::PadZeros ( const VecType &  a,
const usint  finalSize 
)
static
Parameters
ais the input vector to be padded with zeros.
finalSizeis the length of the output vector.
Returns
output vector padded with (finalSize - initial size)additional zeros.

◆ PreComputeDefaultNTTModulusRoot()

template<typename VecType >
void lbcrypto::BluesteinFFT< VecType >::PreComputeDefaultNTTModulusRoot ( usint  cycloOrder,
const IntType &  modulus 
)
static

Precomputes the modulus needed for NTT operation in forward Bluestein transform.

Parameters
cycloOrderis the cyclotomic order of the polynomial.
modulusis the modulus of the polynomial.

◆ PreComputePowers()

template<typename VecType >
void lbcrypto::BluesteinFFT< VecType >::PreComputePowers ( usint  cycloOrder,
const ModulusRoot< IntType > &  modulusRoot 
)
static

precomputes the powers of root used in forward Bluestein transform.

Parameters
cycloOrderis the cyclotomic order of the polynomial ring.
modulusis the modulus of the polynomial ring.
rootis the root of unity s.t. root^2m = 1.

◆ PreComputeRBTable()

template<typename VecType >
void lbcrypto::BluesteinFFT< VecType >::PreComputeRBTable ( usint  cycloOrder,
const ModulusRootPair< IntType > &  modulusRootPair 
)
static

precomputes the NTT transform of the power of root of unity used in the Bluestein transform.

Parameters
cycloOrderis the cyclotomic order of the polynomial ring.
modulusis the modulus of the polynomial ring.
rootis the root of unity s.t. root^2m = 1.
bigModis the modulus required for the NTT transform.
bigRootis the root of unity required for the NTT transform.

◆ PreComputeRootTableForNTT()

template<typename VecType >
void lbcrypto::BluesteinFFT< VecType >::PreComputeRootTableForNTT ( usint  cycloOrder,
const ModulusRoot< IntType > &  nttModulusRoot 
)
static

Precomputes the root of unity table needed for NTT operation in forward Bluestein transform.

Parameters
cycloOrderis the cyclotomic order of the polynomial ring.
modulusis the modulus of the polynomial.

◆ Reset()

template<typename VecType >
void lbcrypto::BluesteinFFT< VecType >::Reset ( )
static

Reset cached values for the transform to empty.

◆ Resize()

template<typename VecType >
VecType lbcrypto::BluesteinFFT< VecType >::Resize ( const VecType &  a,
usint  lo,
usint  hi 
)
static
Parameters
ais the input vector to be resized.
lois lower coefficient index.
hiis higher coefficient index.
Returns
output vector s.t output vector = a[lo]...a[hi].

The documentation for this class was generated from the following files: