1

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?

AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66

1 Answers1

1

I think there is no built in way to do this.

But you can write a script yourself.
A field F has two operations, addition (+) and multiplication (*). First you have to specify if you want to know the order of an element g in the group (F,+) or the group (F \ {0}, *).

  1. Find the order of g in (F,+):
    This is the easy case, since the order of every element in this group is p, if the field has pm elements.

  2. Find the order of g in (F \ {0}, *):
    This is a litte bit hard. The order of g in (F \ {0}, *) is also called the discrete logarithm. Basicly you can try gk for every k=1,...,pm. But this will take a while. A simple way would be the baby-step giant-step algorithm. I have never tried it, but you may also take a look at this discrete logarithm implementation using NTL.

miracle173
  • 1,852
  • 16
  • 33
AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66
  • Thanks a lot dear AbcAeffchen,Actually I Knew that, this function is ready (inbuilt) in Sage , Pari/gp and Magma, those are using NTL library. somehow I have to get answer in NTL with reliable way (coding!). Right now I'm trying to call their function in C/C++ and use the result, this one is not easy task! – Habib Lotfi Sep 02 '14 at 05:15
  • If you want to compute the discrete logarithm just using NTL, you should take a look at the Baby-step giant-step algorithm. it is simple and there are groups, where no faster algorithm is known. – AbcAeffchen Sep 02 '14 at 08:34