cascada.primitives.skinny128 module

SKINNY-128-128.

TK1 version, where the tweakey size is equal to the block size.

A WeakModel is used to model the XOR and linear models of the S-box.

class cascada.primitives.skinny128.SKINNYTweakeySchedule(*args, **options)[source]

Bases: cascada.bitvector.ssa.RoundBasedFunction

Key schedule of SKINNY-128-128.

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.skinny128.SboxLut(**kwargs)[source]

Bases: cascada.bitvector.secondaryop.LutOperation

The 8-bit S-box of SKINNY-128-128.

linear_model

alias of cascada.linear.opmodel.get_weak_model.<locals>.MyWeakModel

xor_model

alias of cascada.differential.opmodel.get_weak_model.<locals>.MyWeakModel

class cascada.primitives.skinny128.SKINNYEncryption(*args, **options)[source]

Bases: cascada.primitives.blockcipher.Encryption, cascada.primitives.aes_like.AESLikeFunction

Encryption function of SKINNY-128-128.

sbox

alias of cascada.primitives.skinny128.SboxLut

classmethod eval(*plaintext)[source]

Evaluate the function (internal method).

class cascada.primitives.skinny128.SKINNYCipher(plaintext, masterkey, **options)[source]

Bases: cascada.primitives.blockcipher.Cipher

The block cipher SKINNY-128-128.

key_schedule

alias of cascada.primitives.skinny128.SKINNYTweakeySchedule

encryption

alias of cascada.primitives.skinny128.SKINNYEncryption

classmethod set_num_rounds(new_num_rounds)[source]

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