]> git.meshlink.io Git - meshlink-tiny/commitdiff
Make the precomputed Ed25519 data const.
authorGuus Sliepen <guus@meshlink.io>
Thu, 19 Aug 2021 19:01:54 +0000 (21:01 +0200)
committerGuus Sliepen <guus@meshlink.io>
Thu, 9 Sep 2021 15:38:48 +0000 (17:38 +0200)
src/ed25519/ge.c
src/ed25519/precomp_data.h

index 3c342b1d2126619ecd1eb2e0ec0509c46199b082..87c691bff55d66e591c1fb3c2bdf87a4efee200d 100644 (file)
@@ -346,7 +346,7 @@ static unsigned char negative(signed char b) {
     return (unsigned char) x;
 }
 
-static void cmov(ge_precomp *t, ge_precomp *u, unsigned char b) {
+static void cmov(ge_precomp *t, const ge_precomp *u, unsigned char b) {
     fe_cmov(t->yplusx, u->yplusx, b);
     fe_cmov(t->yminusx, u->yminusx, b);
     fe_cmov(t->xy2d, u->xy2d, b);
index ce59788cb177561b8325d85d07ae74e2cc59eb3a..ff23986c3980237ddbd2556710a0b7ab7f7ee8ec 100644 (file)
@@ -1,4 +1,4 @@
-static ge_precomp Bi[8] = {
+static const ge_precomp Bi[8] = {
     {
         { 25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605 },
         { -12545711, 934262, -2722910, 3049990, -727428, 9406986, 12720692, 5043384, 19500929, -15469378 },
@@ -43,7 +43,7 @@ static ge_precomp Bi[8] = {
 
 
 /* base[i][j] = (j+1)*256^i*B */
-static ge_precomp base[32][8] = {
+static const ge_precomp base[32][8] = {
     {
         {
             { 25967493, -14356035, 29566456, 3660896, -12694345, 4014787, 27544626, -11754271, -6079156, 2047605 },