cascada.primitives.shacal2 module
SHACAL-2 cipher (based on SHA-256).
- cascada.primitives.shacal2.N = 4
number of key words (N=4 for 128-bit key).
- class cascada.primitives.shacal2.SHACAL2KeySchedule(*args, **options)[source]
Bases:
cascada.bitvector.ssa.RoundBasedFunctionKey schedule function.
- classmethod set_num_rounds(new_num_rounds)[source]
Set
RoundBasedFunction.num_roundsand updateinput_widthsandoutput_widthsif necessary.
- class cascada.primitives.shacal2.SHACAL2Encryption(*args, **options)[source]
Bases:
cascada.primitives.blockcipher.Encryption,cascada.bitvector.ssa.RoundBasedFunctionEncryption function.
- classmethod set_num_rounds(new_num_rounds)[source]
Set
RoundBasedFunction.num_roundsand updateinput_widthsandoutput_widthsif necessary.
- class cascada.primitives.shacal2.SHACAL2Cipher(plaintext, masterkey, **options)[source]
Bases:
cascada.primitives.blockcipher.CipherSHACAL-2 cipher.
- key_schedule
- encryption
- classmethod set_num_rounds(new_num_rounds)[source]
Call
RoundBasedFunction.set_num_roundsofkey_scheduleandencryption(if iterated).