From 5ade164170ee0349ddd82ed5bdac1212d2484176 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Fri, 18 Mar 2016 15:12:46 +0100 Subject: 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. --- include/libuecc/ecc.h | 32 +++++++++++--------------------- src/ec25519.c | 4 ++-- 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); } -- cgit v1.2.3