mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
from_hash: clear the high bit
This commit is contained in:
parent
10b991d518
commit
8a1ac8e11f
@ -2623,7 +2623,6 @@ ge25519_from_hash(unsigned char s[32], const unsigned char h[64])
|
||||
fe25519_frombytes(fe_f, fl);
|
||||
fe25519_frombytes(fe_g, gl);
|
||||
fe_f[0] += (h[0 + 31] >> 7) * 19;
|
||||
fe_g[0] += (h[32 + 31] >> 7) * 19;
|
||||
for (i = 0; i < sizeof (fe25519) / sizeof fe_f[0]; i++) {
|
||||
fe_f[i] += 38 * fe_g[i];
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ sodium_hrtime(void)
|
||||
static uint64_t
|
||||
sodium_hrtime(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
struct timeval tv;
|
||||
|
||||
if (gettimeofday(&tv, NULL) != 0) {
|
||||
sodium_misuse(); /* LCOV_EXCL_LINE */
|
||||
|
Loading…
Reference in New Issue
Block a user