literal suffix
This commit is contained in:
parent
431ea331d7
commit
e7f34c6969
@ -45,7 +45,7 @@ mp_err s_mp_prime_random_ex(mp_int *a, int t, int size, int flags, private_mp_pr
|
||||
}
|
||||
|
||||
/* calc the maskAND value for the MSbyte*/
|
||||
maskAND = ((size&7) == 0) ? 0xFF : (unsigned char)(0xFF >> (8 - (size & 7)));
|
||||
maskAND = ((size&7) == 0) ? 0xFFu : (unsigned char)(0xFFu >> (8 - (size & 7)));
|
||||
|
||||
/* calc the maskOR_msb */
|
||||
maskOR_msb = 0;
|
||||
@ -55,9 +55,9 @@ mp_err s_mp_prime_random_ex(mp_int *a, int t, int size, int flags, private_mp_pr
|
||||
}
|
||||
|
||||
/* get the maskOR_lsb */
|
||||
maskOR_lsb = 1;
|
||||
maskOR_lsb = 1u;
|
||||
if ((flags & MP_PRIME_BBS) != 0) {
|
||||
maskOR_lsb |= 3;
|
||||
maskOR_lsb |= 3u;
|
||||
}
|
||||
|
||||
do {
|
||||
|
@ -30,7 +30,7 @@ mp_err mp_rand(mp_int *a, int digits)
|
||||
}
|
||||
|
||||
/* TODO: We ensure that the highest digit is nonzero. Should this be removed? */
|
||||
while ((a->dp[digits - 1] & MP_MASK) == 0) {
|
||||
while ((a->dp[digits - 1] & MP_MASK) == 0u) {
|
||||
if ((err = s_mp_rand_source(a->dp + digits - 1, sizeof(mp_digit))) != MP_OKAY) {
|
||||
return err;
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ mp_err s_mp_exptmod(const mp_int *G, const mp_int *X, const mp_int *P, mp_int *Y
|
||||
}
|
||||
|
||||
/* grab the next msb from the exponent */
|
||||
y = (buf >> (mp_digit)(MP_DIGIT_BIT - 1)) & 1;
|
||||
y = (buf >> (mp_digit)(MP_DIGIT_BIT - 1)) & 1uL;
|
||||
buf <<= (mp_digit)1;
|
||||
|
||||
/* if the bit is zero and mode == 0 then we ignore it
|
||||
|
@ -200,7 +200,7 @@ mp_err s_mp_exptmod_fast(const mp_int *G, const mp_int *X, const mp_int *P, mp_i
|
||||
}
|
||||
|
||||
/* grab the next msb from the exponent */
|
||||
y = (mp_digit)(buf >> (MP_DIGIT_BIT - 1)) & 1;
|
||||
y = (mp_digit)(buf >> (MP_DIGIT_BIT - 1)) & 1uL;
|
||||
buf <<= (mp_digit)1;
|
||||
|
||||
/* if the bit is zero and mode == 0 then we ignore it
|
||||
|
Loading…
Reference in New Issue
Block a user