cascada.primitives.rectangle module
RECTANGLE cipher.
- class cascada.primitives.rectangle.SboxLut(**kwargs)[source]
Bases:
cascada.bitvector.secondaryop.LutOperation
The 4-bit S-box of RECTANGLE.
- linear_model
alias of
cascada.linear.opmodel.get_wdt_model.<locals>.MyWDTModel
- xor_model
alias of
cascada.differential.opmodel.get_wdt_model.<locals>.MyWDTModel
- cascada.primitives.rectangle.transpose(list_bv)[source]
Transpose a list of bit-vectors.
Given a list
x
of bit-vectors, return another list of bit-vectorsy
such as the bit-matrix representation ofy
is the transpose of that ofx
(x[i][j] == y[j][i]
).
- class cascada.primitives.rectangle.RECTANGLEEncryption(*args, **options)[source]
Bases:
cascada.primitives.blockcipher.Encryption
,cascada.bitvector.ssa.RoundBasedFunction
RECTANGLE encryption function.
- classmethod set_num_rounds(new_num_rounds)[source]
Set
RoundBasedFunction.num_rounds
and updateinput_widths
andoutput_widths
if necessary.
- class cascada.primitives.rectangle.RECTANGLE80KeySchedule(*args, **options)[source]
Bases:
cascada.bitvector.ssa.RoundBasedFunction
RECTANGLE-80 key schedule function.
- classmethod set_num_rounds(new_num_rounds)[source]
Set
RoundBasedFunction.num_rounds
and updateinput_widths
andoutput_widths
if necessary.
- class cascada.primitives.rectangle.RECTANGLE128KeySchedule(*args, **options)[source]
Bases:
cascada.bitvector.ssa.RoundBasedFunction
RECTANGLE-128 key schedule function.
- classmethod set_num_rounds(new_num_rounds)[source]
Set
RoundBasedFunction.num_rounds
and updateinput_widths
andoutput_widths
if necessary.
- class cascada.primitives.rectangle.RECTANGLE80Cipher(plaintext, masterkey, **options)[source]
Bases:
cascada.primitives.blockcipher.Cipher
RECTANGLE-80 cipher.
- key_schedule
alias of
cascada.primitives.rectangle.RECTANGLE80KeySchedule
- encryption
- classmethod set_num_rounds(new_num_rounds)[source]
Call
RoundBasedFunction.set_num_rounds
ofkey_schedule
andencryption
(if iterated).
- class cascada.primitives.rectangle.RECTANGLE128Cipher(plaintext, masterkey, **options)[source]
Bases:
cascada.primitives.blockcipher.Cipher
RECTANGLE-128 cipher.
- key_schedule
alias of
cascada.primitives.rectangle.RECTANGLE128KeySchedule
- encryption
- classmethod set_num_rounds(new_num_rounds)[source]
Call
RoundBasedFunction.set_num_rounds
ofkey_schedule
andencryption
(if iterated).