Browse Source

minor fixes: fix unreachable code, fix an integer used in boolean context, thanks to Sofi Celi

master
Michael Hamburg 6 years ago
parent
commit
ffb134af3a
6 changed files with 6 additions and 6 deletions
  1. +1
    -1
      src/GENERATED/c/curve25519/decaf.c
  2. +1
    -1
      src/GENERATED/c/ed448goldilocks/decaf.c
  3. +1
    -1
      src/GENERATED/include/decaf/point_255.hxx
  4. +1
    -1
      src/GENERATED/include/decaf/point_448.hxx
  5. +1
    -1
      src/per_curve/decaf.tmpl.c
  6. +1
    -1
      src/per_curve/point.tmpl.hxx

+ 1
- 1
src/GENERATED/c/curve25519/decaf.c View File

@@ -763,7 +763,7 @@ decaf_bool_t API_NS(point_eq) ( const point_t p, const point_t q ) {
gf_mul ( b, q->y, p->x );
mask_t succ = gf_eq(a,b);
#if (COFACTOR == 8) && IMAGINE_TWIST
#if (COFACTOR == 8)
gf_mul ( a, p->y, q->y );
gf_mul ( b, q->x, p->x );
#if !(IMAGINE_TWIST)


+ 1
- 1
src/GENERATED/c/ed448goldilocks/decaf.c View File

@@ -763,7 +763,7 @@ decaf_bool_t API_NS(point_eq) ( const point_t p, const point_t q ) {
gf_mul ( b, q->y, p->x );
mask_t succ = gf_eq(a,b);
#if (COFACTOR == 8) && IMAGINE_TWIST
#if (COFACTOR == 8)
gf_mul ( a, p->y, q->y );
gf_mul ( b, q->x, p->x );
#if !(IMAGINE_TWIST)


+ 1
- 1
src/GENERATED/include/decaf/point_255.hxx View File

@@ -318,7 +318,7 @@ public:
*/
inline explicit Point(const FixedBlock<SER_BYTES> &buffer, bool allow_identity=true)
/*throw(CryptoException)*/ {
if (DECAF_SUCCESS != decode(buffer,allow_identity ? DECAF_TRUE : DECAF_FALSE)) {
if (DECAF_SUCCESS != decode(buffer,allow_identity)) {
throw CryptoException();
}
}


+ 1
- 1
src/GENERATED/include/decaf/point_448.hxx View File

@@ -318,7 +318,7 @@ public:
*/
inline explicit Point(const FixedBlock<SER_BYTES> &buffer, bool allow_identity=true)
/*throw(CryptoException)*/ {
if (DECAF_SUCCESS != decode(buffer,allow_identity ? DECAF_TRUE : DECAF_FALSE)) {
if (DECAF_SUCCESS != decode(buffer,allow_identity)) {
throw CryptoException();
}
}


+ 1
- 1
src/per_curve/decaf.tmpl.c View File

@@ -752,7 +752,7 @@ decaf_bool_t API_NS(point_eq) ( const point_t p, const point_t q ) {
gf_mul ( b, q->y, p->x );
mask_t succ = gf_eq(a,b);
#if (COFACTOR == 8) && IMAGINE_TWIST
#if (COFACTOR == 8)
gf_mul ( a, p->y, q->y );
gf_mul ( b, q->x, p->x );
#if !(IMAGINE_TWIST)


+ 1
- 1
src/per_curve/point.tmpl.hxx View File

@@ -305,7 +305,7 @@ public:
*/
inline explicit Point(const FixedBlock<SER_BYTES> &buffer, bool allow_identity=true)
/*throw(CryptoException)*/ {
if (DECAF_SUCCESS != decode(buffer,allow_identity ? DECAF_TRUE : DECAF_FALSE)) {
if (DECAF_SUCCESS != decode(buffer,allow_identity)) {
throw CryptoException();
}
}


Loading…
Cancel
Save