Files
meshtastic_firmware/src
d4aa7760cc Use hardware RNG for session passkey and PKC extra nonce (#11047)
* Use hardware RNG for session passkey and PKC extra nonce

The admin session passkey and the Curve25519 extra nonce were drawn
from Arduino random(), which is not a CSPRNG. Source them from
HardwareRNG::fill, mirroring the signing path, and fall back to the
seeded CSPRNG (CryptRNG) only when no hardware source is available.

* AdminModule: make session passkey expiry rollover-safe

session_time was compared as millis()/1000 seconds with additive
thresholds, which breaks across the millis() wrap and could keep a stale
admin session key valid. Store session_time in millis() and use
Throttle::isWithinTimespanMs for the 150s refresh and 300s validity
windows.

* AdminModule: track session passkey validity with an explicit flag

session_time == 0 was used as the uninitialized sentinel, but millis()
is legitimately 0 in the first millisecond of uptime, so a passkey
issued then would be treated as no session. Use a dedicated
session_passkey_valid flag instead.

* AdminModule: camelCase the session passkey validity flag

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2026-07-17 15:49:00 -05:00
..
2026-03-24 12:39:21 -05:00
2026-07-16 18:35:33 -05:00
2026-07-01 19:01:27 -05:00
2026-01-29 05:56:19 -06:00
2026-02-19 07:16:33 -06:00
2026-07-16 18:35:33 -05:00
2026-05-11 11:46:13 -05:00
2026-07-01 19:01:27 -05:00
2026-07-16 18:57:50 -05:00
2026-07-01 19:01:27 -05:00
2023-01-21 21:23:24 +01:00
2026-07-01 19:01:27 -05:00
2026-07-16 18:57:50 -05:00