From 556004a55788d4ab5a14d50c0ec3036ae996828734af5623403e9feb2cb32bb2 Mon Sep 17 00:00:00 2001 From: AidarKC Date: Sat, 13 Jun 2026 08:20:12 +0400 Subject: [PATCH] =?UTF-8?q?ESP32:=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20off-curve=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D1=83=20=D0=B4=D0=BB=D1=8F=20user=20PDA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shine_homeserver_main.ino | 19 +++++++++++++------ VERSION.properties | 4 ++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ESP32/esp32/ESP32-S3-Touch-AMOLED-2.16/main-device/shine_homeserver_main/shine_homeserver_main.ino b/ESP32/esp32/ESP32-S3-Touch-AMOLED-2.16/main-device/shine_homeserver_main/shine_homeserver_main.ino index ac2e165..80aab46 100644 --- a/ESP32/esp32/ESP32-S3-Touch-AMOLED-2.16/main-device/shine_homeserver_main/shine_homeserver_main.ino +++ b/ESP32/esp32/ESP32-S3-Touch-AMOLED-2.16/main-device/shine_homeserver_main/shine_homeserver_main.ino @@ -8,9 +8,6 @@ #include #include #include - -extern "C" int ge25519_is_canonical(const unsigned char *s); -extern "C" int ge25519_is_on_curve(const unsigned char *p); #include #include #include @@ -38,6 +35,17 @@ extern "C" int ge25519_is_on_curve(const unsigned char *p); #define TAP_CANCEL_THRESHOLD 18 #define MAX_SCAN_RESULTS 8 #define MAX_SAVED_WIFI_NETWORKS 8 + +extern "C" { +typedef int32_t fe25519[10]; +typedef struct { + fe25519 X; + fe25519 Y; + fe25519 Z; + fe25519 T; +} ge25519_p3; +int ge25519_frombytes(ge25519_p3 *h, const unsigned char *s); +} #define WIFI_CONNECT_TIMEOUT_MS 12000 #define WIFI_RECONNECT_FAST_MS 10000 #define WIFI_RECONNECT_SLOW_MS 30000 @@ -918,9 +926,8 @@ static bool findProgramAddress(const std::vector> &seeds, c reinterpret_cast(kProgramDerivedAddressMarker), strlen(kProgramDerivedAddressMarker)); crypto_hash_sha256_final(&st, out32); - bool isCanonical = ge25519_is_canonical(out32) != 0; - bool isOnCurve = ge25519_is_on_curve(out32) != 0; - if (!(isCanonical && isOnCurve)) { + ge25519_p3 point; + if (ge25519_frombytes(&point, out32) != 0) { return true; } } diff --git a/VERSION.properties b/VERSION.properties index 8e7f4ef..44d1b3f 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.171 -server.version=1.2.160 +client.version=1.2.172 +server.version=1.2.161