8 * Table of standard elliptic curves [generated]
13 #define N(x) (sizeof(x)/sizeof(*x))
15 /*----- Curve data --------------------------------------------------------*/
24 alias) names
="$names $n=$f" continue;;
26 *) echo >&2 "$0: unknown keyword $t"; exit 1;;
31 /* --- Curve $n --- */
35 n
=`echo $n | sed 's/[^a-zA-Z0-9_][^a-zA-Z0-9_]*/_/g'`
37 prime | niceprime | binpoly
)
39 if [ $t != p
]; then echo >&2 "$0: wanted p; found $t"; exit 1; fi
41 if [ $t != a
]; then echo >&2 "$0: wanted a; found $t"; exit 1; fi
43 if [ $t != b
]; then echo >&2 "$0: wanted b; found $t"; exit 1; fi
46 static const mpw c_${n}_p[] = {
52 static const mpw c_${n}_a[] = {
58 static const mpw c_${n}_b[] = {
66 *) echo >&2 "$0: unknown field type $f"; exit 1;;
70 if [ $t != r
]; then echo >&2 "$0: wanted r; found $t"; exit 1; fi
72 if [ $t != h
]; then echo >&2 "$0: wanted h; found $t"; exit 1; fi
74 if [ $t != gx
]; then echo >&2 "$0: wanted gx; found $t"; exit 1; fi
76 if [ $t != gy
]; then echo >&2 "$0: wanted gy; found $t"; exit 1; fi
79 static const mpw c_${n}_r[] = {
85 static const mpw c_${n}_h[] = {
91 static const mpw c_${n}_gx[] = {
97 static const mpw c_${n}_gy[] = {
106 prime
) ftag
=FTAG_PRIME
;;
107 niceprime
) ftag
=FTAG_NICEPRIME
;;
108 binpoly
) ftag
=FTAG_BINPOLY
;;
111 static const ecdata c_$n = {
113 c_${n}_p, N(c_${n}_p),
114 c_${n}_a, N(c_${n}_a),
115 c_${n}_b, N(c_${n}_b),
116 c_${n}_r, N(c_${n}_r),
117 c_${n}_h, N(c_${n}_h),
118 c_${n}_gx, N(c_${n}_gx),
119 c_${n}_gy, N(c_${n}_gy)
127 /*----- Main table --------------------------------------------------------*/
129 const ecentry ectab[] = {
132 a
=`echo $i | sed 's/=.*$//'`
133 n
=`echo $i | sed 's/^.*=//; s/[^a-zA-Z0-9_][^a-zA-Z0-9_]*/_/g'`
142 /*----- That's all, folks -------------------------------------------------*/