HLRichardson-Git / Gestalt

A user-friendly cryptography library
https://gestaltcrypto.github.io
MIT License
2 stars 2 forks source link

Optimize AES cipher #11

Open HLRichardson-Git opened 8 months ago

HLRichardson-Git commented 8 months ago

This is similar to an already closed issue #1, and I really thought I'd be happy with the optimization I made in that version. But of course I'm not, and I have done a lot more research into optimizing the Rijndael algorithm. First thing I did was go straight to the source, meaning I read through the actual submission paper from the authors of Rijndael for the AES competition.

There I found out, which isn't present in the FIPS 197 standard (BTW WHY!?!?!) that the authors of Rijndael knew and heavily suggested the use of pre-computed lookup tables called "T-tables" to speed up the algorithm. It would be interesting to see how much better we can make Gestalt if we incorporated these optimizations.

I found a few more references that give more information on how/why this optimization works below:

I would also be interested to do this after we have done Implement a repeatable way to add benchmarks for added features issue, so we can see the improvements more easily and effectively.