Submitted:
05 October 2026
Posted:
08 October 2026
You are already at the latest version
Abstract
Internet of Things (IoT) devices need key agreement that is authenticated, forward-secret and cheap enough to run on a microcontroller. In our earlier work, a genetic-algorithm (GA)-optimised chaotic logistic map was used on an ESP32 to generate AES-256 keys. That study covered only symmetric encryption, and because the generator is deterministic, its output cannot act as a per-session secret. This paper builds a three-layer authenticated key exchange around it. Ed25519 signatures under pinned identity keys authenticate the two nodes, ephemeral X25519 keys seeded from hardware entropy provide session secrecy and forward secrecy, and the chaotic key serves as a pre-shared configuration credential checked with HMAC-SHA256. The session key is derived with HKDF-SHA256 over a transcript hash that covers both messages and both identities, and each side confirms it before the handshake ends. We implemented the protocol with wolfSSL 5.8.4 on two ESP32 DevKit V1 boards communicating over ESP-NOW. All 1,000 hardware handshakes reached confirmed key agreement (95% Clopper–Pearson interval 99.63–100%), the 2,000 ephemeral public keys were all distinct, and all 500 attack attempts across five scenarios were rejected, including every attempt that used chaotic parameters off by 10⁶. A handshake took 3,290.79 ms on average, most of it⁻ spent on Ed25519 verification (748.40 ms), while the chaotic layer added only 0.69 ms. We also describe an entropy-seeding defect in the Arduino build of wolfSSL, which made every “fresh” key identical across devices, and the fix we applied.
Keywords:
Internet of Things
; chaotic logistic map
; genetic algorithm
; authenticated key exchange
; X25519
; Ed25519
; HKDF
; forward secrecy
; ESP32
; ESP-NOW
1. Introduction
The IoT devices most exposed to attack are often the ones least able to pay for strong cryptography. A sensor node has a small fraction of the memory and energy that public-key cryptography was designed around, and yet an attacker can usually reach it directly over the radio. Work on lightweight cryptography has responded in two ways: by adopting compact elliptic curves such as Curve25519 [1,2], and by looking for cheaper sources of key material, where chaotic-map generators remain an active line of research [3,4,5].
Our own work has followed the second line. A simulation study evaluated a GA-optimised logistic map for lightweight key generation in IoT systems [6], and a hardware study then ran the optimised parameters (x0* = 0.487214, r* = 3.998721) on an ESP32 and used the resulting 256-bit key for AES-256-CBC encryption [7]. Two questions were left open. Only symmetric cryptography had been tested, and since x0* and r* are published constants, the generator produces the same key on every device and after every boot. It therefore cannot provide the fresh per-session secret that a key exchange needs.
This paper addresses both questions with a protocol in which each mechanism is given only the task it can defend. Section 4 describes a three-layer authenticated key exchange that keeps the chaotic generator structurally apart from the elliptic-curve exchange, binds the session key to both identities through a transcript-salted HKDF, and has both parties confirm the key in-band. Section 5 and Section 6 report a hardware implementation on two ESP32 boards, with every cryptographic operation timed separately over 1,000 handshakes, and an attack evaluation of five scenarios, one of which uses wrong chaotic parameters to test the chaotic layer on its own. Along the way we found and corrected an entropy-seeding defect in wolfSSL’s Arduino-ESP32 build, and an ephemeral-key uniqueness test confirms the fix.
2. Related Work
Chaos-based key generation has been studied widely for IoT. Kifouche et al. [3] built a complete chaos-based cryptosystem for IoT communication and ran it on an ARM Cortex-M3 microcontroller. Nazish et al. [4] extend the chaotic range of the logistic map to obtain a lightweight, high-speed bit generator, and Rahman et al. [5] generate AES keys from a logistic map for a smart-home system, which is the work closest to our earlier study [7]. In each of these, the chaotic output feeds a symmetric cipher.
Other work optimises the key generator itself. Hameedi et al. [8] select chaotic-map keys with the Grey Wolf Optimizer, while Kumar and Sharma [9] apply a genetic algorithm directly to elliptic-curve key generation, so that the optimiser shapes the key pairs. We take the opposite approach and keep the chaotic generator away from the elliptic-curve secret, so that its determinism has no way to weaken forward secrecy.
Chaos has also been proposed as the basis of public-key encryption [10], but such schemes were later broken [11], so our design places its hard problem on Curve25519 [1] instead. Plain Diffie–Hellman [12] is open to man-in-the-middle attacks. The SIGMA design [13] counters this by signing the ephemeral values and adding a MAC under a derived key that binds the identities, and our protocol follows the same sign-and-MAC idea, with HKDF [14] for key derivation. Hand-optimised X25519 needs 3.59 million cycles on a Cortex-M0 [15] and 0.91 million on a Cortex-M4 [16]. Our setting is different: we use a portable library on the ESP32, which is how most IoT firmware is built. Table 1 places this work against the closest related studies.
3. System and Threat Model
Two nodes, A and B, talk to each other directly over ESP-NOW. Each node generates its own long-term Ed25519 identity key on the device. At provisioning it also receives its peer’s identity public key, exchanged once out of band and then pinned, together with the chaotic configuration (x0, r) from which it computes Kchaos. The adversary controls the radio channel and can eavesdrop on, inject, modify, replay or drop frames. It knows the protocol and, in the configuration we evaluate, also knows the published (x0*, r*) and therefore Kchaos. It cannot read a node’s memory during a session, although it may steal a long-term key later. The protocol has five goals: (G1) mutual authentication, (G2) session-key secrecy, (G3) forward secrecy, (G4) key confirmation and transcript agreement, and (G5) configuration binding, meaning that only nodes holding the same chaotic configuration can complete a handshake. Side channels, jamming and extraction of keys from flash are outside our scope.
4. Protocol Design
Figure 1 gives the overall architecture. Both boards run the same three layers, and every handshake frame carries something from each of them: a signature from Layer 1, an ephemeral public key from Layer 2 and a chaotic HMAC tag from Layer 3.
4.1. Chaotic Pre-Shared Key
Kchaos comes from the generator of [7], used without modification. The logistic map
xn+1 = r · xn · (1 − xn) (1)
is iterated from x0* with r* in 32-bit floating point. The first 1,000 values are discarded as transients, the next 5,000 are recorded and their mean μ is computed, and the key bits are taken as
ki = 1 if xi > μ, otherwise 0, i = 1, …, 256 (2)
These bits are packed most-significant bit first into 32 bytes. On the ESP32 the whole computation takes 0.322 ms at boot, and the resulting key begins with 3CFF39CA1FADD856, the same value reported in [7]. Kchaos is used only as an HMAC key and plays no part in the ephemeral keys or the session key.
4.2. Handshake
Figure 2 shows the message flow. Each node P ∈ {A, B}, identified by the label idP, generates an ephemeral key pair (eP, EP) from the hardware-seeded generator and computes its Ed25519 signature [17] and chaotic tag:
σP = Ed25519-Sign (skP, “C4v2-HS” ‖ idP ‖ EP), τP = HMAC-SHA256(Kchaos, type ‖ EP ‖ σP) (3)
Each handshake message is 129 bytes and fits in a single ESP-NOW frame (Table 2). The responder B first checks σA against A’s pinned key and then τA against Kchaos. If either check fails, B rejects the message; only when both pass does it generate and send its own. Both sides then compute the shared secret, erase their ephemeral private keys, hash the transcript and derive the session key:
Z = X25519(eA, EB) = X25519(eB, EA) (4)
TH = SHA-256(“C4v2-TH” ‖ MI ‖ MR ‖ pkA ‖ pkB) (5)
sk = HKDF-SHA256(IKM = Z, salt = TH, info = “C4v2 session key”, L = 32) (6)
Finally, each side sends a 33-byte confirmation cP = HMAC-SHA256(sk, “C4v2-CF” ‖ idP ‖ TH) and checks the one it receives in constant time. The handshake succeeds only if both confirmations verify. A complete handshake uses four frames and 324 bytes. An all-zero Z, which a low-order peer point would produce, is rejected [2], and no key material is sent at any point.
4.3. Design Rationale
Three design choices need explanation. First, in a two-message exchange the initiator cannot sign the responder’s ephemeral key, because it has not yet seen it. We therefore put both messages and both identity keys into TH, which salts HKDF and is then authenticated by the confirmation tags. This mirrors the MAC-under-a-derived-key step of SIGMA [13] and prevents identity-misbinding attacks. Second, the responder never generates keys for a sender it has not authenticated, and it checks the signature before the HMAC, so every rejection can be traced to a single layer; each hash and MAC also carries its own label for domain separation. Third, Kchaos never enters X25519 or HKDF. Even when Kchaos is known, as our threat model assumes, goals G1–G4 depend only on Ed25519, X25519 and HKDF.
5. Implementation and Methodology
Table 3 lists the platform. The firmware is built on wolfSSL [18] and Espressif’s ESP-NOW interface. The same Arduino sketch runs on both boards, a single configuration line selects the role, and each board keeps its identity key in non-volatile storage.
During bring-up, two different boards printed the same “freshly generated” Ed25519 key. The cause lay in wolfSSL’s seed routine, which tests for a generic Arduino build before it tests for ESP-IDF, so every board fell back to the unseeded C function random() instead of the hardware generator. Had this gone unnoticed, every ephemeral key would have been predictable, and forward secrecy would have been lost without any visible error. We redirected the seed (CUSTOM_RAND_GENERATE_SEED) to esp_random(), which returns hardware entropy whenever the radio is on [19], and ESP-NOW keeps the radio on. Table 4 lists this problem together with the others we met during bring-up, since anyone reproducing the work is likely to meet them too.
Each operation is timed on its own with the microsecond timer. For every trial the firmware logs all timings, both ephemeral public keys and a four-byte fingerprint of the session key (never the key itself), and all printing happens outside the timed regions. Experiment E1 consists of 1,000 honest handshakes with Board A as initiator. In Experiment E2, Board A acts as the attacker and runs 100 trials in each of five scenarios; purely for logging, the responder returns a two-byte notice giving the reason for each rejection. Since the attacker knows Kchaos, it recomputes a valid HMAC in scenarios 1 and 2, so any rejection there must come from the signature layer. In scenario 3 the HMAC is keyed with a key generated from r = 3.998722. In scenario 5 the attacker replays a recorded genuine message, whose ephemeral private key has already been erased, and then answers with a random confirmation tag. All statistics were computed offline from the raw logs, with exact Clopper–Pearson intervals.
6. Results and Discussion
6.1. Reliability and Key Uniqueness
All 1,000 handshakes in E1 completed with both confirmation tags verified (100%; 95% Clopper–Pearson interval 99.63–100%), with no timeouts and no authentication failures (Table 5). The session-key fingerprints, logged separately by each board, matched in all 1,000 trials, and the 2,000 ephemeral public keys were all distinct. This confirms the seeding fix; before it, every board produced the same key.
6.2. Per-Operation Cost
Ed25519 verification is the most expensive operation, taking 2.12 times as long as a key generation. This is expected, since verification needs a double scalar multiplication, whereas key generation, signing and the shared-secret computation each need only one [17]. The chaotic layer, by contrast, costs almost nothing: generating and checking the tag took 0.341 ms and 0.350 ms. The total handshake time is not the sum of the initiator’s operations. Board A computes for 1,818.61 ms and spends 1,471.31 ms (44.7%) waiting for Board B, which itself needs 1,464.30 ms for verification, key generation, signing and tagging before it replies; the remainder is radio latency. The small standard deviations show that the timings are repeatable, but they are not evidence of constant-time behaviour.
Table 6.
Per-operation timing on the initiator (E1, N = 1,000); all values in ms.
| Operation | Mean | SD | Median | Min | Max |
| X25519 ephemeral key generation | 353.58 | 0.006 | 353.58 | 353.57 | 353.73 |
| Ed25519 signing | 361.76 | 0.004 | 361.76 | 361.75 | 361.81 |
| Chaotic-HMAC tag generation | 0.341 | 0.001 | 0.341 | 0.339 | 0.361 |
| Wait for peer’s handshake message | 1,471.31 | 5.02 | 1,470.13 | 1,469.11 | 1,543.14 |
| Ed25519 signature verification | 748.40 | 0.006 | 748.40 | 748.38 | 748.44 |
| Chaotic-HMAC tag verification | 0.350 | 0.001 | 0.349 | 0.348 | 0.352 |
| X25519 shared secret | 353.24 | 0.004 | 353.24 | 353.23 | 353.26 |
| Transcript hash + HKDF | 0.937 | 0.001 | 0.937 | 0.935 | 0.948 |
| Key-confirmation exchange | 0.667 | 0.002 | 0.667 | 0.662 | 0.672 |
| Total handshake | 3,290.79 | 5.02 | 3,289.60 | 3,288.58 | 3,362.60 |
6.3. Attack Evaluation
Every one of the 500 attempts was rejected at the check the design predicts, and none was accepted. Scenarios 1 and 2 show that the signature layer on its own stops key substitution and impersonation, even when the attacker can compute valid chaotic tags. Scenario 3 tests the chaotic layer directly. Changing r by 10−6 alters 127 of the 256 key bits (49.6%), and every handshake attempted with that key was rejected even though its signature was valid. In scenarios 1–4 the rejection comes after about one signature verification, before any key material is generated. A replayed message behaves differently. It passes both the signature and the HMAC checks, so it costs the responder a full handshake (1.83 s), but the attacker cannot derive sk and always fails key confirmation.
Table 7.
Attack evaluation (E2, 100 trials per scenario).
| Scenario | Expected check | Rejected | At expected check | Accepted | Mean time to reject (ms) |
| 1. Tampered ephemeral key (valid HMAC) | Signature | 100 | 100 | 0 | 755.86 |
| 2. Impostor identity (unpinned key) | Signature | 100 | 100 | 0 | 756.82 |
| 3. Wrong chaotic parameters (r = 3.998722) | HMAC | 100 | 100 | 0 | 757.65 |
| 4. Tampered HMAC tag | HMAC | 100 | 100 | 0 | 756.16 |
| 5. Replay of a recorded message | Key confirmation | 100 | 100 | 0 | 1,828.13 |
6.4. Resource Footprint and Comparison
The values in Table 8 cover the whole firmware, including the Arduino core, the Wi-Fi stack and the 20 KB buffer of the chaotic generator, not just the cryptographic code. Even so, the handshake leaves most of the heap free. Table 9 converts our mean times into clock cycles at 240 MHz and sets them beside published microcontroller results. The large gap reflects hand-optimised assembly on one side and a portable library compiled with memory-optimised arithmetic on the other; it says little about the protocol itself.
7. Security Analysis
Our arguments rely on the unforgeability of Ed25519 [17], the Diffie–Hellman assumption on Curve25519 [1], and HMAC and HKDF behaving as pseudo-random functions [14,20]. They are informal arguments rather than a machine-checked proof. For G1, a node accepts a message only if it carries a valid signature under the peer’s pinned key over a label, the sender id and EP, so substitution or impersonation would require a forgery, as scenarios 1 and 2 confirm. For G2 and G3, sk is derived from Z, and computing Z requires an ephemeral private key that is generated from hardware entropy, never transmitted and erased after use; stealing an identity key later therefore reveals nothing about earlier sessions. For G4, TH covers both messages and both identities, salts HKDF and is authenticated by both confirmation tags, which rules out misbinding. Because no replay cache is kept, a replayed message does pass the first checks, but it then fails key confirmation (scenario 5). Replay costs the responder time; it does not compromise a session. Table 10 links each goal to the evidence for it.
The chaotic layer (G5) needs a more careful reading. Because (x0*, r*) are published, anyone can compute Kchaos, so in the configuration tested here the layer shows that a node holds the correct configuration, not that it holds a secret. Kchaos is also fixed by two 32-bit floating-point values, so its effective key space is far smaller than 256 bits. A real deployment should provision secret parameters for each deployment and treat the layer as configuration binding and defence in depth. None of G1–G4 depends on Kchaos being secret.
8. Limitations
This study has several limitations. We measured only wolfSSL’s memory-optimised arithmetic; the default arithmetic should be considerably faster, at the cost of more flash. All measurements used Board A as initiator, and although the firmware is symmetric, the run was not repeated with the roles swapped. The security analysis is informal, and a ProVerif or Tamarin model, or a proof in a standard key-exchange model, would strengthen it. The uniqueness test catches gross seeding failures but is not a NIST SP 800-90B entropy assessment [21]. Finally, side channels, energy per handshake, a replay window and group key agreement across many nodes were not evaluated.
9. Conclusion
This paper has shown how a GA-optimised chaotic key can take on a concrete, verifiable role in authenticated public-key key exchange without its determinism ever touching the session secret. The protocol combines Ed25519 identities, hardware-seeded X25519 with a transcript-bound HKDF key schedule and key confirmation, and an HMAC keyed by the unmodified chaotic generator. On two ESP32 boards, all 1,000 handshakes reached confirmed key agreement in 3,290.79 ms on average, all ephemeral keys were distinct, and all 500 attacks were rejected, including every attempt with chaotic parameters off by 10−6. The chaotic layer cost 0.69 ms per handshake. We also found and corrected an entropy-seeding defect in wolfSSL’s Arduino-ESP32 build that would otherwise have silently undermined forward secrecy.
Data availability: The firmware, analysis scripts and raw serial logs are available from the corresponding author on reasonable request.
Author contributions
Shajeela Beegom B. A.: conceptualisation, methodology, implementation, experiments, writing. S. Karthigai: supervision, review and editing.
References
- Bernstein, D. J. “Curve25519: New Diffie–Hellman speed records,” in PKC 2006. In LNCS; Springer, 2006; vol. 3958, pp. 207–228. [Google Scholar]
- Langley; Hamburg, M.; Turner, S. “Elliptic curves for security,” RFC 7748, IETF. 2016. [Google Scholar] [PubMed]
- Kifouche; Azzaz, M. S.; Hamouche, R.; Kocik, R. Design and implementation of a new lightweight chaos-based cryptosystem to secure IoT communications. Int. J. Inf. Secur. 2022, vol. 21(no. 6), 1247–1262. [Google Scholar] [CrossRef]
- Nazish, M.; Javid, M.; Banday, M. T. Enhanced logistic map with infinite chaos and its applicability in lightweight and high-speed pseudo-random bit generation. Cybersecurity 2025, vol. 8, art.(no. 24). [Google Scholar] [CrossRef]
- Rahman, Z.; et al. Enhancing AES using chaos and logistic map-based key generation technique for securing IoT-based smart home. Electronics 2022, vol. 11(no. 7), art. no. 1083. [Google Scholar]
- Beegom, S. B. A.; Karthigai, S. Simulation-based performance evaluation of a GA-optimized logistic map for lightweight cryptographic key generation in IoT systems. J. Online Eng. Educ. 2026, vol. 17(no. 1), 23–30. [Google Scholar]
- Beegom, S. B. A.; Karthigai, S. Hardware-validated enhanced genetic algorithm optimized chaotic logistic map for lightweight cryptographic key generation in IoT devices. Proc. 3rd Int. Conf. Comput. Sci. Appl. Math. (ICCSAM 2026), Aug. 18, 2026. [Google Scholar]
- Hameedi, A.; Hatem, M. A.; Hasoon, J. N. Dynamic key generation using GWO for IoT system. JOIV Int. J. Inform. Vis. 2024, vol. 8(no. 2), 819–825. [Google Scholar] [CrossRef]
- Kumar, S.; Sharma, D. Key generation in cryptography using elliptic-curve cryptography and genetic algorithm. Eng. Proc. 2023, vol. 59(no. 1), art. no. 59. [Google Scholar]
- Kocarev, L.; Tasev, Z. Public-key encryption based on Chebyshev maps. Proc. IEEE ISCAS 2003, vol. 3, III-28–III-31. [Google Scholar]
- Bergamo, P.; D’Arco, P.; De Santis, A.; Kocarev, L. Security of public-key cryptosystems based on Chebyshev polynomials. IEEE Trans. Circuits Syst. I 2005, vol. 52(no. 7), 1382–1393. [Google Scholar] [CrossRef]
- Diffie, W.; Hellman, M. E. New directions in cryptography. IEEE Trans. Inf. Theory 1976, vol. 22(no. 6), 644–654. [Google Scholar] [CrossRef]
- Krawczyk, H. “SIGMA: The ‘SIGn-and-MAc’ approach to authenticated Diffie–Hellman and its use in the IKE protocols,” in CRYPTO 2003. In LNCS; Springer, 2003; vol. 2729, pp. 400–425. [Google Scholar]
- Krawczyk, H. “Cryptographic extraction and key derivation: The HKDF scheme,” in CRYPTO 2010. In LNCS; Springer, 2010; vol. 6223, pp. 631–648. [Google Scholar]
- Düll, M.; et al. High-speed Curve25519 on 8-bit, 16-bit, and 32-bit microcontrollers. Des. Codes Cryptogr. 2015, vol. 77(no. 2–3), 493–514. [Google Scholar] [CrossRef]
- Fujii, H.; Aranha, D. F. “Curve25519 for the Cortex-M4 and beyond,” in Progress in Cryptology – LATINCRYPT 2017. In LNCS; Springer, 2019; vol. 11368, pp. 109–127. [Google Scholar]
- Bernstein, J.; Duif, N.; Lange, T.; Schwabe, P.; Yang, B.-Y. High-speed high-security signatures. J. Cryptogr. Eng. 2012, vol. 2(no. 2), 77–89. [Google Scholar] [CrossRef]
- wolfSSL Inc. wolfSSL/wolfCrypt Embedded SSL/TLS Library . version 5.8.4. Nov 2025. Available online: https://www.wolfssl.com.
- Espressif Systems. “Random number generation,” ESP-IDF Programming Guide (ESP32). 2026. Available online: https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/random.html.
- Krawczyk, H.; Bellare, M.; Canetti, R. HMAC: Keyed hashing for message authentication. IETF 1997. [Google Scholar] [CrossRef]
- Sönmez Turan, M.; et al. NIST SP 800-90B; Recommendation for the entropy sources used for random bit generation. 2018.
Figure 1.
System architecture: each board runs three layers, and the four handshake frames cross the ESP-NOW channel, which the attacker controls.
Figure 1.
System architecture: each board runs three layers, and the four handshake frames cross the ESP-NOW channel, which the attacker controls.

Figure 2.
Message flow of the three-layer handshake: Ed25519 signatures under pinned identities, ephemeral X25519 with HKDF, and an HMAC tag keyed by the GA-optimised chaotic generator.
Figure 2.
Message flow of the three-layer handshake: Ed25519 signatures under pinned identities, ephemeral X25519 with HKDF, and an HMAC tag keyed by the GA-optimised chaotic generator.

Table 1.
Positioning against the closest related work.
| Work | Chaotic/optimised component | Public-key exchange | Mutual authentication |
| Kifouche et al. [3] | Chaos-based generator in a symmetric cryptosystem | No | No |
| Rahman et al. [5] | Logistic-map AES key generation | No | No |
| Hameedi et al. [8] | Chaotic map + Grey Wolf Optimizer keys | No | No |
| Kumar and Sharma [9] | GA-generated elliptic-curve key pairs | Key generation only | No |
| This work | GA-optimised logistic map as HMAC credential | Yes (ephemeral X25519) | Yes (Ed25519, pinned) |
Table 2.
Message formats.
| Message | Fields (bytes) | Total |
| Handshake | type (1) ‖ EP (32) ‖ σP (64) ‖ τP (32) | 129 bytes |
| Confirmation | type (1) ‖ cP (32) | 33 bytes |
| Reject (test mode only) | type (1) ‖ reason code (1) | 2 bytes |
Table 3.
Experimental platform.
| Item | Value |
| Boards | 2 × ESP32 DevKit V1 (ESP32-D0WD-V3, dual-core Xtensa LX6), 240 MHz |
| Toolchain | Arduino-ESP32 core 3.3.12 (ESP-IDF v5.5.5) |
| Cryptographic library | wolfSSL 5.8.4; CURVE25519_SMALL, ED25519_SMALL (memory-optimised) |
| Transport | ESP-NOW, fixed Wi-Fi channel 1, no link-layer encryption |
| Environment | Indoor; both boards connected by USB to the same PC |
Table 4.
Problems found during bring-up and their fixes.
| Problem | Symptom | Fix |
| Deterministic RNG in wolfSSL on Arduino-ESP32 | Two boards printed identical fresh keys | Seed routed to esp_random() via CUSTOM_RAND_GENERATE_SEED |
| Stack overflow | Watchdog reset loop | Generator’s 20 KB buffer made static (.bss); method unchanged |
| Lost confirmation frames | Timeouts at the 2 s limit | 8-slot receive queue instead of a one-slot buffer |
| Identity not reloading after reset | Signing failed after reboot | Stored seed reloaded and public key re-derived |
Table 5.
Reliability of the handshake (E1, Board A initiator).
| Metric | Value |
| Handshake attempts | 1,000 |
| Completed with confirmed key agreement | 1,000 (100%) |
| 95% Clopper–Pearson interval | 99.63–100% |
| Timeouts/authentication failures | 0/0 |
| Session-key fingerprints matching across boards | 1,000/1,000 |
| Distinct ephemeral public keys | 2,000/2,000 |
Table 8.
Resource footprint of the firmware (end of E1).
| Resource | Value |
| Program flash (firmware image) | 906.6 KB |
| Static RAM (global variables) | 66.9 KB |
| Minimum free heap over 1,000 handshakes | 204.1 KB of 303.2 KB |
| Minimum free stack of the main task | 3,452 bytes |
Table 9.
Cost in millions of clock cycles (lower is better).
| Implementation | Platform | X25519 | Ed25519 sign | Ed25519 verify |
| Düll et al. [15] | ARM Cortex-M0 | 3.59 | — | — |
| Fujii and Aranha [16] | ARM Cortex-M4 | 0.91 | 0.50 | 1.27 |
| This work | ESP32, wolfSSL, memory-optimised | 84.78 | 86.82 | 179.62 |
Table 10.
Security goals and the evidence for each.
| Goal | Why it holds | Evidence |
| G1 Mutual authentication | Valid Ed25519 signature under the pinned key required | Scenarios 1–2: 200/200 rejected |
| G2 Session-key secrecy | sk needs an ephemeral private key that is never sent | 1,000 handshakes, no key material sent |
| G3 Forward secrecy | Hardware-seeded ephemeral keys erased after use | 2,000/2,000 ephemeral keys distinct |
| G4 Key confirmation | TH binds both messages and identities; both tags checked | Scenario 5: 100/100 fail confirmation |
| G5 Configuration binding | Only the same Kchaos yields a valid tag | Scenario 3: 100/100 rejected |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.