I'm in $\text{GF}(8) = \text{GF}(2^3)$ and have an irreducbile polynomial $p(x) = x^3 + x + 1$, then $\text{GF}(8) = \mathbb{Z}_2[x]/\langle p(x) \rangle$ .
Now I want to multiply $2$ elements of the field, namely $(x^2 + x + 1)\cdot (x^2 + x + 1)$. I get the result $x + 2$ with the remainder $2x^2 - x - 1$ if I multiply these two elements and then divide the resulting polynomial by the polynomial $p(x)$.
The result of the multiplication should be $x + 1$, but how do I get from $2x^2 - x - 1$ to $x + 1$?