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
1
vote
1 answer

how can I calculate order of an element in finite field using ntl?

I'm trying to calculate order of an element in finite field (Group) using ntl. but I did not find any function to do this! can anyone guide me please?
1
vote
0 answers

clang fails to link Number Theory Library (Undefined symbols for architecture x86_64)

I'm trying to use the Number Theory Library (NTL) to do some research. I was using the g++ compiler until I realized I need to use the C++ random library (which apparently isn't included in g++). So I then switched to compiling with clang++ with…
1
vote
1 answer

converting ZZ (NTL) to a string in C

ZZ can output in c++ using cout << ZZ; because NTL is a c++ library. However, how can i output ZZ in C using printf, or convert ZZ to a string?
meta_warrior
  • 389
  • 1
  • 6
  • 18
1
vote
1 answer

Compiling NTL library in Visual Studio 2013

I have downloaded NTL version 6.1.0 from http://www.shoup.net/ntl/download.html and having trouble compiling it in Visual Studio 2013. The documentation (http://www.shoup.net/ntl/doc/tour-win.html) only shows how to compile NTL in MSVC++ 6 which is…
Wei-jye
  • 412
  • 1
  • 6
  • 23
1
vote
2 answers

How to initialize a NTL vector in one time?

In C, we can initialize a table with: int array[3]={1,2,3}; How can we do such a thing with NTL vectors? I guess I have declared the vector and already set its length. For instance: vec_ZZ vector; vector.SetLength(3); Thanks for your help.
captain_flammy
  • 117
  • 3
  • 9
1
vote
3 answers

NTL header file not found

I have downloaded and installed the NTL library on my Ubuntu. I'm currently using gedit to write my program and having included this ZZ.h header in my program. This is how i compile my program in the terminal: - g++ keygen.cpp -o keygen -I…
Joel Seah
  • 674
  • 3
  • 13
  • 34
1
vote
3 answers

How can i convert a string into a ZZ number?

I'm using the NTL library to implement ElGamal encryption/decryption algorithm. I've got it to the point that it's working but the algorithm wants the message to be converted to integers so it can be encrypted. So if i input a number like 1234…
daniels
  • 18,416
  • 31
  • 103
  • 173
1
vote
2 answers

How can i convert an integer into a ZZ number using NTL lib?

Here's the question. I need to convert some integer variables to ZZ class or vice verse. How could i do that? I've tried using (ZZ) before the integer or (int) before the ZZ class but all failed.
Wencheng Sun
  • 11
  • 1
  • 2
0
votes
0 answers

Multiplying polynomials with rational coefficients using NTL (C++ library)

I need to do polynomial multiplications over exact rationals (N/M where both N and M are arbitrary large integers). The NTL library is designed to quickly multiply polynomials over large integers. Any suggestions for on extending the capability to…
Josh
  • 11
  • 2
0
votes
0 answers

how to install gmp and ntl library for riscv64-unknown-linux-gnu-gcc complier

Hi I want to install ntl library using gmp for riscv64-unknown-linux-gnu-gcc complier. Changing the compiler in configure file is not working. Does anybody have any leads on how to install it? Expected that just changing the C and CXX flags in gmp…
0
votes
1 answer

How i can include static library NTL in new project?

When I build my program, I have next error: Error C1083 Cannot open include file: 'ZZ.h': No such file or directory NTL C:\Progs\NTL\src.cpp My code: #include int main(){ ZZ a, b, c; return 0; } Download library ntl 11.5.1…
0
votes
1 answer

Is there a better way to serialize NTL ZZ?

I'm currently using the NTL library to store big integers (NTL::ZZ). It looks like the only serialization way in lib is from ZZ to std::string (and std::string to ZZ for deserialization). But if I want to store and transfer a large number of…
Sqrelord
  • 3
  • 1
0
votes
0 answers

Using NTL and GMP with CUDA

I have a C++ program which uses the NTL and GMP mathematical libraries for multiplication and modular arithmetic using arbitrary length integers and polynomials. I currently use the terminal instruction below to compile it in line with the…
0
votes
1 answer

free memory for matrix in NTL (Number Theory Library)

everyone! I'm using NTL inside the SGX enclave. When I run the application, I got the issue about out of memory. Then I checked the memory, I guess it's due to the heavy use of the NTL matrix. The basic use of matrix in NTL: Mat
Dylan
  • 79
  • 7
0
votes
1 answer

How to represent the elements of the Galois filed GF(2^8) and perform arithmetic in NTL library

I am new to NTL library for its GF2X, GF2E, GF2EX, etc. Now, I want to perform multiplication on the Galois field GF(2^8). The problem is as following: Rijndael (standardised as AES) uses the characteristic 2 finite field with 256 elements, which…
Land
  • 171
  • 11