summaryrefslogtreecommitdiff
path: root/donna_64.cpp
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2018-12-28 11:16:41 -0500
committerJeffrey Walton <noloader@gmail.com>2018-12-28 11:16:41 -0500
commit9c58ba8f2bae898fddd19e1b4e02f66df7e739da (patch)
tree4528c01e36e9d725b29a17b0a4bc151b40ae69c9 /donna_64.cpp
parent856e374bba77fca8a42cc1d841fe3505bc370356 (diff)
downloadcryptopp-git-9c58ba8f2bae898fddd19e1b4e02f66df7e739da.tar.gz
Avoid use of uint8_t in donna64.cpp
Diffstat (limited to 'donna_64.cpp')
-rw-r--r--donna_64.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/donna_64.cpp b/donna_64.cpp
index 370ff43b..d54d492f 100644
--- a/donna_64.cpp
+++ b/donna_64.cpp
@@ -728,7 +728,7 @@ curve25519_contract(byte *out, const bignum25519 input) {
/* out = (flag) ? in : out */
inline void
-curve25519_move_conditional_bytes(uint8_t out[96], const uint8_t in[96], word64 flag) {
+curve25519_move_conditional_bytes(byte out[96], const byte in[96], word64 flag) {
const word64 nb = flag - 1, b = ~nb;
const word64 *inq = (const word64 *)in;
word64 *outq = (word64 *)out;
@@ -749,7 +749,7 @@ curve25519_move_conditional_bytes(uint8_t out[96], const uint8_t in[96], word64
/* if (iswap) swap(a, b) */
inline void
curve25519_swap_conditional(bignum25519 a, bignum25519 b, word64 iswap) {
- const word64 swap = (word64)(-(int64_t)iswap);
+ const word64 swap = (word64)(-(sword64)iswap);
word64 x0,x1,x2,x3,x4;
x0 = swap & (a[0] ^ b[0]); a[0] ^= x0; b[0] ^= x0;
@@ -1376,7 +1376,7 @@ ge25519_windowb_equal(word32 b, word32 c) {
}
void
-ge25519_scalarmult_base_choose_niels(ge25519_niels *t, const uint8_t table[256][96], word32 pos, signed char b) {
+ge25519_scalarmult_base_choose_niels(ge25519_niels *t, const byte table[256][96], word32 pos, signed char b) {
bignum25519 neg;
word32 sign = (word32)((byte)b >> 7);
word32 mask = ~(sign - 1);
@@ -1384,7 +1384,7 @@ ge25519_scalarmult_base_choose_niels(ge25519_niels *t, const uint8_t table[256][
word32 i;
/* ysubx, xaddy, t2d in packed form. initialize to ysubx = 1, xaddy = 1, t2d = 0 */
- uint8_t packed[96] = {0};
+ byte packed[96] = {0};
packed[0] = 1;
packed[32] = 1;
@@ -1406,7 +1406,7 @@ ge25519_scalarmult_base_choose_niels(ge25519_niels *t, const uint8_t table[256][
/* computes [s]basepoint */
void
-ge25519_scalarmult_base_niels(ge25519 *r, const uint8_t basepoint_table[256][96], const bignum256modm s) {
+ge25519_scalarmult_base_niels(ge25519 *r, const byte basepoint_table[256][96], const bignum256modm s) {
signed char b[64];
word32 i;
ge25519_niels t;