Skip to content

Commit

Permalink
More optblocker usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Oct 23, 2024
1 parent a9cbc57 commit 409b3a7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,9 @@ equal(signed char b, signed char c)
static unsigned char
negative(signed char b)
{
/* 18446744073709551361..18446744073709551615: yes; 0..255: no */
uint64_t x = b;
const uint8_t x = (uint8_t) b; /* 0..127: no 128..255: yes */

x >>= 63; /* 1: yes; 0: no */

return x;
return ((x >> 5) ^ optblocker_u8) >> 2; /* 1: yes; 0: no */
}

static void
Expand Down

0 comments on commit 409b3a7

Please sign in to comment.