aboutsummaryrefslogtreecommitdiff
path: root/src/math/field.h
diff options
context:
space:
mode:
authorJ08nY2017-05-29 15:11:38 +0200
committerJ08nY2017-05-29 15:11:38 +0200
commitba8c1f2bc424205cbb167b3c65ce184912c6173a (patch)
treedb21c80b3e7ed411ddbdc4151f82b875b83f279e /src/math/field.h
parent03eedf3f3e69093af6fd2717bbad04ffdfc7c25a (diff)
downloadecgen-ba8c1f2bc424205cbb167b3c65ce184912c6173a.tar.gz
ecgen-ba8c1f2bc424205cbb167b3c65ce184912c6173a.tar.zst
ecgen-ba8c1f2bc424205cbb167b3c65ce184912c6173a.zip
Add some more comments and docs, move exhaustive/seed.[ch] into math/
Diffstat (limited to 'src/math/field.h')
-rw-r--r--src/math/field.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/math/field.h b/src/math/field.h
index f5dc42b..04af2c6 100644
--- a/src/math/field.h
+++ b/src/math/field.h
@@ -15,8 +15,8 @@
* Creates a random field.
* Always succeeds.
*
- * @param curve
- * @param config
+ * @param curve A curve_t being generated
+ * @param cfg An application config
* @param args unused
* @return state diff
*/
@@ -28,19 +28,21 @@ GENERATOR(field_gen_random);
* - a prime number in the prime field case
* - three short exponents of the reduction polynomial in the binary case
*
- * @param curve
- * @param config
+ * @param curve A curve_t being generated
+ * @param cfg An application config
* @param args unused
* @return state diff
*/
GENERATOR(field_gen_input);
/**
+ * GENERATOR(gen_t)
+ * Creates the field by reading it once.
*
- * @param curve
- * @param cfg
- * @param args
- * @return
+ * @param curve A curve_t being generated
+ * @param cfg An application config
+ * @param args unused
+ * @return state diff
*/
GENERATOR(field_gen_once);
@@ -67,10 +69,11 @@ GEN field_params(GEN field);
GEN field_elementi(GEN element);
/**
+ * Transforms an integer into a field element.
*
- * @param field
- * @param in
- * @return
+ * @param field the field to work in
+ * @param in the integer to transform
+ * @return a field element, t_INTMOD or t_FFELT
*/
GEN field_ielement(GEN field, GEN in);