diff options
Diffstat (limited to 'src/io/cli.c')
| -rw-r--r-- | src/io/cli.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/io/cli.c b/src/io/cli.c index 960c827..4c6dae2 100644 --- a/src/io/cli.c +++ b/src/io/cli.c @@ -19,7 +19,7 @@ enum opt_keys { OPT_PRIME = 'p', OPT_COFACTOR = 'k', OPT_RANDOM = 'r', - OPT_SEED = 's', + OPT_ANSI = 's', OPT_INVALID = 'i', OPT_ORDER = 'n', OPT_KOBLITZ = 'K', @@ -52,7 +52,7 @@ struct argp_option cli_options[] = { {"unique", OPT_UNIQUE, 0, 0, "Generate a curve with only one generator.", 2}, {"anomalous", OPT_ANOMALOUS, 0, 0, "Generate an anomalous curve (of trace one, with field order equal to curve order).", 2}, {"points", OPT_POINTS, "TYPE", 0, "Generate points of given type (random/prime/all/nonprime/none).", 2}, - {"seed", OPT_SEED, "SEED", OPTION_ARG_OPTIONAL, "Generate a curve from SEED (ANSI X9.62 verifiable procedure). **NOT IMPLEMENTED**", 2}, + {"ansi", OPT_ANSI, "SEED", OPTION_ARG_OPTIONAL, "Generate a curve from SEED (ANSI X9.62 verifiable procedure).", 2}, {"invalid", OPT_INVALID, 0, 0, "Generate a set of invalid curves, for a given curve (using Invalid curve algorithm).", 2}, {"order", OPT_ORDER, "ORDER", 0, "Generate a curve with given order (using Complex Multiplication). **NOT IMPLEMENTED**", 2}, {"count", OPT_COUNT, "COUNT", 0, "Generate multiple curves.", 2}, @@ -198,8 +198,8 @@ error_t cli_parse(int key, char *arg, struct argp_state *state) { } break; } - case OPT_SEED: - cfg->from_seed = true; + case OPT_ANSI: + cfg->ansi = true; if (arg) { if (!ansi_seed_valid(arg)) { argp_failure( @@ -236,13 +236,13 @@ error_t cli_parse(int key, char *arg, struct argp_state *state) { } // Invalid is not prime or seed by definition. if (cfg->invalid && - (cfg->prime || cfg->from_seed || cfg->cofactor)) { + (cfg->prime || cfg->ansi || cfg->cofactor)) { // not seed, not prime argp_failure(state, 1, 0, "Invalid curve generation can not generate curves " "from seed, exhaustive or prime order."); } - if (cfg->cm && (cfg->prime || cfg->from_seed || cfg->invalid || + if (cfg->cm && (cfg->prime || cfg->ansi || cfg->invalid || cfg->cofactor || cfg->anomalous)) { argp_failure(state, 1, 0, "Fixed order curve generation can not generate " @@ -251,7 +251,7 @@ error_t cli_parse(int key, char *arg, struct argp_state *state) { "prime."); } if (cfg->anomalous && - (cfg->binary_field || cfg->cofactor || cfg->from_seed || + (cfg->binary_field || cfg->cofactor || cfg->ansi || cfg->cm || cfg->invalid || cfg->koblitz)) { argp_failure( state, 1, 0, |
