aboutsummaryrefslogtreecommitdiff
path: root/src/math/order.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/math/order.c')
-rw-r--r--src/math/order.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/math/order.c b/src/math/order.c
index 7e7eeda..83d7e0d 100644
--- a/src/math/order.c
+++ b/src/math/order.c
@@ -4,7 +4,7 @@
*/
#include "order.h"
-int order_init(curve_t *curve, config_t *cfg, arg_t *args) {
+int order_any(curve_t *curve, config_t *cfg, arg_t *args) {
curve->order = ellff_get_card(curve->curve);
return 1;
}
@@ -17,6 +17,7 @@ int order_smallfact(curve_t *curve, config_t *cfg, arg_t *args) {
pari_ulong smallfact = *(pari_ulong *)args->args;
pari_sp ltop = avma;
curve->order = ellsea(curve->curve, smallfact);
+ obj_insert_shallow(curve->curve, 1, curve->order);
if (gequal0(curve->order)) {
avma = ltop;
return -4;
@@ -28,6 +29,7 @@ int order_smallfact(curve_t *curve, config_t *cfg, arg_t *args) {
int order_prime(curve_t *curve, config_t *cfg, arg_t *args) {
pari_sp ltop = avma;
curve->order = ellsea(curve->curve, 1);
+ obj_insert_shallow(curve->curve, 1, curve->order);
if (gequal0(curve->order) || !(isprime(curve->order))) {
avma = ltop;
return -4;