aboutsummaryrefslogtreecommitdiff
path: root/src/io/cli.c
diff options
context:
space:
mode:
authorJ08nY2017-09-19 12:40:37 +0200
committerJ08nY2017-09-19 12:40:37 +0200
commit3fad579c3cbcbce457f36af6c1ceff37ec04ee54 (patch)
treeee86b1e858754afaadd5f7e55b87021485e78b64 /src/io/cli.c
parent0a3aea134eea8aaa819548c4ad8c7c653830f5b4 (diff)
downloadecgen-3fad579c3cbcbce457f36af6c1ceff37ec04ee54.tar.gz
ecgen-3fad579c3cbcbce457f36af6c1ceff37ec04ee54.tar.zst
ecgen-3fad579c3cbcbce457f36af6c1ceff37ec04ee54.zip
Diffstat (limited to 'src/io/cli.c')
-rw-r--r--src/io/cli.c14
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,