readme update

This commit is contained in:
Sam Hadow 2025-05-25 23:24:20 +02:00
parent b52ac6313a
commit aa8ec253a5

View File

@ -5,7 +5,7 @@ Rust implementation for the approximate greatest common divisor (AGCD) problem u
*use the provided Makefile to compile the release version* *use the provided Makefile to compile the release version*
``` ```
approximate-gcd agcd <path to input file> approximate-gcd agcd <path to input file> [algorithm]
``` ```
Input file must have the following format: Input file must have the following format:
@ -13,14 +13,47 @@ Input file must have the following format:
+ all the other lines, one per line: the numbers Xi (written in decimal) to find the approximate GCD of + all the other lines, one per line: the numbers Xi (written in decimal) to find the approximate GCD of
+ ```//``` can be used to comment a line, MUST be used at the begining of a new line and not at the end of a line containing a number + ```//``` can be used to comment a line, MUST be used at the begining of a new line and not at the end of a line containing a number
By default the algorithm used is L², the possibilities are:
+ 0: L² (external crate)
+ 1: BKZ with L² oracle
+ 2: DeepLLL (not working properly)
+ 3: L² (non external crate)
### generating values ### generating values
The script gen_values can be used to generate test values The script gen_values can be used to generate test values
``` ```
python gen_values.py [--noise-bits <number of noise bits>] [--number <number of values to generate>] usage: gen_values.py [-h] [--noise-bits NOISE_BITS] [--p-bits P_BITS] [--number NUMBER]
Generate test input for AGCD computation
options:
-h, --help show this help message and exit
--noise-bits NOISE_BITS
Number of noise bits (default: 5)
--p-bits P_BITS Number of key bits (default: 16)
--number NUMBER Number of numbers to generate (default: 20)
``` ```
the output can be directly written to a file the output can be directly written to a file
``` ```
python gen_values.py [options] > input.txt python gen_values.py [options] > input.txt
``` ```
### test script
```
usage: script.py [-h] [--noise-bits NOISE_BITS] [--p-bits P_BITS] [--min-values MIN_VALUES] [--max-values MAX_VALUES] [--trials TRIALS]
Test AGCD with varying number of test values.
options:
-h, --help show this help message and exit
--noise-bits NOISE_BITS
Number of noise bits
--p-bits P_BITS Number of bits for p
--min-values MIN_VALUES
Minimum number of test values
--max-values MAX_VALUES
Maximum number of test values
--trials TRIALS Number of trials per setting
```