uov_problem¶
- class cryptographic_estimators.UOVEstimator.uov_problem.UOVProblem(n: int, m: int, q: int, **kwargs)¶
Bases:
BaseProblem
Construct an instance of UOVProblem.
- Parameters:
n (int) – Number of variables
m (int) – Number of polynomials
q (int) – Order of the finite field
**kwargs –
Additional keyword arguments
theta (float, optional) - Exponent of the conversion factor. Defaults to 2. If 0 <= theta <= 2, every multiplication in GF(q) is counted as log2(q) ^ theta binary operation. If theta = None, every multiplication in GF(q) is counted as 2 * log2(q) ^ 2 + log2(q) binary operation.
cost_one_hash (int, optional) - Bit complexity of computing one hash value. Defaults to 17.
memory_bound (float, optional) - Maximum allowed memory to use for solving the problem. Defaults to inf.
- property cost_one_hash¶
Returns the bit-complexity of computing one hash.
- expected_number_solutions()¶
Returns the expected number of existing solutions to the problem.
- get_parameters()¶
Return the optimizations parameters.
- Tests:
>>> from cryptographic_estimators.UOVEstimator.uov_problem import UOVProblem >>> E = UOVProblem(n=14, m=8, q=4) >>> E.get_parameters() [14, 8, 4]
- hashes_to_basic_operations(number_of_hashes: float)¶
Return the number basic operations corresponding to a certain amount of hashes.
- Parameters:
number_of_hashes (float) – Number of hashes (logarithmic)
- npolynomials()¶
Return the number of polynomials.
- nvariables()¶
Return the number of variables.
- order_of_the_field()¶
Return the order of the field.
- property theta¶
Returns the runtime of the algorithm.
- to_bitcomplexity_memory(elements_to_store: float)¶
Return the memory bit-complexity associated to a given number of elements to store.
- Parameters:
elements_to_store (float) – Number of memory operations (logarithmic)
- to_bitcomplexity_time(basic_operations: float)¶
Return the bit-complexity corresponding to a certain amount of basic operations.
- Parameters:
basic_operations (float) – Number of basic operations (logarithmic)