|
@@ -21,6 +21,8 @@ class Scalar
|
|
|
Scalar(const scalar_t& input);
|
|
|
Scalar(mpz_class input);
|
|
|
|
|
|
+ static void init();
|
|
|
+
|
|
|
void set(const scalar_t& input);
|
|
|
void set(mpz_class input);
|
|
|
void set_random();
|
|
@@ -34,6 +36,8 @@ class Scalar
|
|
|
Scalar& operator--();
|
|
|
Scalar operator--(int);
|
|
|
|
|
|
+ Scalar curveInverse() const;
|
|
|
+
|
|
|
void mult(curvepoint_fp_t rop, const curvepoint_fp_t& op1) const;
|
|
|
void mult(twistpoint_fp2_t rop, const twistpoint_fp2_t& op1) const;
|
|
|
void mult(fp12e_t rop, const fp12e_t& op1) const;
|
|
@@ -73,7 +77,8 @@ class Scalar
|
|
|
* have arithmetic done on them prior to interacting with curvepoints,
|
|
|
* if you're calculating something like an exponentiation of products
|
|
|
* of Scalars (or similar). */
|
|
|
- static const mpz_class mpz_bn_p;
|
|
|
+ static mpz_class mpz_bn_p;
|
|
|
+ static mpz_class mpz_bn_n;
|
|
|
|
|
|
mpz_class element;
|
|
|
};
|