cascada.primitives.tea module

TEA cipher.

class cascada.primitives.tea.TEAKeySchedule(*args, **options)[source]

Bases: cascada.bitvector.ssa.BvFunction

Key schedule function.

classmethod eval(*master_key)[source]

Evaluate the function (internal method).

class cascada.primitives.tea.TEAEncryption(*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.tea.TEACipher(plaintext, masterkey, **options)[source]

Bases: cascada.primitives.blockcipher.Cipher

TEA cipher.

key_schedule

alias of cascada.primitives.tea.TEAKeySchedule

encryption

alias of cascada.primitives.tea.TEAEncryption

classmethod set_num_rounds(new_num_rounds)[source]

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

classmethod test()[source]

Test TEA with official test vectors.