sboxUv2.core.building_blocks package

Submodules

sboxUv2.core.building_blocks.butterflies module

sboxUv2.core.building_blocks.butterflies.closed_butterfly(alpha, beta)[source]
sboxUv2.core.building_blocks.butterflies.open_butterfly(alpha, beta)[source]

sboxUv2.core.building_blocks.cython_functions module

class sboxUv2.core.building_blocks.cython_functions.UnsafePRNG

Bases: object

sboxUv2.core.building_blocks.one_round_functions module

sboxUv2.core.building_blocks.one_round_functions.feistel_round(F1)[source]
Parameters:

F1 – an S_box-able object.

Returns:

An S_box which is the result of a classic feistel round with round function F1

sboxUv2.core.building_blocks.one_round_functions.swap_halves(n)[source]
Parameters:

n – The bit length of the result.

Returns:

A n-bit S_box which swaps the most significant half of the input and the least significant one.