factor can also factorize a univariate polynomial with coefficients in a Galois field. Input for example to have G=F4:
Output:
^
Input for example: