Skip to content

[selection function] Wrong names and docstrings

For AES decrypt, attack selection functions are copied from encrypt, only the name change, and the docstring is updated.
https://gitlab.com/eshard/scared/-/blob/master/scared/aes/selection_functions/decrypt.py?ref_type=heads

But this have two consequences:

  • the class names are wrong
  • the docstrings for encrypt are wrong

Example:

import scared

print(scared.aes.selection_functions.decrypt.FirstAddRoundKey.__doc__.split('\n')[0])
print(scared.aes.selection_functions.encrypt.LastAddRoundKey.__doc__.split('\n')[0])
print()
print(scared.aes.selection_functions.decrypt.FirstAddRoundKey.__name__)
print(scared.aes.selection_functions.encrypt.LastAddRoundKey.__name__)

gives:

Build an attack selection function which computes intermediate values after AES decrypt round key operation at first round, for guesses values.
Build an attack selection function which computes intermediate values after AES decrypt round key operation at first round, for guesses values.

LastAddRoundKey
LastAddRoundKey

Find a solution to avoid that.