# Find polynomial in finite field

We have $A$, $B \in GF(q^k)$

We want to find polynomial $h \in GF(q)[x]$ where

$h(A) = B$

What is the lowest degree of $h$?

How to find $h$ with the lowest degree and what is complexity of this algorithm?

-
Without additional assumptions it seems impossible to find such an h; is there sum assumption on the degree of A and B? –  quid Feb 18 '13 at 19:07
This won't work unless $b$ is in the subfield generated by $A$. If it is, then the lowest degree is at most the degree of $B$ minus $1$, and you can find it by computing the powers of $B$ and applying linear algebra over $\mathbb F_q$, which shouldn't take too long. –  Will Sawin Feb 18 '13 at 19:08
So, probably $O(k^w\text{poly}(\log (q) ))$. –  Dror Speiser Feb 18 '13 at 19:09