Multiply by 3 problem with MixColumns in AES
The issue is that the &quot;XOR with 0x1b&quot; step is performed when it must not.
That &quot;XOR with 0x1b&quot; should be performed after a LSL if and only if LSL dropped a 1 on the left (that is, if LSL started from a byte with bit 7 at 1).
Equivalently: LSL drops nothing, we &quot;XOR with 0x11b&quot; if the result of LSL has bit 8 set.
Yet another equivalent alternative: we convert the argument to a polynomial of degree at most 7 with binary coefficients, multiply that polynomial by $x$, and if the result has degree 8, we reduce it by adding the reduction polynomial $x^8+x^4+x^3+x+1$. Then we convert back to bits to get the result.
Minimally fixing the question's &quot;Next&quot; One (second row of the first matrix multiplication):
87 = No changes (Multiply by one)
6e = 01101110 =&gt; SHL = 11011100 
46 = 01000110 =&gt; SHL = 10001100 =&gt; XOR with the Byte itself 10001100 XOR 01000110 = 11001010
a6 = No changes (Multiply by one)
10000111 XOR 11011100 XOR 11001010 XOR 10100110 = 00110111 = 0x37