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 2b7c6ac..ac2e165 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,6 +8,9 @@ #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 @@ -915,7 +918,9 @@ static bool findProgramAddress(const std::vector> &seeds, c reinterpret_cast(kProgramDerivedAddressMarker), strlen(kProgramDerivedAddressMarker)); crypto_hash_sha256_final(&st, out32); - if (crypto_core_ed25519_is_valid_point(out32) == 0) { + bool isCanonical = ge25519_is_canonical(out32) != 0; + bool isOnCurve = ge25519_is_on_curve(out32) != 0; + if (!(isCanonical && isOnCurve)) { return true; } } diff --git a/VERSION.properties b/VERSION.properties index 0162f47..8e7f4ef 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.170 -server.version=1.2.159 +client.version=1.2.171 +server.version=1.2.160