bkz using LLL oracle

This commit is contained in:
2025-05-23 19:25:54 +02:00
parent 34ab20c982
commit 938892acd6
5 changed files with 171 additions and 29 deletions

View File

@@ -3,6 +3,7 @@ import random
import argparse
def generate_test_values(noise_bits, number, p_bits):
sys.set_int_max_str_digits(10000000)
p = random.randint(2**(p_bits-1), 2**p_bits)
while p % 2 == 0:
@@ -10,7 +11,7 @@ def generate_test_values(noise_bits, number, p_bits):
max_noise = (1 << noise_bits) - 1 # 2^noise_bits - 1
a = [str(p * random.randint(1, 100) + random.randint(0, max_noise)) for _ in range(number)]
a = [str(p * random.randint(1, 2) + random.randint(0, max_noise)) for _ in range(number)]
return noise_bits, a, p