NTT Source for the NTTW C Library. More...
#include <stdio.h>
#include "number32.h"
#include "array.h"
#include "prime.h"
Go to the source code of this file.
Functions | |
void | rearrange (nttw_integer *data, const size_t n) |
Bit-reversal of Data of size n. n should be dyadic. | |
int | bigshr (nttw_integer *d, nttw_integer *s, const size_t n) |
Shifts s right one bit to d, returns carry bit. | |
nttw_integer | pow_mod (nttw_integer base, nttw_integer exp) |
Computers the power of the base modulo the defined MODULUS. | |
nttw_integer | pow_mod2 (nttw_integer base, nttw_integer exp, nttw_integer modulus) |
Computers the power of the base modulo the given modulus. | |
nttw_integer | pow_mod2_long (nttw_integer base, nttw_integer exp, nttw_integer modulus) |
Computers the power of the base modulo the given modulus. Force unsigned long long's in calculations. | |
nttw_integer | pow_mod_long (nttw_integer base, nttw_integer exp) |
Computers the power of the base modulo the given modulus. Big Integer version. | |
void | fntt (nttw_integer *data, const size_t nn, const nttw_integer pr, const int isign) |
Cooley-Tukey NTT. | |
void | fntt_2D (nttw_integer *data, nttw_integer *result, const size_t nn, const int isign) |
Computes the 2D Fast Number Theoretic Transform (FNTT) using the Cooley-Tukey algorithm. | |
void | fntt_prime (const nttw_integer *inData, nttw_integer *outData, const size_t p, const nttw_integer root, const nttw_integer primeDash, const nttw_integer proot, int isign, const int norm) |
Computes the Prime Length Fast Number Theoretic Transform (FNTT) using Rader's algorithm. | |
void | fntt_2D_prime (nttw_integer *data, nttw_integer *result, const size_t n, const nttw_integer root, const nttw_integer primeDash, const nttw_integer proot, const int isign, const int norm) |
Computes the 2D Prime Length Fast Number Theoretic Transform (FNTT) using Rader's algorithm. | |
nttw_integer * | padData_Rader (nttw_integer *data, const size_t p, const size_t newSize, const nttw_integer primeDash) |
Pads the data to the nearest highly composite length as needed by Rader's algorithm. | |
nttw_integer * | padTransformMatrix_Rader (nttw_integer *transData, const size_t p, const size_t newSize) |
Pads the transform matrix to the nearest highly composite length as needed by Rader's algorithm. | |
void | extractResult_Rader (nttw_integer *paddedData, nttw_integer *data, const size_t p) |
Extracts the data for the result from the padded result. | |
void | ntt_norm (nttw_integer *data, const size_t n) |
Normalises data of length n in the number field of MODULUS. |
NTT Source for the NTTW C Library.
NTTW NTT 32-bit Module
This file implements the functions for the Generic 32-bit Modulus NTTs.
This file is part of NTTW Library.
NTTW is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
NTTW is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with NTTW. If not, see <http://www.gnu.org/licenses/>.
Definition in file number32.c.