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