summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2016-03-18 15:12:46 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2016-03-18 15:12:46 +0100
commit5ade164170ee0349ddd82ed5bdac1212d2484176 (patch)
treee3c7cae6cadbe74a839603c4014613420a905878
parent740355d5ddb4e003e386951b9e74d8a4d49f609e (diff)
downloadlibuecc-5ade164170ee0349ddd82ed5bdac1212d2484176.tar
libuecc-5ade164170ee0349ddd82ed5bdac1212d2484176.zip
Deprecate ecc_25519_work_base_ed25519 and ecc_25519_work_base_legacy
The deprecation of ecc_25519_work_default_base and ecc_25519_scalarmult_base{,_bits} is reverted, as the Ed25519 and legacy base points are represented in the same way now.
-rw-r--r--include/libuecc/ecc.h32
-rw-r--r--src/ec25519.c4
2 files changed, 13 insertions, 23 deletions
diff --git a/include/libuecc/ecc.h b/include/libuecc/ecc.h
index 56c7538..0490bd5 100644
--- a/include/libuecc/ecc.h
+++ b/include/libuecc/ecc.h
@@ -68,33 +68,27 @@ extern const ecc_25519_work_t ecc_25519_work_identity;
/**
- * The generator point used by Ed25519
+ * The Ed25519 default generator point
*
- * \ref ecc_25519_work_base_ed25519 is the inverse of \ref ecc_25519_work_base_legacy
+ * \deprecated Use the equivalent \ref ecc_25519_work_default_base instead.
*
- * The order of the base point is \f$ 2^{252} + 27742317777372353535851937790883648493 \f$.
**/
-extern const ecc_25519_work_t ecc_25519_work_base_ed25519;
+DEPRECATED 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.
+ * The Ed25519 default generator point
*
- * \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$.
+ * \deprecated Use the equivalent \ref ecc_25519_work_default_base instead.
*/
-extern const ecc_25519_work_t ecc_25519_work_base_legacy;
+DEPRECATED 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)
+ * The Ed25519 default generator point
*
- * \deprecated Use \ref ecc_25519_work_base_legacy instead.
+ * The order of the base point is \f$ 2^{252} + 27742317777372353535851937790883648493 \f$.
*/
-DEPRECATED extern const ecc_25519_work_t ecc_25519_work_default_base;
+extern const ecc_25519_work_t ecc_25519_work_default_base;
/** Loads a point of the Ed25519 curve with given coordinates into its unpacked representation */
@@ -256,19 +250,15 @@ 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.
*/
-DEPRECATED void ecc_25519_scalarmult_base_bits(ecc_25519_work_t *out, const ecc_int256_t *n, unsigned bits);
+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.
*/
-DEPRECATED void ecc_25519_scalarmult_base(ecc_25519_work_t *out, const ecc_int256_t *n);
+void ecc_25519_scalarmult_base(ecc_25519_work_t *out, const ecc_int256_t *n);
/**@}*/
diff --git a/src/ec25519.c b/src/ec25519.c
index 0354f35..82ff709 100644
--- a/src/ec25519.c
+++ b/src/ec25519.c
@@ -851,9 +851,9 @@ void ecc_25519_scalarmult(ecc_25519_work_t *out, const ecc_int256_t *n, const ec
}
void ecc_25519_scalarmult_base_bits(ecc_25519_work_t *out, const ecc_int256_t *n, unsigned bits) {
- ecc_25519_scalarmult_bits(out, n, &ecc_25519_work_base_legacy, bits);
+ ecc_25519_scalarmult_bits(out, n, &ecc_25519_work_default_base, bits);
}
void ecc_25519_scalarmult_base(ecc_25519_work_t *out, const ecc_int256_t *n) {
- ecc_25519_scalarmult(out, n, &ecc_25519_work_base_legacy);
+ ecc_25519_scalarmult(out, n, &ecc_25519_work_default_base);
}