First board lands. wadamesh builds the LVGL touch firmware as its own project, consuming the MeshCore core via lib_deps @ git tag (ALLFATHER-BV/MeshCore #v1.16.0-wada.0) — no vendored core in this repo. Output is byte-identical to the in-tree meshcomod build (delta = embedded build-path strings only). Contents: companion_radio app (MyMesh/main/DataStore), ui-touch LVGL UI, variants/heltec_v4 board glue, boards/heltec_v4.json, lv_conf, the bundled ed25519 lib, AsyncElegantOTA, partition table, and a flattened platformio.ini for env heltec_v4_tft_companion_radio_usb_tcp_touch. MeshCore-derived files (app glue) remain MIT; ui-touch is GPL — see NOTICE. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Kaj Schittecat <kaj@schittecat.com>
75 lines
1.6 KiB
C
75 lines
1.6 KiB
C
#ifndef GE_H
|
|
#define GE_H
|
|
|
|
#include "fe.h"
|
|
|
|
|
|
/*
|
|
ge means group element.
|
|
|
|
Here the group is the set of pairs (x,y) of field elements (see fe.h)
|
|
satisfying -x^2 + y^2 = 1 + d x^2y^2
|
|
where d = -121665/121666.
|
|
|
|
Representations:
|
|
ge_p2 (projective): (X:Y:Z) satisfying x=X/Z, y=Y/Z
|
|
ge_p3 (extended): (X:Y:Z:T) satisfying x=X/Z, y=Y/Z, XY=ZT
|
|
ge_p1p1 (completed): ((X:Z),(Y:T)) satisfying x=X/Z, y=Y/T
|
|
ge_precomp (Duif): (y+x,y-x,2dxy)
|
|
*/
|
|
|
|
typedef struct {
|
|
fe X;
|
|
fe Y;
|
|
fe Z;
|
|
} ge_p2;
|
|
|
|
typedef struct {
|
|
fe X;
|
|
fe Y;
|
|
fe Z;
|
|
fe T;
|
|
} ge_p3;
|
|
|
|
typedef struct {
|
|
fe X;
|
|
fe Y;
|
|
fe Z;
|
|
fe T;
|
|
} ge_p1p1;
|
|
|
|
typedef struct {
|
|
fe yplusx;
|
|
fe yminusx;
|
|
fe xy2d;
|
|
} ge_precomp;
|
|
|
|
typedef struct {
|
|
fe YplusX;
|
|
fe YminusX;
|
|
fe Z;
|
|
fe T2d;
|
|
} ge_cached;
|
|
|
|
void ge_p3_tobytes(unsigned char *s, const ge_p3 *h);
|
|
void ge_tobytes(unsigned char *s, const ge_p2 *h);
|
|
int ge_frombytes_negate_vartime(ge_p3 *h, const unsigned char *s);
|
|
|
|
void ge_add(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q);
|
|
void ge_sub(ge_p1p1 *r, const ge_p3 *p, const ge_cached *q);
|
|
void ge_double_scalarmult_vartime(ge_p2 *r, const unsigned char *a, const ge_p3 *A, const unsigned char *b);
|
|
void ge_madd(ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q);
|
|
void ge_msub(ge_p1p1 *r, const ge_p3 *p, const ge_precomp *q);
|
|
void ge_scalarmult_base(ge_p3 *h, const unsigned char *a);
|
|
|
|
void ge_p1p1_to_p2(ge_p2 *r, const ge_p1p1 *p);
|
|
void ge_p1p1_to_p3(ge_p3 *r, const ge_p1p1 *p);
|
|
void ge_p2_0(ge_p2 *h);
|
|
void ge_p2_dbl(ge_p1p1 *r, const ge_p2 *p);
|
|
void ge_p3_0(ge_p3 *h);
|
|
void ge_p3_dbl(ge_p1p1 *r, const ge_p3 *p);
|
|
void ge_p3_to_cached(ge_cached *r, const ge_p3 *p);
|
|
void ge_p3_to_p2(ge_p2 *r, const ge_p3 *p);
|
|
|
|
#endif
|