summaryrefslogtreecommitdiffstats
path: root/include/libuecc/ecc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libuecc/ecc.h')
-rw-r--r--include/libuecc/ecc.h44
1 files changed, 40 insertions, 4 deletions
diff --git a/include/libuecc/ecc.h b/include/libuecc/ecc.h
index 98d756c..12f1d3e 100644
--- a/include/libuecc/ecc.h
+++ b/include/libuecc/ecc.h
@@ -27,6 +27,11 @@
#ifndef _LIBUECC_ECC_H_
#define _LIBUECC_ECC_H_
+#ifndef DEPRECATED
+#define DEPRECATED __attribute__((deprecated))
+#endif
+
+
#include <stdint.h>
@@ -61,8 +66,35 @@ typedef struct _ecc_25519_work {
/** The identity element */
extern const ecc_25519_work_t ecc_25519_work_identity;
-/** The ec25519 default base */
-extern const ecc_25519_work_t ecc_25519_work_default_base;
+
+/**
+ * The generator point used by Ed25519
+ *
+ * \ref ecc_25519_work_base_ed25519 is the inverse of \ref ecc_25519_work_base_legacy
+ *
+ * The order of the base point is \f$ 2^{252} + 27742317777372353535851937790883648493 \f$.
+ **/
+extern const ecc_25519_work_t ecc_25519_work_base_ed25519;
+
+/**
+ * The ec25519 legacy generator point ("default base" till libuecc v5)
+ *
+ * In new software that doesn't need compablity with older libuecc releases, you should consider
+ * using \ref ecc_25519_work_base_ed25519 instead.
+ *
+ * \ref ecc_25519_work_base_legacy is the inverse of \ref ecc_25519_work_base_ed25519
+ *
+ * The order of the base point is \f$ 2^{252} + 27742317777372353535851937790883648493 \f$.
+ */
+extern const ecc_25519_work_t ecc_25519_work_base_legacy;
+
+
+/**
+ * The ec25519 legacy generator point (provided for API/ABI compatiblity with older releases of libuecc)
+ *
+ * \deprecated Use \ref ecc_25519_work_base_legacy instead.
+ */
+DEPRECATED extern const ecc_25519_work_t ecc_25519_work_default_base;
@@ -143,15 +175,19 @@ void ecc_25519_scalarmult(ecc_25519_work_t *out, const ecc_int256_t *n, const ec
* The order of the base point is \f$ 2^{252} + 27742317777372353535851937790883648493 \f$.
*
* See the notes about \ref ecc_25519_scalarmult_bits before using this function.
+ *
+ * \deprecated Use \ref ecc_25519_scalarmult_bits and explicitly specify the base point.
*/
-void ecc_25519_scalarmult_base_bits(ecc_25519_work_t *out, const ecc_int256_t *n, unsigned bits);
+DEPRECATED void ecc_25519_scalarmult_base_bits(ecc_25519_work_t *out, const ecc_int256_t *n, unsigned bits);
/**
* Does a scalar multiplication of the default base point (generator element) of the Elliptic Curve with an integer
*
* The order of the base point is \f$ 2^{252} + 27742317777372353535851937790883648493 \f$.
+ *
+ * \deprecated Use \ref ecc_25519_scalarmult and explicitly specify the base point.
*/
-void ecc_25519_scalarmult_base(ecc_25519_work_t *out, const ecc_int256_t *n);
+DEPRECATED void ecc_25519_scalarmult_base(ecc_25519_work_t *out, const ecc_int256_t *n);
/**@}*/