# Twofish MDS multiplication

I wasted the last 2 days finding literature and/or some illustrative explanations on how to perform correct multiplications against the MDS-Matrix in Twofish over $\operatorname{GF}(256)$ with $x^8 + x^6 + x^5 + x^3 + 1$.

There seems to be no method - all algorithms I found are using pre-computed MDS tables, which isn't helping me understand it at all.

Could someone provide me with a simple and easy-to-use algorithm for this multiplication?

• Have you looked at section 4.2 of the Twofish paper? It would be helpful if you mentioned which part you are having trouble with. You need to know how to do 3 things: 1. Add in $GF(2^8)$ 2. multiply in $GF(2^8)$, and matrix multiplication (requires 1 and 2). Jan 9 '17 at 19:17

Each byte act as a polynomial in $$\operatorname{GF}(2^8)$$
You will multiply the elements of the matrix in (Galois Field) $$\operatorname{GF}(2^8)$$ and add them in $$\operatorname{GF}(2^8)$$
here is a link where you can find a wonderful explanation for $$\operatorname{GF}(2^8)$$