How to find an S-box inverse value using an alternative equation for the AES S-box?

In the AES S-box look-up table we find $S[95]=2A$. And using:$$b'_i = b_i \oplus b_{(i+4)\bmod8} \oplus b_{(i+5)\bmod8} \oplus b_{(i+6)\bmod8}\oplus b_{(i+7)\bmod8} \oplus c_i$$ with $\boldsymbol{b} = (b_7 \ldots b_0) = 10001010 = 8A$ (since $\{95\}^{-1} = 8A$) I find $\boldsymbol{b'} = 00101010 = 2A$ as expected. However, I am having trouble finding the inverse, i.e. $S^{-1}[2A] = 95$, by using a similar method. I am using: $$b'_i = b_{(i+2)\bmod8} \oplus b_{(i+5)\bmod8} \oplus b_{(i+7)\bmod8}\oplus d_i$$ where $\boldsymbol{d} = 00000101 = 05$. The problem seems to be my choice of $\boldsymbol{b}$. I tried $\boldsymbol{b} = 10011000 = 98$ since $\{2A\}^{-1} = 98$ but I do not get $95$ as expected.

Can anyone tell me where I am going wrong?

• did you get D6? – Richie Frame Mar 16 '18 at 3:03