I'm taking a course on cryptography and I have some confusions concerning the materials in our notes. Say we have the field $GF(2^8)$, we create a substitution algorithm (the S Box in AES) so we need a bijective function that maps from $GF(2^8)$ onto itself.
The total number of one-to-one functions is 256! because $| GF(2^8)| = 256$ and we can find a mapping by permutating all elements within the set.
We use the mapping function $S(y) = y^{2^8-2} = y^{254}$ which is a permutation on $GF(2^8)$
Why is this a permutation? How do we show this?
It is also mentioned in other notes such as here: SubBytes Transform circuit for AES Cipher (Version 1.0)
that
$S(y) = y^{-1}$ for all $y \neq 0$ and $y^{255} = 1$
I don't understand why however.
Just to summarize, I don't understand why $S(y) = y^{2^8-2} = y^{254}$ is a one-to-one function and a permutation on $GF(2^8)$ and why $S(y) = y^{-1}$ for all $y \neq 0$
Could someone help explain the details behind? Thanks!