[back] [prev] [next] [index] [root]

 


FFEltLog

Discrete logarithm for finite fields.

Syntax:

d := FFEltLog(a);

finite field element
  a  
integer
  d  

See also:  FFPrimitiveElt

Description:

This function computes the discrete logarithm of an element a with respect to a primitive element omega, that means a non negative integer d with a = omega^d. The primitive element omega is that returned by FFPrimitiveElt().


Example:

Compute some discrete logarithms:

kash> F125 := FF(5, 3);
Finite field of size 5^3
kash> a := FFElt(F125, 3);
3
kash> d := FFEltLog(a);
93
kash> w := FFPrimitiveElt(F125);
w
kash> w^d;
3
kash> FFEltLog(w^47);
> 47


<- back[back] [prev] [next] [index] [root]