From c3da1af20e3ef06c7f7ab69181b287a949a7d2a1 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 10 Sep 2026 05:20:15 -0500 Subject: [PATCH] Bump noise-c to 0.1.28 and libsodium to 1.10021.9 noise-c 0.1.28 turns its size switches off in library.json, so the three project build flags go; libsodium 1.10021.9 carries the compact SHA256 transform. --- esphome/components/noise/__init__.py | 8 ++------ platformio.ini | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/esphome/components/noise/__init__.py b/esphome/components/noise/__init__.py index de60d1ba67..075d606b79 100644 --- a/esphome/components/noise/__init__.py +++ b/esphome/components/noise/__init__.py @@ -88,16 +88,12 @@ def encryption_schema(config: ConfigType | None) -> ConfigType: async def to_code(config: ConfigType) -> None: cg.add_define("USE_NOISE") - cg.add_library("esphome/noise-c", "0.1.27") + cg.add_library("esphome/noise-c", "0.1.28") # noise-c depends on libsodium, but declaring it here too lets the # library manager see the full set up front instead of discovering # libsodium only after noise-c has downloaded, so the two can download # in parallel. The version must match noise-c's library.json. - cg.add_library("esphome/libsodium", "1.10021.8") + cg.add_library("esphome/libsodium", "1.10021.9") # Enable optimized memzero/memcmp in libsodium instead of volatile byte loops cg.add_build_flag("-DHAVE_WEAK_SYMBOLS=1") cg.add_build_flag("-DHAVE_INLINE_ASM=1") - # The handshake is built from algorithm ids and never names a protocol, so - # noise-c can leave its name tables and the unused handshake modifiers out - for switch in ("PROTOCOL_NAME_TABLE", "FALLBACK", "HFS"): - cg.add_build_flag(f"-DNOISE_USE_{switch}=0") diff --git a/platformio.ini b/platformio.ini index 55bf11b3f1..431957de11 100644 --- a/platformio.ini +++ b/platformio.ini @@ -45,7 +45,7 @@ lib_deps_base = lib_deps = ${common.lib_deps_base} https://github.com/dudanov/MideaUART.git#eeea6c3e9b4474f067054592b435be1c4e466815 ; midea - esphome/noise-c@0.1.27 ; noise (api, ota) + esphome/noise-c@0.1.28 ; noise (api, ota) improv/Improv@1.2.7 ; improv_serial / esp32_improv kikuchan98/pngle@1.1.0 ; online_image ; Using the repository directly, otherwise ESP-IDF can't use the library @@ -244,7 +244,7 @@ lib_deps = ${common:idf-component-libs.lib_deps} ESP32Async/ESPAsyncWebServer@3.9.6 ; web_server_base droscy/esp_wireguard@0.4.5 ; wireguard - esphome/noise-c@0.1.27 ; noise (api, ota) + esphome/noise-c@0.1.28 ; noise (api, ota) ESP32Async/AsyncTCP@3.4.5 ; async_tcp DNSServer ; captive_portal heman/AsyncMqttClient-esphome@2.0.0 ; mqtt @@ -641,7 +641,7 @@ build_unflags = extends = common platform = platformio/native lib_deps = - esphome/noise-c@0.1.27 ; used by noise (api, ota) + esphome/noise-c@0.1.28 ; used by noise (api, ota) lvgl/lvgl@9.5.0 ; lvgl build_flags = ${common.build_flags}