How to find the inverse of a 3x3 MDS matrix I implemented a block cipher similar to AES.
But the reason I can't decrypt is that I can't get the inverse MDS matrix.
The MDS matrix I used is a 3x3 MDS matrix on $GF(2^8) \implies GF(2^8)$ like AES

\begin{bmatrix}
1 &amp; 2 &amp;2 \\
2 &amp; 2 &amp; 1\\
2 &amp; 1 &amp; 2\\
\end{bmatrix}

The encryption process is the same as that of AES mixcolumns, and the MDS matrix used is as above.

I need the MDS inverse matrix required for decryption. 
What is the inverse of this MDS matrix on $GF(2^8)$?

I searched for Euclid-Wallis Algorithm or extended euclidean algorithm but I did not understand it well.


How can I find the inverse of a 3x3 MDS matrix?
Your matrix contains 2 which is not an element of $\operatorname{GF}(2^8)$ unless it means $x$. In this case, we can use SageMath to find the inverse as
R.&lt;x&gt; = PolynomialRing(GF(2), 'x')
S.&lt;y&gt; = QuotientRing(R, R.ideal(x^8+x^4+x^3+x+1))
S.is_field()
S.cardinality()
y^8 + y^4 + y^3 + y + 1

A = matrix(S,[[1,y,y],[y,y,1],[y,1,y],])
A.inverse()

That produces this output
True
256
0

[                                  1 y^7 + y^6 + y^5 + y^4 + y^2 + y + 1 y^7 + y^6 + y^5 + y^4 + y^2 + y + 1]
[y^7 + y^6 + y^5 + y^4 + y^2 + y + 1 y^7 + y^6 + y^5 + y^4 + y^2 + y + 1                                   1]
[y^7 + y^6 + y^5 + y^4 + y^2 + y + 1                                   1 y^7 + y^6 + y^5 + y^4 + y^2 + y + 1]

The matrix written in standard binary representation is:
$$\begin{bmatrix}
  00000001 &amp; 11110111 &amp; 11110111 \\
  11110111 &amp; 11110111 &amp; 00000001 \\
  11110111 &amp; 00000001 &amp; 11110111
\end{bmatrix}$$