I'm trying to understand Berlekamp's algorithm on very simple examples.
For example, we know that $X+1$ and $X^2+X+1$ are irreducible on $\mathbb{F}_2[X]$, so $$P(X)=(X+1)(X^2+X+1)=X^3+1$$ is not. But my "computation" of the Berlekamp algorithm says $P$ is irreducible.
Let note $\alpha : Q(X)\in\mathbb{F}_2[X]\to Q(X)^2\in \mathbb{F}_2[X]$, we have
$$ \begin{array}{l} \alpha(1)\equiv 1~\mathrm{mod}[P] \\ \alpha(X)\equiv X^2~\mathrm{mod}[P]\\ \alpha(X^2)\equiv -X~\mathrm{mod}[P] \end{array}$$
So the matrix of $\alpha$ in the basis $(1,X,X^2)$ is
$$ M = \left( \begin{array}{ccc} 1 & 0 & 0 \\ 0 & 0 & -1 \\ 0 & 1 & 0 \end{array}\right)\quad \quad \mathrm{and}\quad \quad M-I_3 = \left( \begin{array}{ccc} 0 & 0 & 0 \\ 0 & -1 & -1 \\ 0 & 1 & -1 \end{array}\right)$$
So we have $\dim \ker (M-I_3)=1$, which means that $P$ is the product of $1$ irreductible polynom, hence $P$ is irreducible.
Obviously $P$ is not irreducible, but I can't find where my mistake is.
Thank you for your help.