Modify syntax of field and curve specs to reserve `/'.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 16 Jan 2007 22:09:55 +0000 (22:09 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 16 Jan 2007 22:23:02 +0000 (22:23 +0000)
I'll want `/' as an operator in the expression syntax, so they can't
have it any more.  Use `;' instead.

ec-info.c
ec.h
key.1
tests/ec

index 3a5b096..2228381 100644 (file)
--- a/ec-info.c
+++ b/ec-info.c
@@ -48,7 +48,7 @@
  * Use:                Parses an elliptic curve description, which has the form
  *
  *               * a field description
- *               * an optional `/'
+ *               * an optional `;'
  *               * `prime', `primeproj', `bin', or `binproj'
  *               * an optional `:'
  *               * the %$a$% parameter
@@ -63,7 +63,7 @@ ec_curve *ec_curveparse(qd_parse *qd)
   field *f;
 
   if ((f = field_parse(qd)) == 0) goto fail;
-  qd_delim(qd, '/');
+  qd_delim(qd, ';');
   switch (qd_enum(qd, "prime,primeproj,bin,binproj")) {
     case 0:
       if (F_TYPE(f) != FTY_PRIME) {
@@ -218,7 +218,7 @@ void ec_infofromdata(ec_info *ei, ecdata *ed)
  *             curve, or it has the form
  *
  *               * elliptic curve description
- *               * optional `/'
+ *               * optional `;'
  *               * common point
  *               * optional `:'
  *               * group order
@@ -242,7 +242,7 @@ int ec_infoparse(qd_parse *qd, ec_info *ei)
   }  
 
   if ((c = ec_curveparse(qd)) == 0) goto fail;
-  qd_delim(qd, '/'); if (!ec_ptparse(qd, &g)) goto fail;
+  qd_delim(qd, ';'); if (!ec_ptparse(qd, &g)) goto fail;
   qd_delim(qd, ':'); if ((r = qd_getmp(qd)) == 0) goto fail;
   qd_delim(qd, '*'); if ((h = qd_getmp(qd)) == 0) goto fail;
   ei->c = c; ei->g = g; ei->r = r; ei->h = h;
diff --git a/ec.h b/ec.h
index f46a985..beb412a 100644 (file)
--- a/ec.h
+++ b/ec.h
@@ -501,7 +501,7 @@ extern ec_curve *ec_binproj(field */*f*/, mp */*a*/, mp */*b*/);
  * Use:                Parses an elliptic curve description, which has the form
  *
  *               * a field description
- *               * an optional `/'
+ *               * an optional `;'
  *               * `prime', `primeproj', `bin', or `binproj'
  *               * an optional `:'
  *               * the %$a$% parameter
@@ -539,7 +539,7 @@ extern ec *ec_ptparse(qd_parse */*qd*/, ec */*p*/);
  *             information in @ei@.  This has the form
  *
  *               * elliptic curve description
- *               * optional `/'
+ *               * optional `;'
  *               * common point
  *               * optional `:'
  *               * group order
diff --git a/key.1 b/key.1
index 9efedf7..e66c4ac 100644 (file)
--- a/key.1
+++ b/key.1
@@ -775,7 +775,7 @@ if the field type is
 then an optional
 .RB ` , '
 and the representation of the normal element \*(*b; an optional
-.RB ` / ';
+.RB ` ; ';
 a
 .IR "curve type" ,
 which is one of
@@ -796,7 +796,7 @@ which define the elliptic curve
 separated by an optional
 .RB ` , ';
 an optional
-.RB ` / ';
+.RB ` ; ';
 the 
 .IR x -
 and
index 0212230..aa12b48 100644 (file)
--- a/tests/ec
+++ b/tests/ec
@@ -440,12 +440,12 @@ mul {
     5846006549323611672814742442876390689256843201587
     inf;
 
-  "binpoly: 0x800000000000000000000000000000000000000c9/bin: 1, 1"
+  "binpoly: 0x800000000000000000000000000000000000000c9bin: 1, 1"
     "0x2fe13c0537bbc11acaa07d793de4e6d5e5c94eee8,
       0x289070fb05d38ff58321f2e800536d538ccdaa3d9"
     5846006549323611672814741753598448348329118574063
     inf;
-  "binpoly: 0x800000000000000000000000000000000000000c9/binproj: 1, 1"
+  "binpoly: 0x800000000000000000000000000000000000000c9binproj: 1, 1"
     "0x2fe13c0537bbc11acaa07d793de4e6d5e5c94eee8,
       0x289070fb05d38ff58321f2e800536d538ccdaa3d9"
     5846006549323611672814741753598448348329118574063