8 * Table of standard elliptic curves [generated]
13 #define N(x) (sizeof(x)/sizeof(*x))
14 #define MP(x) { x, x + N(x), N(x), 0, MP_CONST, 0 }
16 /*----- Curve data --------------------------------------------------------*/
25 alias) names
="$names $n=$f" continue;;
27 *) echo >&2 "$0: unknown keyword $t"; exit 1;;
32 /* --- Curve $n --- */
36 n
=`echo $n | sed 's/[^a-zA-Z0-9_][^a-zA-Z0-9_]*/_/g'`
38 prime | niceprime | binpoly
)
40 if [ $t != p
]; then echo >&2 "$0: wanted p; found $t"; exit 1; fi
42 if [ $t != a
]; then echo >&2 "$0: wanted a; found $t"; exit 1; fi
44 if [ $t != b
]; then echo >&2 "$0: wanted b; found $t"; exit 1; fi
47 static mpw c_${n}_p[] = {
53 static mpw c_${n}_a[] = {
59 static mpw c_${n}_b[] = {
67 *) echo >&2 "$0: unknown field type $f"; exit 1;;
71 if [ $t != r
]; then echo >&2 "$0: wanted r; found $t"; exit 1; fi
73 if [ $t != h
]; then echo >&2 "$0: wanted h; found $t"; exit 1; fi
75 if [ $t != gx
]; then echo >&2 "$0: wanted gx; found $t"; exit 1; fi
77 if [ $t != gy
]; then echo >&2 "$0: wanted gy; found $t"; exit 1; fi
80 static mpw c_${n}_r[] = {
86 static mpw c_${n}_h[] = {
92 static mpw c_${n}_gx[] = {
98 static mpw c_${n}_gy[] = {
107 prime
) ftag
=FTAG_PRIME
;;
108 niceprime
) ftag
=FTAG_NICEPRIME
;;
109 binpoly
) ftag
=FTAG_BINPOLY
;;
112 static ecdata c_$n = {
128 /*----- Main table --------------------------------------------------------*/
130 const ecentry ectab[] = {
133 a
=`echo $i | sed 's/=.*$//'`
134 n
=`echo $i | sed 's/^.*=//; s/[^a-zA-Z0-9_][^a-zA-Z0-9_]*/_/g'`
143 /*----- That's all, folks -------------------------------------------------*/