| @@ -751,7 +751,7 @@ WARN_LOGFILE = | |||||
| # spaces. | # spaces. | ||||
| # Note: If this tag is empty the current directory is searched. | # Note: If this tag is empty the current directory is searched. | ||||
| INPUT = | |||||
| INPUT = include | |||||
| # This tag can be used to specify the character encoding of the source files | # This tag can be used to specify the character encoding of the source files | ||||
| # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses | # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses | ||||
| @@ -224,10 +224,12 @@ decaf_bool_t decaf_448_scalar_invert ( | |||||
| * @param [out] out Will become a copy of a. | * @param [out] out Will become a copy of a. | ||||
| */ | */ | ||||
| /* PERF: make this memcpy */ | /* PERF: make this memcpy */ | ||||
| void decaf_448_scalar_copy ( | |||||
| static inline void NONNULL2 decaf_448_scalar_copy ( | |||||
| decaf_448_scalar_t out, | decaf_448_scalar_t out, | ||||
| const decaf_448_scalar_t a | const decaf_448_scalar_t a | ||||
| ) API_VIS NONNULL2; | |||||
| ) { | |||||
| *out = *a; | |||||
| } | |||||
| /** | /** | ||||
| * @brief Set a scalar to an integer. | * @brief Set a scalar to an integer. | ||||
| @@ -276,10 +278,12 @@ decaf_bool_t decaf_448_point_decode ( | |||||
| * @param [out] a A copy of the point. | * @param [out] a A copy of the point. | ||||
| * @param [in] b Any point. | * @param [in] b Any point. | ||||
| */ | */ | ||||
| void decaf_448_point_copy ( | |||||
| static inline void NONNULL2 decaf_448_point_copy ( | |||||
| decaf_448_point_t a, | decaf_448_point_t a, | ||||
| const decaf_448_point_t b | const decaf_448_point_t b | ||||
| ) API_VIS NONNULL2; | |||||
| ) { | |||||
| *a=*b; | |||||
| } | |||||
| /** | /** | ||||
| * @brief Test whether two points are equal. If yes, return | * @brief Test whether two points are equal. If yes, return | ||||
| @@ -173,13 +173,13 @@ public: | |||||
| /** @brief Compare in constant time */ | /** @brief Compare in constant time */ | ||||
| inline bool operator==(const Scalar &q) const NOEXCEPT { return !!decaf_448_scalar_eq(s,q.s); } | inline bool operator==(const Scalar &q) const NOEXCEPT { return !!decaf_448_scalar_eq(s,q.s); } | ||||
| /** @brief Invert with Fermat's Little Theorem (slow!) */ | |||||
| /** @brief Invert with Fermat's Little Theorem (slow!). If *this == 0, return 0. */ | |||||
| inline Scalar inverse() const NOEXCEPT { Scalar r; decaf_448_scalar_invert(r.s,s); return r; } | inline Scalar inverse() const NOEXCEPT { Scalar r; decaf_448_scalar_invert(r.s,s); return r; } | ||||
| /** @brief Divide by inverting q. */ | |||||
| /** @brief Divide by inverting q. If q == 0, return 0. */ | |||||
| inline Scalar operator/ (const Scalar &q) const NOEXCEPT { Scalar r; decaf_448_scalar_mul(r.s,s,q.inverse().s); return r; } | inline Scalar operator/ (const Scalar &q) const NOEXCEPT { Scalar r; decaf_448_scalar_mul(r.s,s,q.inverse().s); return r; } | ||||
| /** @brief Divide by inverting q. */ | |||||
| /** @brief Divide by inverting q. If q == 0, return 0. */ | |||||
| inline Scalar operator/=(const Scalar &q) NOEXCEPT { decaf_448_scalar_mul(s,s,q.inverse().s); return *this; } | inline Scalar operator/=(const Scalar &q) NOEXCEPT { decaf_448_scalar_mul(s,s,q.inverse().s); return *this; } | ||||
| /** @brief Scalarmul with scalar on left. */ | /** @brief Scalarmul with scalar on left. */ | ||||
| @@ -412,16 +412,6 @@ void decaf_448_scalar_add ( | |||||
| decaf_448_subx(out, out->limb, decaf_448_scalar_p, decaf_448_scalar_p, chain); | decaf_448_subx(out, out->limb, decaf_448_scalar_p, decaf_448_scalar_p, chain); | ||||
| } | } | ||||
| void decaf_448_scalar_copy ( | |||||
| decaf_448_scalar_t out, | |||||
| const decaf_448_scalar_t a | |||||
| ) { | |||||
| unsigned int i; | |||||
| for (i=0; i<DECAF_448_SCALAR_LIMBS; i++) { | |||||
| out->limb[i] = a->limb[i]; | |||||
| } | |||||
| } | |||||
| void decaf_448_scalar_set ( | void decaf_448_scalar_set ( | ||||
| decaf_448_scalar_t out, | decaf_448_scalar_t out, | ||||
| decaf_word_t w | decaf_word_t w | ||||
| @@ -575,16 +565,6 @@ void decaf_448_point_double(decaf_448_point_t a, const decaf_448_point_t b) { | |||||
| decaf_448_point_add(a,b,b); | decaf_448_point_add(a,b,b); | ||||
| } | } | ||||
| void decaf_448_point_copy ( | |||||
| decaf_448_point_t a, | |||||
| const decaf_448_point_t b | |||||
| ) { | |||||
| gf_cpy(a->x, b->x); | |||||
| gf_cpy(a->y, b->y); | |||||
| gf_cpy(a->z, b->z); | |||||
| gf_cpy(a->t, b->t); | |||||
| } | |||||
| void decaf_448_point_negate ( | void decaf_448_point_negate ( | ||||
| decaf_448_point_t nega, | decaf_448_point_t nega, | ||||
| const decaf_448_point_t a | const decaf_448_point_t a | ||||
| @@ -423,16 +423,6 @@ snv decaf_448_halve ( | |||||
| out->limb[i] = out->limb[i]>>1 | chain<<(WBITS-1); | out->limb[i] = out->limb[i]>>1 | chain<<(WBITS-1); | ||||
| } | } | ||||
| void decaf_448_scalar_copy ( | |||||
| decaf_448_scalar_t out, | |||||
| const decaf_448_scalar_t a | |||||
| ) { | |||||
| unsigned int i; | |||||
| for (i=0; i<DECAF_448_SCALAR_LIMBS; i++) { | |||||
| out->limb[i] = a->limb[i]; | |||||
| } | |||||
| } | |||||
| void decaf_448_scalar_set ( | void decaf_448_scalar_set ( | ||||
| decaf_448_scalar_t out, | decaf_448_scalar_t out, | ||||
| decaf_word_t w | decaf_word_t w | ||||
| @@ -623,16 +613,6 @@ void decaf_448_point_double(decaf_448_point_t p, const decaf_448_point_t q) { | |||||
| decaf_448_point_double_internal(p,q,0); | decaf_448_point_double_internal(p,q,0); | ||||
| } | } | ||||
| void decaf_448_point_copy ( | |||||
| decaf_448_point_t a, | |||||
| const decaf_448_point_t b | |||||
| ) { | |||||
| gf_cpy(a->x, b->x); | |||||
| gf_cpy(a->y, b->y); | |||||
| gf_cpy(a->z, b->z); | |||||
| gf_cpy(a->t, b->t); | |||||
| } | |||||
| void decaf_448_point_negate ( | void decaf_448_point_negate ( | ||||
| decaf_448_point_t nega, | decaf_448_point_t nega, | ||||
| const decaf_448_point_t a | const decaf_448_point_t a | ||||