readme update
This commit is contained in:
		
							
								
								
									
										39
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										39
									
								
								README.md
									
									
									
									
									
								
							| @@ -5,22 +5,55 @@ 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: | ||||||
| + first non-comment line: number of noise bits (written in decimal) | + first non-comment line: number of noise bits (written in decimal) | ||||||
| + 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 | ||||||
|  | ``` | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user