cascada.primitives.aes_like module
AES-like functions.
- class cascada.primitives.aes_like.LoggingMode(value)[source]
Bases:
enum.EnumRepresent the options available for the information to log.
- Silent
nothing is logged
- RoundOutputs
the plaintext and the output of each round is logged
- StepOutputs
the plaintext and the output of each step is logged
- Debug
similar as
StepOutputs, but also logs debugging information
- class cascada.primitives.aes_like.AESLikeFunction(*args, **options)[source]
Bases:
cascada.bitvector.ssa.RoundBasedFunctionBase class to implemented AES-like functions.
Subclasses need to set the integer attributes
num_rounds,num_rows,num_columnsandcell_width.Subclasses also need to set
sbox(resp.mix_columns_bit_matrix) to usesub_cells(resp.mix_columns). SeeAESEncryptionfor an example.Optionally, subclasses can set the attributes
logging_modeandname*to customize the information to log (seeLoggingMode,BvFunction.get_formatted_logged_msgsandCharacteristic.get_formatted_logged_msgs).By default input/output bit-vector tuples are loaded column-wise.
- classmethod set_num_rounds(new_num_rounds)[source]
Set
RoundBasedFunction.num_roundsand updateinput_widthsandoutput_widthsif necessary.