Bluestein Fast Fourier Transform implemetation.
More...
#include <transfrm.h>
|
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 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 |
|
template<typename VecType>
class lbcrypto::BluesteinFFT< VecType >
Bluestein Fast Fourier Transform implemetation.
◆ ForwardTransform()
template<typename VecType >
VecType lbcrypto::BluesteinFFT< VecType >::ForwardTransform |
( |
const VecType & |
element, |
|
|
const IntType & |
root, |
|
|
const usint |
cycloOrder |
|
) |
| |
|
static |
Forward transform.
- Parameters
-
element | is the element to perform the transform on. |
rootOfUnityTable | the root of unity table. |
cycloOrder | is the cyclotomic order. |
- Returns
- is the output result of the transform.
◆ PadZeros()
template<typename VecType >
- Parameters
-
a | is the input vector to be padded with zeros. |
finalSize | is 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
-
cycloOrder | is the cyclotomic order of the polynomial. |
modulus | is 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
-
cycloOrder | is the cyclotomic order of the polynomial ring. |
modulus | is the modulus of the polynomial ring. |
root | is 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
-
cycloOrder | is the cyclotomic order of the polynomial ring. |
modulus | is the modulus of the polynomial ring. |
root | is the root of unity s.t. root^2m = 1. |
bigMod | is the modulus required for the NTT transform. |
bigRoot | is 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
-
cycloOrder | is the cyclotomic order of the polynomial ring. |
modulus | is the modulus of the polynomial. |
◆ Reset()
template<typename VecType >
Reset cached values for the transform to empty.
◆ Resize()
template<typename VecType >
- Parameters
-
a | is the input vector to be resized. |
lo | is lower coefficient index. |
hi | is 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:
- src/core/include/math/transfrm.h
- src/core/lib/math/transfrm.cpp