def _pfield(l, f, p, n): k = runtime.options.sec_param if p is None: p = finfields.find_prime_root(l + max(f, k + 1) + 1, n=n) else: assert p.bit_length() > l + max(f, k + 1), f'Prime {p} too small.' return finfields.GF(p, f)
def _pfield(l, f, p, n): k = runtime.options.sec_param if p is None: p = finfields.find_prime_root(l + f + k + 2, n=n) elif p.bit_length() <= l + f + k + 1: raise ValueError(f'Prime {p} too small.') return finfields.GF(p, f)
def _pfield(l, f, p, n): k = runtime.options.sec_param if p is None: p = finfields.find_prime_root(l + f + k + 2, n=n) elif p.bit_length() <= l + f + k + 1: raise ValueError(f'Prime {p} too small.') field = finfields.GF(p) assert runtime.threshold == 0 or len( runtime.parties) < field.order # for Shamir secret sharing return field