RFR: 8326609: New AES implementation with updates specified in FIPS 197 [v8]
Valerie Peng
valeriep at openjdk.org
Fri Oct 17 20:21:02 UTC 2025
On Fri, 17 Oct 2025 20:01:21 GMT, Shawn M Emery <duke at openjdk.org> wrote:
>> These two methods were only the few that I was able to make that were compact and singular in purpose (gen round key, gen inverse round key) code as the coding style guidelines espouse. The rest of the methods' construction were dictated by performance improvements, where compactness came at the cost of interpreter speed.
>
> I did make changes based on your code to eliminate len and updates to variable names.
Yes, I take a second look and maybe a smaller adjustments would work as well. E.g,
1) nit: method name `invGenRoundKeys` -> `genInvRoundKeys`
2) make this method static by passing `sessionKey[0]` and `rounds` as arguments,
3) no need for `len` since it's always `WB`
4) for the intermediate buffer of 4 words, can we not use `w` as this name is used in both the spec and genRoundKeys method as "Word array for the key schedule". It'd help people understand the code better if we adopt the same naming convention in "Algorithm 5 Pseudocode for KEYEXPANSIONEIC()", e.g. `temp` for the intermediate buffer and `dw` for the final result.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27807#discussion_r2441139964
More information about the security-dev
mailing list