1 #ifndef MTGP_CALC_JUMP_HPP
2 #define MTGP_CALC_JUMP_HPP
34 static inline void polytostring(std::string& x, NTL::GF2X& polynomial)
39 long degree = deg(polynomial);
43 for (
int i = 0; i <= degree; i++) {
49 if (IsOne(coeff(polynomial, i))) {
69 NTL::GF2X& polynomial)
74 long degree = deg(polynomial);
77 }
else if (size < degree / 32 + 1) {
81 for (
int i = 0; i < size; i++) {
84 for (
int i = 0; i <= degree; i++) {
87 if (IsOne(coeff(polynomial, i))) {
88 array[index] |= 1 << pos;
103 stringstream ss(str);
117 for (
int j = 0; j < 4; j++) {
119 SetCoeff(poly, p, 1);
121 SetCoeff(poly, p, 0);
138 NTL::GF2X& characteristic)
143 PowerXMod(jump, step, characteristic);
155 NTL::GF2X& characteristic)
160 PowerXMod(jump, step, characteristic);