Compute the output of 97 after a byte substitution in AES?

182 Views Asked by At

I understand the framework of the calculation, however I am struggling to determine the inverse of 97 in GF(256). Any straight forward explanation would be greatly appreciated. My resources have not been very helpful in this calculation. My textbook uses reduction to show this, but I've never used such a technique before and find it confusing. Certainly not the best course to take online.

From tables, I know that the answer is 72, but I have no idea why.

1

There are 1 best solutions below

10
On BEST ANSWER

$E = \operatorname{GF}(256)$ is constructed via the irreducible polynomial $$ f = x^8 + x^4 + x^3 + x + 1 \in \mathbf{F}_{2}[x]. $$ Now the hex $97$ represents the polynomial $g$ (element of $E$) whose binary coefficients are $$ 1001\ 0111, $$ so $$ g = x^7 + x^4 + x^2 + x + 1. $$ Use Euclid's algorithm to find that the inverse of $g$ modulo $f$ is $$ h = x^6+x^5+x^4+x, $$ whose coefficients are $$ 0111\ 0010 $$ which would give me hex $72$.

Euclid's algorithm finds polynomials $h, t$ such that $$ 1 = h g + t f, $$ so that $1 \equiv h g \pmod{f}$, and $h$ is the required inverse.