Algebraic tests¶
- class AlgebraicTests(cipher)¶
Bases:
objectConstruct an instance of Algebraic Tests of the cipher.
EXAMPLES:
sage: from claasp.cipher_modules.algebraic_tests import AlgebraicTests sage: from claasp.ciphers.toys.toyspn1 import ToySPN1 sage: toyspn = ToySPN1(number_of_rounds=2) sage: alg_test = AlgebraicTests(toyspn) sage: alg_test.algebraic_tests(timeout_in_seconds=10) {'input_parameters': {'cipher': toyspn1_p6_k6_o6_r2, 'test_name': 'algebraic_tests', 'timeout_in_seconds': 10}, 'test_results': {'max_degree_of_equations': [2, 2], 'number_of_equations': [34, 74], 'number_of_monomials': [54, 102], 'number_of_variables': [24, 42], 'test_passed': [False, False]}} sage: from claasp.cipher_modules.algebraic_tests import AlgebraicTests sage: from claasp.ciphers.block_ciphers.speck_block_cipher import SpeckBlockCipher sage: speck = SpeckBlockCipher(number_of_rounds=1) sage: alg_test = AlgebraicTests(speck) sage: alg_test.algebraic_tests(timeout_in_seconds=30) {'input_parameters': {'cipher': speck_p32_k64_o32_r1, 'test_name': 'algebraic_tests', 'timeout_in_seconds': 30}, 'test_results': {'max_degree_of_equations': [2], 'number_of_equations': [64], 'number_of_monomials': [157], 'number_of_variables': [112], 'test_passed': [True]}}
- algebraic_tests(timeout_in_seconds=60)¶