Questions tagged [ntl]

NTL is a high-performance, portable C++ library licensed under GPL providing data structures and algorithms for arbitrary length integers; for vectors, matrices, and polynomials over the integers and over finite fields; and for arbitrary precision floating point arithmetic.

NTL (A Library For Doing Number Theory) is a high-performance, portable C++ library licensed under GPL providing data structures and algorithms for arbitrary length integers; for vectors, matrices, and polynomials over the integers and over finite fields; and for arbitrary precision floating point arithmetic.

See https://libntl.org/ for more details.

81 questions
16
votes
1 answer

"Polynomial too big for FFT" error on NTL

I'm trying to perform a multiplication of polynomials of degree 4096 using ZZ_pEX class from NTL. However, it returns the error "Polynomial too big for FFT", and I couldn't find a way to make it works (or even something that could help on NTL's…
Pedro Alves
  • 1,667
  • 4
  • 17
  • 37
4
votes
1 answer

Exponentiation of polynomials, RR and ZZ in NTL library

I am using the NTL library for a RSA cryptanalysis implementation. But I am running into some problems frequently regarding type mismatch/incompatibility. Eg- I need RR type value of n^((h-1.0)/(h*k-1.0)) where n is type ZZ, and h and k are int.…
Sapta
  • 41
  • 2
3
votes
1 answer

Conflict std::set and NTL::vec_ZZ

I am trying to use std::set for arbitrary-length integer vectors defined from the NTL-Library and for some reason it doesn't work. It works totally fine with the ZZ integers defined by the library: #include #include…
john_leo
  • 157
  • 3
3
votes
1 answer

Error using boost serialization with binary archive

I get the following error while reading from boost::archive::binary_iarchive into my variable: test-serialization(9285,0x11c62fdc0) malloc: can't allocate region *** mach_vm_map(size=18014398509486080) failed (error…
3
votes
1 answer

NTL library GF2X

I am experimenting with the Galois Field using the NTL library. GF2 are the integers mod 2, GF2X are polynomials over GF2 and GF2E is the ring/field extension over GF2. The problem that I am facing is that I initialize the irreducible polynomial as…
m0ur
  • 97
  • 2
  • 11
3
votes
1 answer

Convert between GMP's mpz_t and NTL's ZZ

I'm extending a small library using NTL and GMP. I'm using NTL for convenience (and to conform to existing APIs), but I'll be switching to GMP (and MPFR) for the really performance-critical stuff. I'm using GMP as a long integer backend for NTL…
pg1989
  • 1,010
  • 6
  • 13
3
votes
1 answer

c++ Set not compiling properly

I am creating a data structure but when I try and compile I get an error saying that I haven't specified that type of set that I am initializing. I am working with the NTL library with is used for large numbers. This is my code: #include…
Schuyler
  • 509
  • 1
  • 9
  • 19
3
votes
2 answers

How to convert ZZ to binary?

I'm using the NTL library to implement my code and I have to ZZ number which I have to convert to binary then take a substring from it and convert that substring into decimal. How can I do that? ZZ N; unsigned char…
Pratibha
  • 1,730
  • 7
  • 27
  • 46
2
votes
1 answer

How to configuring NTL library in Visual Studio 2017

I have just installed Visual Studio 2017 and I want to use the NTL library. I have followed the steps described here (for VS2013). Compiling NTL library in Visual Studio 2013 As expected, it compiles (with several, I hope, negligible…
mir0soft
  • 73
  • 1
  • 1
  • 8
2
votes
0 answers

How to speed up a cyclotomic polynomial inversion in NTL?

I'm computing polynomial modular inverses in a ring built over the nth-cyclotomic polynomial, with n power of 2. These inverses are computed for polynomials with the coefficient of x^0 equal to (x+1) and others sampled from some random distribution…
Pedro Alves
  • 1,667
  • 4
  • 17
  • 37
2
votes
1 answer

NTL String to ZZ conversion and ZZ to String

So I'm working on a basic RSA decryption program and I'm trying to figure out how to convert between a string and a ZZ. I've looked at the following question: How can i convert a string into a ZZ number?, however, I'm a little confused, and the…
mwcurtis65
  • 23
  • 1
  • 3
2
votes
1 answer

LLL algorithm in NTL library

I am learning to use the NTL library currently, especially for the LLL algorithm later. Does anyone have any idea of the usage of the LLL function in the NTL library? Thanks in advance.
meta_warrior
  • 389
  • 1
  • 6
  • 18
2
votes
3 answers

square root of a finite field element in C++

Is there any implementation of a method to obtain the square root of an element from a finite field. Programmed in C++ I was using NTL but the do not provide a method to do that. Thanks in advance
DaWNFoRCe
  • 151
  • 2
  • 11
2
votes
1 answer

NTL Galois Field elements iterate

I'm learning NTL and I have a doubt: How will I be able to get any specific element of any finite field? Here is my code GF2X P = BuildIrred_GF2X(256); GF2E::init(P); GF2E zero = GF2E::zero(); GF2E one; GF2E r = random_GF2E(); //I want change the…
Juan
  • 2,073
  • 3
  • 22
  • 37
2
votes
5 answers

Compiler errors using NTL library

I'm trying to use NTL library, but I always get compiler errors about undefined symbols. Example (taken from the NTL documentation): #include NTL_CLIENT int main() { ZZ a, b, c; cin >> a; cin >> b; c = (a+1)*(b+1); …
Bakuriu
  • 98,325
  • 22
  • 197
  • 231
1
2 3 4 5 6