Merge branch 'master' into ds-falcon-type-punning

This commit is contained in:
mergify[bot] 2020-03-14 09:51:06 +00:00 committed by GitHub
commit 57265306de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 8 additions and 8 deletions

View File

@ -5,7 +5,7 @@ static const uint32_t qinv = 12287; // -inverse_mod(p,2^18)
static const uint32_t rlog = 18;
/*************************************************
* Name: verify
* Name: montgomery_reduce
*
* Description: Montgomery reduction; given a 32-bit integer a, computes
* 16-bit integer congruent to a * R^-1 mod q,

View File

@ -22,7 +22,7 @@ int PQCLEAN_NEWHOPE1024CCA_CLEAN_verify(const unsigned char *a, const unsigned c
r |= a[i] ^ b[i];
}
r = (-(int64_t)r) >> 63;
r = (uint64_t)(-(int64_t)r) >> 63;
return (int)r;
}

View File

@ -5,7 +5,7 @@ static const uint32_t qinv = 12287; // -inverse_mod(p,2^18)
static const uint32_t rlog = 18;
/*************************************************
* Name: verify
* Name: montgomery_reduce
*
* Description: Montgomery reduction; given a 32-bit integer a, computes
* 16-bit integer congruent to a * R^-1 mod q,

View File

@ -22,7 +22,7 @@ int PQCLEAN_NEWHOPE1024CPA_CLEAN_verify(const unsigned char *a, const unsigned c
r |= a[i] ^ b[i];
}
r = (-(int64_t)r) >> 63;
r = (uint64_t)(-(int64_t)r) >> 63;
return (int)r;
}

View File

@ -5,7 +5,7 @@ static const uint32_t qinv = 12287; // -inverse_mod(p,2^18)
static const uint32_t rlog = 18;
/*************************************************
* Name: verify
* Name: montgomery_reduce
*
* Description: Montgomery reduction; given a 32-bit integer a, computes
* 16-bit integer congruent to a * R^-1 mod q,

View File

@ -22,7 +22,7 @@ int PQCLEAN_NEWHOPE512CCA_CLEAN_verify(const unsigned char *a, const unsigned ch
r |= a[i] ^ b[i];
}
r = (-(int64_t)r) >> 63;
r = (uint64_t)(-(int64_t)r) >> 63;
return (int)r;
}

View File

@ -5,7 +5,7 @@ static const uint32_t qinv = 12287; // -inverse_mod(p,2^18)
static const uint32_t rlog = 18;
/*************************************************
* Name: verify
* Name: montgomery_reduce
*
* Description: Montgomery reduction; given a 32-bit integer a, computes
* 16-bit integer congruent to a * R^-1 mod q,

View File

@ -22,7 +22,7 @@ int PQCLEAN_NEWHOPE512CPA_CLEAN_verify(const unsigned char *a, const unsigned ch
r |= a[i] ^ b[i];
}
r = (-(int64_t)r) >> 63;
r = (uint64_t)(-(int64_t)r) >> 63;
return (int)r;
}