cascada.primitives.hight module

HIGHT cipher.

While HIGHT is defined for 32 rounds, this implementation considers 34 rounds, where the first and last round are the initial and final key-whitening.

class cascada.primitives.hight.HightKeySchedule(*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(*mk)[source]

Evaluate the function (internal method).

class cascada.primitives.hight.HightEncryption(*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(*p)[source]

Evaluate the function (internal method).

class cascada.primitives.hight.HightCipher(plaintext, masterkey, **options)[source]

Bases: cascada.primitives.blockcipher.Cipher

HIGHT cipher.

key_schedule

alias of cascada.primitives.hight.HightKeySchedule

encryption

alias of cascada.primitives.hight.HightEncryption

classmethod set_num_rounds(new_num_rounds)[source]

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

classmethod test()[source]

Test Hight with official test vectors.