cascada.primitives.xtea module

XTEA cipher.

class cascada.primitives.xtea.XTEAKeySchedule(*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(*master_key)[source]

Evaluate the function (internal method).

class cascada.primitives.xtea.XTEAEncryption(*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(x, y)[source]

Evaluate the function (internal method).

class cascada.primitives.xtea.XTEACipher(plaintext, masterkey, **options)[source]

Bases: cascada.primitives.blockcipher.Cipher

XTEA cipher.

key_schedule

alias of cascada.primitives.xtea.XTEAKeySchedule

encryption

alias of cascada.primitives.xtea.XTEAEncryption

classmethod set_num_rounds(new_num_rounds)[source]

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

classmethod test()[source]

Test XTEA with test vectors.