diff options
| author | J08nY | 2018-03-24 22:59:01 +0100 |
|---|---|---|
| committer | J08nY | 2018-03-24 22:59:01 +0100 |
| commit | 25ff36c600b10cab05c2c948ac6aa8d7e9677fd1 (patch) | |
| tree | 71c24c5dd00a764fe22fb78657e4ca4eeccb7965 /src/misc | |
| parent | 6f3809790583a1256b53a419f3fee400e11e155a (diff) | |
| download | ecgen-25ff36c600b10cab05c2c948ac6aa8d7e9677fd1.tar.gz ecgen-25ff36c600b10cab05c2c948ac6aa8d7e9677fd1.tar.zst ecgen-25ff36c600b10cab05c2c948ac6aa8d7e9677fd1.zip | |
Add option to generate only some parameters randomly and input others.
Diffstat (limited to 'src/misc')
| -rw-r--r-- | src/misc/config.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/misc/config.h b/src/misc/config.h index 2800783..1a732ba 100644 --- a/src/misc/config.h +++ b/src/misc/config.h @@ -29,12 +29,25 @@ struct points_s { * @brief */ typedef enum { + RANDOM_NONE = 0, + RANDOM_SEED = 1 << 0, + RANDOM_FIELD = 1 << 1, + RANDOM_A = 1 << 2, + RANDOM_B = 1 << 3, + RANDOM_EQUATION = RANDOM_A | RANDOM_B, + RANDOM_ALL = RANDOM_SEED | RANDOM_FIELD | RANDOM_EQUATION +} random_e; + +/** + * @brief + */ +typedef enum { METHOD_DEFAULT = 0, METHOD_CM = 1 << 0, METHOD_ANOMALOUS = 1 << 1, METHOD_SEED = 1 << 2, METHOD_INVALID = 1 << 3, - METHOD_TWIST + METHOD_TWIST = 1 << 4 } method_e; /** @@ -60,8 +73,8 @@ typedef struct { /** @brief How many curves should be generated. */ long count; - /** @brief Whether the curves should be generated at random (no input). */ - bool random; + /** @brief What parameters should be generated at random (no input). */ + random_e random; /** @brief Whether the curves should have prime order. */ bool prime; /** @brief Whether the Complex Multiplication method should be used. */ |
