cascada.primitives.shacal1 module

SHACAL-1 cipher.

cascada.primitives.shacal1.N = 4

number of key words (N=4 for 128-bit key).

class cascada.primitives.shacal1.SHACAL1KeySchedule(*args, **options)[source]

Bases: cascada.bitvector.ssa.RoundBasedFunction

Key schedule function.

classmethod set_num_rounds(new_num_rounds)[source]

Set RoundBasedFunction.num_rounds and update input_widths and output_widths if necessary.

classmethod eval(*W)[source]

Evaluate the function (internal method).

class cascada.primitives.shacal1.SHACAL1Encryption(*args, **options)[source]

Bases: cascada.primitives.blockcipher.Encryption, cascada.bitvector.ssa.RoundBasedFunction

Encryption function.

classmethod set_num_rounds(new_num_rounds)[source]

Set RoundBasedFunction.num_rounds and update input_widths and output_widths if necessary.

classmethod eval(A, B, C, D, E)[source]

Evaluate the function (internal method).

class cascada.primitives.shacal1.SHACAL1Cipher(plaintext, masterkey, **options)[source]

Bases: cascada.primitives.blockcipher.Cipher

SHACAL-1 cipher.

key_schedule

alias of cascada.primitives.shacal1.SHACAL1KeySchedule

encryption

alias of cascada.primitives.shacal1.SHACAL1Encryption

classmethod set_num_rounds(new_num_rounds)[source]

Call RoundBasedFunction.set_num_rounds of key_schedule and encryption (if iterated).