cascada.primitives.feal module

FEAL-N cipher.

cascada.primitives.feal.FEALX = True

whether to use FEALXKeySchedule.

class cascada.primitives.feal.FEALKeySchedule(*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(A00, A01, A02, A03, B00, B01, B02, B03)[source]

Evaluate the function (internal method).

class cascada.primitives.feal.FEALXKeySchedule(*args, **options)[source]

Bases: cascada.primitives.feal.FEALKeySchedule

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(KL0, KL1, KL2, KL3, KL4, KL5, KL6, KL7, KR0, KR1, KR2, KR3, KR4, KR5, KR6, KR7)[source]

Evaluate the function (internal method).

class cascada.primitives.feal.FEALEncryption(*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(L00, L01, L02, L03, R00, R01, R02, R03)[source]

Evaluate the function (internal method).

class cascada.primitives.feal.FEALCipher(plaintext, masterkey, **options)[source]

Bases: cascada.primitives.blockcipher.Cipher

FEAL cipher.

key_schedule

alias of cascada.primitives.feal.FEALXKeySchedule

encryption

alias of cascada.primitives.feal.FEALEncryption

classmethod set_num_rounds(new_num_rounds)[source]

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

classmethod test()[source]

Test FEAL with official test vectors.