Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up small issues with AES #179

Open
5 of 10 tasks
marsella opened this issue Nov 11, 2024 · 0 comments
Open
5 of 10 tasks

Clean up small issues with AES #179

marsella opened this issue Nov 11, 2024 · 0 comments
Labels
CNSA 2.0 improvement Addresses fixes or changes to existing specs Suite-B

Comments

@marsella
Copy link
Contributor

marsella commented Nov 11, 2024

I was reviewing AES for a separate project and identified a few things I'd like to change to bring it closer in line with the spec, with respect to our gold standard criteria. Most of these are picky style preferences; none of them affect the functionality -- just readability and obvious spec equivalence.

  • Add sbox example from p14 as a property (with a docstring)
  • Change sbox to be an actual function instead of an array index
  • Move SBox into the Algorithm module
  • Rename Algorithm module to Cipher to match the spec sections
  • Make AddRoundKey an explicitly named function instead of an inline ^ and replace all uses
  • AES functor: wrap text on the constraint (this is a formatting nit - aim for <80 col)
  • Update key expansion functions to use the same naming as the spec.
  • Update key expansion to return a single array. Modify call sites (cipher and invCipher) to decompose internally. Note: the AES_GCM_SIV implementation also uses the key expansion types so we can't get rid of them entirely right now; document any types that are only kept for compatibility with that impl.
  • Try writing cipher using the iterate function and decide if it looks nicer
  • Rewrite subword without a list comprehension
@marsella marsella added CNSA 2.0 Suite-B improvement Addresses fixes or changes to existing specs labels Nov 11, 2024
jn80842 added a commit that referenced this issue Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CNSA 2.0 improvement Addresses fixes or changes to existing specs Suite-B
Projects
None yet
Development

No branches or pull requests

1 participant