зеркало из https://github.com/mozilla/pjs.git
Bugzilla bug 334553: use the ULL suffix with unsigned long long constants.
r=douglas.stebila. Modified files: ecl/ecp_256.c mpi/mp_gf2m.c
This commit is contained in:
Родитель
5fc1ccf15e
Коммит
4f7485a0cd
|
@ -371,7 +371,7 @@ ec_GFp_nistp256_mod(const mp_int *a, mp_int *r, const GFMethod *meth)
|
||||||
|
|
||||||
/* final reduction if necessary */
|
/* final reduction if necessary */
|
||||||
if ((r3 > 0xFFFFFFFF00000001ULL) ||
|
if ((r3 > 0xFFFFFFFF00000001ULL) ||
|
||||||
((r3 == 0xFFFFFFFF00000001UL) &&
|
((r3 == 0xFFFFFFFF00000001ULL) &&
|
||||||
(r2 || (r1 >> 32)||
|
(r2 || (r1 >> 32)||
|
||||||
(r1 == 0xFFFFFFFFULL && r0 == MP_DIGIT_MAX)))) {
|
(r1 == 0xFFFFFFFFULL && r0 == MP_DIGIT_MAX)))) {
|
||||||
/* very rare, just use mp_sub */
|
/* very rare, just use mp_sub */
|
||||||
|
|
|
@ -92,7 +92,7 @@ s_bmul_1x1(mp_digit *rh, mp_digit *rl, const mp_digit a, const mp_digit b)
|
||||||
mp_digit tab[16], top3b = a >> 61;
|
mp_digit tab[16], top3b = a >> 61;
|
||||||
register mp_digit a1, a2, a4, a8;
|
register mp_digit a1, a2, a4, a8;
|
||||||
|
|
||||||
a1 = a & (0x1FFFFFFFFFFFFFFF); a2 = a1 << 1;
|
a1 = a & (0x1FFFFFFFFFFFFFFFULL); a2 = a1 << 1;
|
||||||
a4 = a2 << 1; a8 = a4 << 1;
|
a4 = a2 << 1; a8 = a4 << 1;
|
||||||
tab[ 0] = 0; tab[ 1] = a1; tab[ 2] = a2; tab[ 3] = a1^a2;
|
tab[ 0] = 0; tab[ 1] = a1; tab[ 2] = a2; tab[ 3] = a1^a2;
|
||||||
tab[ 4] = a4; tab[ 5] = a1^a4; tab[ 6] = a2^a4; tab[ 7] = a1^a2^a4;
|
tab[ 4] = a4; tab[ 5] = a1^a4; tab[ 6] = a2^a4; tab[ 7] = a1^a2^a4;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче