projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Random field-element selection.
[u/mdw/catacomb]
/
field.h
diff --git
a/field.h
b/field.h
index
dd674c9
..
909332f
100644
(file)
--- a/
field.h
+++ b/
field.h
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: field.h,v 1.
4 2004/03/21 22:52:0
6 mdw Exp $
+ * $Id: field.h,v 1.
5 2004/03/23 12:08:2
6 mdw Exp $
*
* Definitions for field arithmetic
*
*
* Definitions for field arithmetic
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: field.h,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: field.h,v $
+ * Revision 1.5 2004/03/23 12:08:26 mdw
+ * Random field-element selection.
+ *
* Revision 1.4 2004/03/21 22:52:06 mdw
* Merge and close elliptic curve branch.
*
* Revision 1.4 2004/03/21 22:52:06 mdw
* Merge and close elliptic curve branch.
*
@@
-59,6
+62,10
@@
/*----- Header files ------------------------------------------------------*/
/*----- Header files ------------------------------------------------------*/
+#ifndef CATACOMB_GRAND_H
+# include "grand.h"
+#endif
+
#ifndef CATACOMB_MP_H
# include "mp.h"
#endif
#ifndef CATACOMB_MP_H
# include "mp.h"
#endif
@@
-75,6
+82,7
@@
typedef struct field_ops {
/* --- Universal operations --- */
void (*destroy)(field */*f*/);
/* --- Universal operations --- */
void (*destroy)(field */*f*/);
+ mp *(*rand)(field */*f*/, mp */*d*/, grand */*r*/);
mp *(*in)(field */*f*/, mp */*d*/, mp */*x*/);
mp *(*out)(field */*f*/, mp */*d*/, mp */*x*/);
mp *(*in)(field */*f*/, mp */*d*/, mp */*x*/);
mp *(*out)(field */*f*/, mp */*d*/, mp */*x*/);