projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement efficient reduction for pleasant-looking primes.
[u/mdw/catacomb]
/
ec-test.c
diff --git
a/ec-test.c
b/ec-test.c
index
6d42a70
..
59acf4e
100644
(file)
--- a/
ec-test.c
+++ b/
ec-test.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: ec-test.c,v 1.
1 2004/03/23 15:19:32
mdw Exp $
+ * $Id: ec-test.c,v 1.
2 2004/03/27 00:04:46
mdw Exp $
*
* Code for testing elliptic-curve stuff
*
*
* Code for testing elliptic-curve stuff
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: ec-test.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: ec-test.c,v $
+ * Revision 1.2 2004/03/27 00:04:46 mdw
+ * Implement efficient reduction for pleasant-looking primes.
+ *
* Revision 1.1 2004/03/23 15:19:32 mdw
* Test elliptic curves more thoroughly.
*
* Revision 1.1 2004/03/23 15:19:32 mdw
* Test elliptic curves more thoroughly.
*
@@
-189,7
+192,7
@@
static void ecvcvt(const char *buf, dstr *d)
int i;
static const char *fnames[] = {
int i;
static const char *fnames[] = {
- "prime", "binpoly", 0
+ "prime", "
niceprime", "
binpoly", 0
};
static const char *ecnames[] = {
"prime", "primeproj", "bin", "binproj", 0
};
static const char *ecnames[] = {
"prime", "primeproj", "bin", "binproj", 0
@@
-197,7
+200,8
@@
static void ecvcvt(const char *buf, dstr *d)
switch (i = ckstring(&p, fnames), ckchar(&p, ':'), i) {
case 0: m = getmp(&p); f = field_prime(m); mp_drop(m); break;
switch (i = ckstring(&p, fnames), ckchar(&p, ':'), i) {
case 0: m = getmp(&p); f = field_prime(m); mp_drop(m); break;
- case 1: m = getmp(&p); f = field_binpoly(m); mp_drop(m); break;
+ case 1: m = getmp(&p); f = field_niceprime(m); mp_drop(m); break;
+ case 2: m = getmp(&p); f = field_binpoly(m); mp_drop(m); break;
default: abort();
}
ckchar(&p, '/');
default: abort();
}
ckchar(&p, '/');