MTGP  1.1.1
Functions
mtgp-calc-jump.hpp File Reference

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.

Detailed Description

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.

Author:
Mutsuo Saito (Hiroshima University)
Makoto Matsumoto (The University of Tokyo)

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


Function Documentation

static void calc_jump ( uint32_t  array[],
int  size,
NTL::ZZ &  step,
NTL::GF2X &  characteristic 
)
inlinestatic

calculate the jump polynomial.

Parameters:
[out]arrayoutput string which represents jump polynomial.
[in]sizemax size of array
[in]stepjump step of internal state
[in]characteristiccharacteristic polynomial

References polytoarray().

static void calc_jump ( std::string &  jump_str,
NTL::ZZ &  step,
NTL::GF2X &  characteristic 
)
inlinestatic

calculate the jump polynomial.

Parameters:
[out]jump_stroutput string which represents jump polynomial.
[in]stepjump step of internal state
[in]characteristiccharacteristic polynomial

References polytostring().

static void polytoarray ( uint32_t  array[],
int  size,
NTL::GF2X &  polynomial 
)
inlinestatic

Convert polynomial to 32-bit unsigned array.

Resulted array is used in kernel functions of cuda and OpenCL.

Parameters:
[out]arrayarray format polynomial
[in]sizemax size of array
polynomialpolynomial

Referenced by calc_jump().

static void polytostring ( std::string &  x,
NTL::GF2X &  polynomial 
)
inlinestatic

convert polynomial to string

Parameters:
[out]xoutput string
[in]polynomialpolynomial

Referenced by calc_jump().

static void stringtopoly ( NTL::GF2X &  poly,
std::string &  str 
)
inlinestatic

converts string to polynomial

Parameters:
[in]strstring
[out]polyoutput polynomial