mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-20 02:25:14 -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_f, fl);
|
||||||
fe25519_frombytes(fe_g, gl);
|
fe25519_frombytes(fe_g, gl);
|
||||||
fe_f[0] += (h[0 + 31] >> 7) * 19;
|
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++) {
|
for (i = 0; i < sizeof (fe25519) / sizeof fe_f[0]; i++) {
|
||||||
fe_f[i] += 38 * fe_g[i];
|
fe_f[i] += 38 * fe_g[i];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user