This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sage.crypto.boolean_function import BooleanFunction | |
| def is_linear_sbox(sbox: list[int]) -> bool: | |
| input_size = (len(sbox) - 1).bit_length() | |
| output_size = max(sbox).bit_length() | |
| print(f"[*] Input bits: {input_size}, Output bits: {output_size}") | |
| is_linear = True |