# include "curve448utils.h"
# include "field.h"
+/* Comb config: number of combs, n, t, s. */
+#define COMBS_N 5
+#define COMBS_T 5
+#define COMBS_S 18
+
+/* Projective Niels coordinates */
+typedef struct {
+ gf a, b, c;
+} niels_s, niels_t[1];
+typedef struct {
+ niels_t n;
+ gf z;
+} pniels_t[1];
+
+/* Precomputed base */
+struct curve448_precomputed_s {
+ niels_t table[COMBS_N << (COMBS_T - 1)];
+};
# define C448_SCALAR_LIMBS ((446-1)/C448_WORD_BITS+1)
const curve448_scalar_t s);
/*
- * Add two scalars. The scalars may use the same memory.
+ * Add two scalars. |a|, |b| and |out| may alias each other.
*
* a (in): One scalar.
* b (in): Another scalar.
const curve448_scalar_t a, const curve448_scalar_t b);
/*
- * Subtract two scalars. The scalars may use the same memory.
+ * Subtract two scalars. |a|, |b| and |out| may alias each other.
* a (in): One scalar.
* b (in): Another scalar.
* out (out): a-b.
const curve448_scalar_t a, const curve448_scalar_t b);
/*
- * Multiply two scalars. The scalars may use the same memory.
+ * Multiply two scalars. |a|, |b| and |out| may alias each other.
*
* a (in): One scalar.
* b (in): Another scalar.
const curve448_scalar_t a, const curve448_scalar_t b);
/*
-* Halve a scalar. The scalars may use the same memory.
+* Halve a scalar. |a| and |out| may alias each other.
*
* a (in): A scalar.
* out (out): a/2.