diff --git a/cryptomite/circulant.py b/cryptomite/circulant.py index a42a15d..a37d8ce 100644 --- a/cryptomite/circulant.py +++ b/cryptomite/circulant.py @@ -8,7 +8,7 @@ from math import floor, log2 from typing import cast -from cryptomite.utils import BitsT, conv, log_2, closest_prime +from cryptomite.utils import BitsT, closest_prime, conv, log_2 __all__ = ['Circulant'] @@ -71,9 +71,10 @@ def from_params( given the initial lengths and min-entropies of the input sources and generate the associated extractor. - The input_length2 must be prime, else the code will chose a valid - input_length2 choice and adjust the other parameters accordingly. - The min entropy inputs are a lower bound on the :term:`min-entropy` + The input_length2 must be prime, else the code will chose a + valid input_length2 choice and adjust the other parameters + accordingly. + The min_entropy inputs are a lower bound on the :term:`min-entropy` of the related input string. Parameters @@ -114,8 +115,8 @@ def from_params( - input_length + 8 * log2_error + 8 - 4 * log2(3))) if output_length <= 0: - raise Exception('Cannot extract with these parameters. ' - '''Increase min_entropy1 and/or min_entropy2 + raise Exception('''Cannot extract with these parameters. + Increase min_entropy1 and/or min_entropy2 and/or log2_error.''') if verbose: print('Min entropy1: ', min_entropy1,