Rijndael's precomputed values needs to be stored in SRAM. This could be an issue in RAM constrained devices like ARDUINO.
Purposal is to shift pre-conputed values from SRAM to flash for arduino 2560.
additional very useful info about Mega2560:
some old bootloader revisions does have a special feature:
"!!!" or 0x212121 was a special bootloader command, ... waiting input!
It was not possible to flush images containing that. http://forum.arduino.cc/index.php?topic=232014.0
... you can find this pattern in the AES tables!. These boards have to be flushed with as ISP-Programmer with a new bootloader revision and the world looks pretty well .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, that's one thing on the TODO list from which not only the 2560 can benefit.
We have already created and tested the patch on Arduino Mega2560. I Could share it or i can contribute it to repo.
Randeep Singh
Samsung Electronics.
Last edit: Randeep Singh 2015-03-25
Awesome! It would be great if you could provide a patch created with git format-patch.
i have attached patch file. please revert in case of any issue
To keep the source more readable, I would propose to use the preprocessor in a modified way (rijndael.c):
usage (e.g.):
apropos: in my IDE I have to:
Last edit: Joerg Hubschneider 2015-04-14
Thanks, this was one of the "minor tweaks needed" I was referring to in a related discussion.
additional very useful info about Mega2560:
some old bootloader revisions does have a special feature:
"!!!" or 0x212121 was a special bootloader command, ... waiting input!
It was not possible to flush images containing that.
http://forum.arduino.cc/index.php?topic=232014.0
... you can find this pattern in the AES tables!. These boards have to be flushed with as ISP-Programmer with a new bootloader revision and the world looks pretty well .
Uh, yes, good catch! In another project, I have spent hours debugging before I found that the bootloader caused the issue.
While in theory, you could work around that, I tend to just document it as an open issue for now. What do you think?