3 ms·
To some extent the purpose of this code is to demonstrate that while the s-box seems like 256 values in random order, it is actually the composition of multiple
by juliusgeo 4y ago
To some extent the purpose of this code is to demonstrate that while the s-box seems like 256 values in random order, it is actually the composition of multiple operations in finite field arithmetic. The values in the S-box I would argue are also based on "nothing up my sleeve numbers". The values all depend on the irreducible polynomial and the field size, as well as the specific affine transformation. Knowing the field size and irreducible polynomial, you can then make guarantees about the properties of numbers when transformed using an S-box.
- juliusgeo 4y agoThe parameters in the S-box may have initially seemed random, but they were actually chosen to protect against differential cryptanalysis. https://en.wikipedia.org/wiki/Differential_cryptanalysis https://en.wikipedia.org/wiki/Differential_cryptanalysis