Mark all curve25519 tables const.
See also upstream's dc22d6b37e8058a4334e6f98932c2623cd3d8d0d. (Though I'm not sure why they didn't need to fix cmov.) Change-Id: I2a194a8aea1734d4c1e7f6a0536a636379381627 Reviewed-on: https://boringssl-review.googlesource.com/7280 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
7a17ba2e3a
commit
3cd8196f14
@ -1204,7 +1204,7 @@ static uint8_t equal(signed char b, signed char c) {
|
||||
return y;
|
||||
}
|
||||
|
||||
static void cmov(ge_precomp *t, ge_precomp *u, uint8_t b) {
|
||||
static void cmov(ge_precomp *t, const ge_precomp *u, uint8_t b) {
|
||||
fe_cmov(t->yplusx, u->yplusx, b);
|
||||
fe_cmov(t->yminusx, u->yminusx, b);
|
||||
fe_cmov(t->xy2d, u->xy2d, b);
|
||||
@ -1362,7 +1362,7 @@ void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]) {
|
||||
#else
|
||||
|
||||
/* k25519Precomp[i][j] = (j+1)*256^i*B */
|
||||
static ge_precomp k25519Precomp[32][8] = {
|
||||
static const ge_precomp k25519Precomp[32][8] = {
|
||||
{
|
||||
{
|
||||
{25967493, -14356035, 29566456, 3660896, -12694345, 4014787,
|
||||
@ -3653,7 +3653,7 @@ static void slide(signed char *r, const uint8_t *a) {
|
||||
}
|
||||
}
|
||||
|
||||
static ge_precomp Bi[8] = {
|
||||
static const ge_precomp Bi[8] = {
|
||||
{
|
||||
{25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626,
|
||||
-11754271, -6079156, 2047605},
|
||||
|
Loading…
Reference in New Issue
Block a user