MTGP
1.1.1
|
functions for calculating jump polynomial. More...
#include <iostream>
#include <iomanip>
#include <sstream>
#include <NTL/GF2X.h>
Go to the source code of this file.
Functions | |
static void | polytostring (std::string &x, NTL::GF2X &polynomial) |
convert polynomial to string | |
static void | polytoarray (uint32_t array[], int size, NTL::GF2X &polynomial) |
Convert polynomial to 32-bit unsigned array. | |
static void | stringtopoly (NTL::GF2X &poly, std::string &str) |
converts string to polynomial | |
static void | calc_jump (uint32_t array[], int size, NTL::ZZ &step, NTL::GF2X &characteristic) |
calculate the jump polynomial. | |
static void | calc_jump (std::string &jump_str, NTL::ZZ &step, NTL::GF2X &characteristic) |
calculate the jump polynomial. |
functions for calculating jump polynomial.
calculate jump polynomial from jump step and the characteristic polynomial using PowerXMod.
jump polynomial p is calculated
p = Xs mod q,
where s is jump step and q is characteristic polynomial.
Copyright (C) 2012 Mutsuo Saito, Makoto Matsumoto, Hiroshima University and The University of Tokyo. All rights reserved.
The 3-clause BSD License is applied to this software, see LICENSE.txt
|
inlinestatic |
calculate the jump polynomial.
[out] | array | output string which represents jump polynomial. |
[in] | size | max size of array |
[in] | step | jump step of internal state |
[in] | characteristic | characteristic polynomial |
References polytoarray().
|
inlinestatic |
calculate the jump polynomial.
[out] | jump_str | output string which represents jump polynomial. |
[in] | step | jump step of internal state |
[in] | characteristic | characteristic polynomial |
References polytostring().
|
inlinestatic |
Convert polynomial to 32-bit unsigned array.
Resulted array is used in kernel functions of cuda and OpenCL.
[out] | array | array format polynomial |
[in] | size | max size of array |
polynomial | polynomial |
Referenced by calc_jump().
|
inlinestatic |
convert polynomial to string
[out] | x | output string |
[in] | polynomial | polynomial |
Referenced by calc_jump().
|
inlinestatic |
converts string to polynomial
[in] | str | string |
[out] | poly | output polynomial |