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
0
votes
2 answers

Rotation of Matrices in Z_p

I want to give the values for a matrix parameter mat_ZZ_p A for the mat_ZZ_p type in NTL. The dimension of my vector is big. So, I am looking at a big square matrix as parameter. So, I cannot assign the values manually. One advantage here to me is…
cryptomath
  • 11
  • 3
0
votes
1 answer

How to convert from ZZ to ZZ_p in Number Theory Library?

Using NTL, I have to evaluate a polynomial in some point and I have found eval function: void eval(ZZ_p& b, const ZZ_pX& f, const ZZ_p& a), but further in my program I have to use b as an exponent. The power function is like this: void power(ZZ_p&…
0
votes
1 answer

Can ZZ from NTL be used to represent big numbers needed fro crypto?

I'm trying to implement Threshold Elgamal and I need a library that supports both big numbers and polynomials. For polynomials I would use NTL and for big numbers I would choose openssl bignum. The problem is that the big numbers must be the…
0
votes
1 answer

NTL convert ZZX to ZZ_pEX

In NTL, I've the following variables: ZZ p; ZZX FX; ZZX GX; and I want to calculate GCD(GX, FX) over F_p(x) How can I convert FX and GX into a F_p(x) polynomial?
kelalaka
  • 5,064
  • 5
  • 27
  • 44
0
votes
1 answer

Catch InvMod error in NTL

I use archlinux, and I install ntl from pacman by default. I have a problem with catching InvMod error in my code, maybe someone have the same problem, and now the solution for this: try { Q = Q + p; } catch (...) { …
pkruk
  • 809
  • 1
  • 7
  • 24
0
votes
0 answers

Division and remainder algorithm in NTL

I try to find or learn what a division algorithm use NTL(Number Theory Library), and complexity of this algorithm. (need algorithms in GF2X module and ZZ) The implementation of these functions is a lot of code that is difficult to understand what is…
Ilja Bulatov
  • 63
  • 1
  • 9
0
votes
1 answer

NTL Library: How to assign a big integer to ZZ_p

In NTL library I know that we can define a big integer value as: ZZ p; p=to_ZZ("1111111111111111111111111111111333333333333333"); ZZ_p::init(p); ZZ_p b(12); My question is: What if I want to assign a big integer to b rather than 12 ? e.g. ZZ_p…
user5111525
0
votes
1 answer

How to install and use NTL in cygwin

The libraries that I've used so far require installation. So they generate xx.a file that can be included in the code in cygwin. However, NTL library for windows only requires to unzip the file. So I need to know how to use it in cygwin command…
Adrian
  • 51
  • 7
0
votes
1 answer

How to floor a number using the NTL library (C++)

I am building a C++ program to verify a mathematical conjecture for up to 100 billion iterations. In order to test such high numbers, I cannot use a C++ int, so I am using the NTL library, using the type ZZ as my number type. My algorithm looks…
CtheGood
  • 999
  • 8
  • 17
0
votes
1 answer

Compiling and using NTL c++ library for Windows

I have compiled the NTL inifite precision integer arithmetic library for c++, using Microsoft Visual Studio 2008. I did as explained, on this site, using the Visual Studio interface, rather than from the command prompt. Actually I would rather do it…
Martin Lauridsen
  • 341
  • 4
  • 12
0
votes
0 answers

printing out contents of ZZ number

I am using NTL's ZZ class to work with large numbers. Suppose I have 10000 such numbers, and I want to find the product of all these numbers. Calculating the product of these numbers takes about only 30 secs. However, to print the product of these…
meta_warrior
  • 389
  • 1
  • 6
  • 18
0
votes
1 answer

G_LLL_XD function in NTL library faulty

I am trying to use the G_LLL_XD function on the NTL library. Whenever I use the function in this format: G_LLL_XD(B, delta); , the program works. Though, when I want to change the default deep or prune variables and write the function in one of…
SS-Mag
  • 38
  • 5
0
votes
0 answers

Pragma omp parallel + ntl

I'm trying to use openmp to run the below code, but I get Segmentation Fault void modKeyGenPrs(mat_GF2E *&Prs, mat_GF2E Lst[], mat_GF2E L1, mat_GF2E L2) { Prs = new mat_GF2E[m]; mat_GF2E L1_trans = transpose(L1); #pragma omp parallel…
user46060
  • 123
  • 1
  • 10
0
votes
1 answer

Fast Loop with multiplication NTL

I'm programming using C++ and ntl library but using profile the code below is slow when the galois field $GF(2^q)$ have q>= 8. How I will be able to accelerate this code without use parallel programming. void modKeyGenPrs(list& Prs,…
user46060
  • 123
  • 1
  • 10
0
votes
1 answer

Get int representation NTL GF2E

How I will be able to get the int representation in Galois Field using NTL library. For example of element GF2E xx=random_GF2E(); I'm trying use printf("%d",xx._GF2E__rep.HexOutput); but I get 0
user46060
  • 123
  • 1
  • 10