Eliminate Rcon array to save space
- Dominant language
- C
- Stars
- 5k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
The `Rcon` array currently takes 255 bytes of ROM, but only its first 11 elements are accessed, since there are only 10 rounds. Therefore the remaining 244 elements should be removed. The first element can also be removed when the array index is adjusted by `-1`.
The whole array can be replaced by starting a local variable `uint8_t rcon = 0x01` and applying `xtime` after each round, which is a little slower but eliminates the need for fixed constants.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the Rcon array and the AES round-key generation code, then trace how its elements are accessed for the ten rounds. Replace the unused fixed constants with the local rcon progression described in the issue, and confirm that the resulting round-key generation retains the existing AES behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- cryptography
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100