utils/split-pieces, pub/ed25519.c: New utility makes field-element constants.
[catacomb] / pub / ed25519.c
index a5fe57b..217cbeb 100644 (file)
@@ -86,35 +86,35 @@ const key_fetchdef ed25519_privfetch[] = {
 
 #if F25519_IMPL == 26
 # define P p26
-  static const int32 bx_pieces[] = {
+  static const f25519_piece bx_pieces[] = {
     -14297830,  -7645148,  16144683, -16471763,  27570974,
      -2696100, -26142465,   8378389,  20764389,   8758491
   }, by_pieces[] = {
-    -26843560,  -6710886,  13421773, -13421773,  26843546,
-      6710886, -13421773,  13421773, -26843546,  26843546
+    -26843541,  -6710886,  13421773, -13421773,  26843546,
+      6710886, -13421773,  13421773, -26843546,  -6710886
   }, d_pieces[] = {
-    -10913629,  13857413, -15372611,   6949391,    114729,
-     -8787816,  -6275908,  -3247719, -18696448,  21499316
+    -10913610,  13857413, -15372611,   6949391,    114729,
+     -8787816,  -6275908,  -3247719, -18696448, -12055116
   };
 #endif
 #if F25519_IMPL == 10
 # define P p10
-  static const int16 bx_pieces[] = {
+  static const f25519_piece bx_pieces[] = {
      282,  373,  242,  386, -467,   86, -423,  318, -437,
       75,  236, -308,  421,   92,  439,  -35,  400,  452,
       82,  -40,  160,  441,  -51,  437, -365,  134
   }, by_pieces[] = {
-    -424,  410, -410,  410, -410, -102,  205, -205,  205,
+    -405,  410, -410,  410, -410, -102,  205, -205,  205,
     -205,  205, -410,  410, -410,  410,  102, -205,  205,
-    -205,  205, -205,  410, -410,  410, -410,  410
+    -205,  205, -205,  410, -410,  410, -410, -102
   }, d_pieces[] = {
-     163, -418,  310, -216, -178, -133,  367, -315, -380,
+     182, -418,  310, -216, -178, -133,  367, -315, -380,
     -351, -182, -255,    2,  152, -390, -136,  -52, -383,
-    -412, -398,  -12,  448, -469, -196,   55,  328
+    -412, -398,  -12,  448, -469, -196,   55, -184
   };
 #endif
 
-static const scaf_piece bz_pieces[NPIECE] = { 1, 0, /* ... */ };
+static const f25519_piece bz_pieces[NPIECE] = { 1, 0, /* ... */ };
 #define BX ((const f25519 *)bx_pieces)
 #define BY ((const f25519 *)by_pieces)
 #define BZ ((const f25519 *)bz_pieces)