summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2015-10-02 13:57:19 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2015-10-02 13:57:19 +0200
commit962888f03fb3d6254cc9e4bdadced10c1eeeb06d (patch)
treef7859fa632aadfce3c85203cda7eb694d0986555 /include
parenta68abb34c2200512fa9472832887a9326adfd30d (diff)
downloadlibuecc-962888f03fb3d6254cc9e4bdadced10c1eeeb06d.tar
libuecc-962888f03fb3d6254cc9e4bdadced10c1eeeb06d.zip
Add functions for point negation and subtraction
Diffstat (limited to 'include')
-rw-r--r--include/libuecc/ecc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/libuecc/ecc.h b/include/libuecc/ecc.h
index 982f7c9..5d75150 100644
--- a/include/libuecc/ecc.h
+++ b/include/libuecc/ecc.h
@@ -87,6 +87,13 @@ void ecc_25519_store_packed(ecc_int256_t *out, const ecc_25519_work_t *in);
int ecc_25519_is_identity(const ecc_25519_work_t *in);
/**
+ * Negates a point of the Elliptic Curve
+ *
+ * The same pointer may be given for input and output
+ */
+void ecc_25519_negate(ecc_25519_work_t *out, const ecc_25519_work_t *in);
+
+/**
* Doubles a point of the Elliptic Curve
*
* ecc_25519_double(out, in) is equivalent to ecc_25519_add(out, in, in), but faster.
@@ -102,6 +109,12 @@ void ecc_25519_double(ecc_25519_work_t *out, const ecc_25519_work_t *in);
*/
void ecc_25519_add(ecc_25519_work_t *out, const ecc_25519_work_t *in1, const ecc_25519_work_t *in2);
+/**
+ * Subtracts two points of the Elliptic Curve
+ *
+ * The same pointers may be given for input and output.
+ */
+void ecc_25519_sub(ecc_25519_work_t *out, const ecc_25519_work_t *in1, const ecc_25519_work_t *in2);
/**
* Does a scalar multiplication of a point of the Elliptic Curve with an integer of a given bit length