Since x^4+1 = 0 mod (x^4+1), then x^4 = -1 mod (x^4+1).

Let me rewrite your 6th degree polynomial as:

f(x) = a6 * x^6 + a5 * x^5 + ...a1 * x + a0 = (a6,a5,a4,a3,a2,a1,a0) ...in other words concentrate on the coefficients.

Also note the subscript on the coefficient matches the power of x.

Now a4 * x^4 = a4 * (-1) mod (x^4+1). Likewise a5*x^5 = a5*(-x) and a6*x^6 = a6*(-x^2).

So (a6,a5,a4,a3,a2,a1,a0) = (a3,a2,a1,a0) - (a6,a5,a4) = (a3,a2-a6,a1-a5,a0-a4).

So the cubic is: a3 * x^3 + (a2-a6)*x^2 + (a1-a5)*x + (a0-a4).

If you want to work in GF(2^8), just take the coefficients mod (2^8).