Network Working Group A. S. Bains Internet-Draft 16 November 2026 Intended status: Informational Expires: 20 May 2027 NeckLink Transport Protocol (NLTP): Loss-Healing Authenticated Telemetry and Reflex Transport for Constrained Networks draft-bains-nltp-00 Abstract This document specifies the NeckLink Transport Protocol (NLTP), a lightweight, loss-healing, forward-secret transport protocol designed for microcontrollers, autonomous sensors, and edge gateways operating over lossy wireless links (including IEEE 802.11 vendor action frames such as ESP-NOW v1 and v2) and Carrier-Grade NAT (CGNAT) UDP paths. NLTP combines systematic Galois Field GF(2^8) algebraic Cauchy erasure coding with a single-round-trip (1-RTT) X25519 and pre-shared key (PSK) session handshake, ChaCha20-Poly1305 authenticated encryption with associated data (AEAD), a 512-packet sliding anti- replay window, optional pre-encryption zero-heap LZ4 block compression, integer delivery-rate pacing, and a confirmed out-of- line reflex channel that eliminates head-of-line (HOL) blocking for urgent actuator commands. The entire protocol executes with zero dynamic heap allocation and zero floating-point operations, fitting within 4,760 octets of static RAM in transmit-plus-reflex sensor configurations. Status of This Memo This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet- Drafts is at https://datatracker.ietf.org/drafts/current/. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress." This Internet-Draft will expire on 20 May 2027. Bains Expires 20 May 2027 [Page 1] Internet-Draft NLTP v1 November 2026 Copyright Notice Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved. This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/ license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 4 3. Wire Framing Specification . . . . . . . . . . . . . . . . . 4 3.1. Common Frame Prefix and Flags . . . . . . . . . . . . . . 4 3.2. Unencrypted Frame Format (Wire Version 1) . . . . . . . . 4 3.3. Encrypted AEAD Frame Format (Wire Version 2) . . . . . . 5 3.4. Packet Type Registry . . . . . . . . . . . . . . . . . . 6 3.5. 12-Octet Shard Header and Control Payloads . . . . . . . 7 4. 1-RTT X25519+PSK Forward-Secret Handshake . . . . . . . . . . 8 4.1. Long-Term Pre-Shared Key Normalization . . . . . . . . . 9 4.2. Handshake Messages and Key Schedule . . . . . . . . . . . 9 4.3. Simultaneous Open, Session Staging, and Restart Recovery . . . . . . . . . . . . . . . . . . . . . . . . 10 5. RFC 6479 512-Packet Sliding Anti-Replay Window . . . . . . . 11 6. Systematic GF(2^8) Algebraic Cauchy Erasure Coding . . . . . 11 7. Pre-Encryption LZ4 Block Compression . . . . . . . . . . . . 12 8. Out-of-Line Reliable Reflex Channel and NAT Traversal . . . . 12 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12 10. Security Considerations . . . . . . . . . . . . . . . . . . . 12 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 11.1. Normative References . . . . . . . . . . . . . . . . . . 13 11.2. Informative References . . . . . . . . . . . . . . . . . 14 Appendix A. Cryptographic and Wire Test Vectors . . . . . . . . 14 A.1. NLTP 1.5 X25519+PSK Session Key Derivation Vector . . . . 15 A.2. Encrypted Version-2 PT_PING Wire Frame (40 Octets) . . . 15 A.3. GF(2^8) Cauchy Repair Row Vectors (k = 8) . . . . . . . . 15 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 15 Bains Expires 20 May 2027 [Page 2] Internet-Draft NLTP v1 November 2026 1. Introduction Field telemetry, marine buoys, industrial actuators, and wireless microcontroller meshes routinely operate over links suffering 10% to 35% packet loss, asymmetric Carrier-Grade NATs (CGNATs), and strict Maximum Transmission Unit (MTU) ceilings such as 250 octets on legacy ESP-NOW v1 or 1,470 octets on ESP-NOW v2. Traditional stream transports stall on retransmission timeouts when bursts of packets are lost, suffer head-of-line (HOL) blocking when urgent control messages queue behind bulk transfers, and exceed the SRAM and Flash budgets of 32-bit microcontrollers lacking floating-point units or heap allocators. The NeckLink Transport Protocol (NLTP) addresses these constraints through six integrated mechanisms: 1. *Byte-Identical L2/L4 Framing:* Every NLTP datagram begins with the two-octet ASCII magic prefix "NL" (0x4E 0x4C) and traverses UDP sockets, zero-knowledge UDP relays, and raw IEEE 802.11 vendor action frames without protocol translation. 2. *1-RTT X25519+PSK Forward Secrecy:* Encrypted endpoints establish per-session directional keys using ephemeral [RFC7748] Diffie- Hellman key agreement authenticated by a 256-bit pre-shared key via [RFC2104] HMAC-SHA-256, sealing frames with [RFC8439] ChaCha20-Poly1305. 3. *512-Packet Sliding Anti-Replay Window:* Each session tracks 64-bit packet sequence numbers using an [RFC6479] 8-word bitmap verified prior to plaintext decryption. 4. *Systematic GF(2^8) Cauchy Erasure Coding:* Bulk transfers are partitioned into generations of up to k = 8 systematic data shards accompanied by proactive and reactive Cauchy parity shards over GF(2^8), healing lost packets in flight and verifying the reassembled object with [FIPS180-4] SHA-256. 5. *Zero-Heap LZ4 Block Compression:* Repetitive structured payloads are compressed prior to encryption and FEC slicing using raw [LZ4] blocks and decompressed in-place at the receiver without heap allocation. 6. *Out-of-Line Reliable Reflex Channel:* Time-critical commands up to 192 octets bypass bulk stream queues and rate pacers, achieving zero HOL blocking with dedicated acknowledgements. Bains Expires 20 May 2027 [Page 3] Internet-Draft NLTP v1 November 2026 2. Conventions and Terminology The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. Unless explicitly noted otherwise (such as network-order attributes in [RFC5389] STUN messages), all multi-octet integer fields in NLTP headers, nonces, and payloads are encoded in unsigned *little-endian* byte order, denoted LE16(x), LE32(x), and LE64(x). Concatenation of byte sequences is denoted by ||, bitwise exclusive-OR by ^, and bitwise OR by |. 3. Wire Framing Specification 3.1. Common Frame Prefix and Flags Every NLTP datagram starts with a 4-octet prefix: * *Magic (pkt[0..1]):* Fixed ASCII octets 0x4E ('N') and 0x4C ('L'). Receivers MUST silently discard frames that do not begin with 0x4E 0x4C. * *Version and Type (pkt[2]):* The upper 4-bit nibble encodes the wire framing version (version = pkt[2] >> 4), and the lower 4-bit nibble encodes the packet type (pkt_type = pkt[2] & 0x0F). Unencrypted frames use NLTP_VERSION = 1. Encrypted frames (including handshake frames) use NLTP_SESSION_VERSION = 2. * *Flags (pkt[3]):* Bit 7 (0x80, NLTP_FLAG_ENCRYPTED) selects between the 16-octet unencrypted header (0) and the 20-octet encrypted AEAD header (1). Bits 6..0 (0x7F) carry type-specific flags: 0x01 indicates metadata receipt confirmation in PROPRIOCEPTIVE_ACK, 0x02 marks extended ACK rate trailers and reliable reflex frames, and 0x40 (FLAG_LZ4) is reserved for inline LZ4 stream signaling. 3.2. Unencrypted Frame Format (Wire Version 1) When NLTP_FLAG_ENCRYPTED (0x80) is clear, the frame consists of a 16-octet header followed by N >= 0 payload octets: Bains Expires 20 May 2027 [Page 4] Internet-Draft NLTP v1 November 2026 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Magic 'N' | Magic 'L' | Ver=1 | Type |0| Flags | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | conn_id (LE32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | crc32 (LE32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ts_ms (LE32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload (0..N octets) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 1: NLTP Unencrypted 16-Octet Header conn_id (4 octets, LE32): Sender endpoint connection identifier. Endpoints set bit 0 (conn_id | 1) on initialization to guarantee a non-zero identifier. crc32 (4 octets, LE32): [IEEE8023] CRC-32 (reflected polynomial 0xEDB88320, initial value 0xFFFFFFFF, final XOR 0xFFFFFFFF) computed over the 16-octet header with octets 8..11 set to 0x00000000, immediately followed by payload[0..N-1]. Unencrypted endpoints MUST discard any frame whose computed CRC-32 does not match crc32. ts_ms (4 octets, LE32): Sender monotonic millisecond clock modulo 2^32 at transmission. 3.3. Encrypted AEAD Frame Format (Wire Version 2) When an endpoint is configured with a pre-shared key, all unencrypted frames and all frames with version != 2 MUST be rejected prior to state mutation. An authenticated encrypted frame consists of a 20-octet cleartext Additional Authenticated Data (AAD) header, N >= 0 octets of ChaCha20 ciphertext, and a 16-octet Poly1305 tag (minimum wire length 36 octets): Bains Expires 20 May 2027 [Page 5] Internet-Draft NLTP v1 November 2026 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Magic 'N' | Magic 'L' | Ver=2 | Type |1| Flags | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | conn_id (LE32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + seq64 (LE64) + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ts_ms (LE32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Ciphertext (0..N octets) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + Poly1305 Tag (16 B) + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 2: NLTP Encrypted Version-2 AEAD Frame AEAD sealing and opening follow [RFC8439] Section 2.8 with the following deterministic parameters: * *96-bit Nonce (12 octets):* nonce12 = LE32(conn_id) || LE64(seq64). * *AAD (20 octets):* The exact cleartext header pkt[0..19]. Modifying any header bit (including version_type, flags, conn_id, seq64, or ts_ms) invalidates the Poly1305 tag. * *Keystream Generation:* Block counter 0 generates the 32-octet one-time Poly1305 key; plaintext encryption starts at ChaCha20 block counter 1. * *Authenticate-Before-Decrypt Requirement:* An unpacking endpoint MUST check replay eligibility, compute the expected 16-octet Poly1305 tag over the AAD and ciphertext, and compare it against pkt[20+N..35+N] in constant time *before* updating the anti-replay bitmap or writing any decrypted bytes to memory. 3.4. Packet Type Registry Table 1 defines all NLTP packet types encoded in the lower 4 bits of pkt[2]. Bains Expires 20 May 2027 [Page 6] Internet-Draft NLTP v1 November 2026 +======+=======================+=================================+ | Hex | Symbolic Name | Summary | +======+=======================+=================================+ | 0x01 | PT_DATA_SHARD | Systematic data shard (idx < k) | +------+-----------------------+---------------------------------+ | 0x02 | PT_CRYPTIC_PARITY | GF(2^8) Cauchy repair shard | | | | (idx >= k) | +------+-----------------------+---------------------------------+ | 0x03 | PT_PROPRIOCEPTIVE_ACK | Cumulative base, per-generation | | | | DOF need, and rate trailer | +------+-----------------------+---------------------------------+ | 0x04 | PT_STREAM_META | UTF-8 JSON stream descriptor | | | | (size, gens, SHA-256, LZ4) | +------+-----------------------+---------------------------------+ | 0x05 | PT_STREAM_FIN_ACK | End-of-stream completion and | | | | SHA-256 verification status | +------+-----------------------+---------------------------------+ | 0x06 | PT_REFLEX_MSG | Out-of-line reliable low- | | | | latency reflex message | +------+-----------------------+---------------------------------+ | 0x07 | PT_NEURAL_STATE | Unreliable high-rate state | | | | telemetry vector | +------+-----------------------+---------------------------------+ | 0x08 | PT_PING | 4-octet timestamp probe for | | | | RTT, keepalive, and NAT punch | +------+-----------------------+---------------------------------+ | 0x09 | PT_PONG | 4-octet echo reply to PT_PING | +------+-----------------------+---------------------------------+ | 0x0A | PT_REFLEX_ACK | 4-octet acknowledgement of | | | | PT_REFLEX_MSG | +------+-----------------------+---------------------------------+ | 0x0B | PT_HELLO | Initiator 1-RTT X25519+PSK | | | | handshake message (84 B wire) | +------+-----------------------+---------------------------------+ | 0x0C | PT_HELLO_ACK | Responder 1-RTT X25519+PSK | | | | handshake reply (100 B wire) | +------+-----------------------+---------------------------------+ | 0x0D | PT_NO_SESSION | Rate-limited restart hint | | | | echoing peer conn_id/seq64 | +------+-----------------------+---------------------------------+ Table 1: NLTP Packet Types 3.5. 12-Octet Shard Header and Control Payloads Payloads of PT_DATA_SHARD (0x01) and PT_CRYPTIC_PARITY (0x02) start with a 12-octet shard header followed by row_width octets: Bains Expires 20 May 2027 [Page 7] Internet-Draft NLTP v1 November 2026 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | stream_id (LE32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | gen_id (LE32) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | k | idx | row_width (LE16) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Shard Row (row_width octets) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Figure 3: NLTP 12-Octet Shard Header Each systematic row of width row_width = 2 + shard_bytes (default shard_bytes = 960, yielding row_width = 962 and a 1,010-octet encrypted packet; or shard_bytes = 192, yielding a 242-octet encrypted packet for 250-octet ESP-NOW v1 links) prefixes its data slice with LE16(chunk_len) and zero-pads any trailing slack prior to Cauchy encoding. Receivers MUST reject shard frames with k == 0, k > 8, row_width < 2, or idx >= 208. Control packet payloads are structured as follows: * *PT_PROPRIOCEPTIVE_ACK (0x03):* 14-octet fixed prefix LE32(stream_id) || LE32(base_gen) || LE32(ack_echo_ts) || u8(loss_q8) || u8(n_rep), followed by n_rep (0..16) 4-octet repair entries LE16(gen_id - base_gen) || u8(have) || u8(need), plus an 8-octet rate trailer LE32(bytes_rcvd) || LE32(arrival_kbps). * *PT_STREAM_META (0x04):* UTF-8 JSON object containing stream_id, kind ("file"), filename, total_bytes (wire byte count), total_gens, sha256 (64 lowercase hexadecimal digits of the uncompressed [FIPS180-4] SHA-256 digest), and optional "codec":"lz4" plus "raw_bytes". * *PT_STREAM_FIN_ACK (0x05):* 5 octets LE32(stream_id) || u8(sha_ok), where sha_ok == 1 confirms exact SHA-256 verification. * *PT_PING (0x08) and PT_PONG (0x09):* 4 octets LE32(probe_ts_ms). 4. 1-RTT X25519+PSK Forward-Secret Handshake Bains Expires 20 May 2027 [Page 8] Internet-Draft NLTP v1 November 2026 4.1. Long-Term Pre-Shared Key Normalization Both peers share a 32-octet long-term symmetric key K. When configured from a human-readable string psk, leading and trailing ASCII whitespace (' ', '\t', '\r', '\n') is stripped. If the trimmed string has length 43 or 44 characters and decodes via URL-safe Base64 to exactly 32 octets, those 32 octets form K; otherwise: K = SHA-256("NLTP-v1-PASSPHRASE:" || trim(psk)) 4.2. Handshake Messages and Key Schedule Before sealing any session data frame, an initiator ('i') with connection ID cid_i generates a fresh 16-octet random nonce n_i and a 32-octet random scalar sk_i, computes pk_i = X25519(sk_i, 9) per [RFC7748], and transmits PT_HELLO (0x0B) sealed under K at wire version 2 using a random odd 64-bit sequence number (seq64 = rand64() | 1): Initiator (cid_i) Responder (cid_r) ----------------- ----------------- sk_i, n_i <-- CSPRNG pk_i = X25519(sk_i, 9) PT_HELLO (48 B pt / 84 B wire) AEAD_K(n_i || pk_i) ---------------------------------> sk_r, n_r <-- CSPRNG pk_r = X25519(sk_r, 9) dh = X25519(sk_r, pk_i) verify dh != 0^32 derive (k_i2r, k_r2i) wipe(sk_r, dh) PT_HELLO_ACK (64 B pt / 100 B wire) AEAD_K(n_i || n_r || pk_r) <--------------------------------- verify n_i matches pending HELLO dh = X25519(sk_i, pk_r) verify dh != 0^32 derive (k_i2r, k_r2i) wipe(sk_i, dh) Session Frames (Ver=2, seq64=1..) AEAD_{k_i2r}(...) / AEAD_{k_r2i}(...) <================================> Figure 4: 1-RTT X25519+PSK Handshake Exchange Bains Expires 20 May 2027 [Page 9] Internet-Draft NLTP v1 November 2026 Both peers MUST check whether the 32-octet X25519 shared secret dh equals the all-zero byte string (0x00^32) as specified in [RFC7748] Section 6.1, and MUST abort handshake processing if so. Directional 256-bit AEAD keys are derived via [RFC2104] HMAC-SHA-256 over an 87-octet transcript: prk = HMAC-SHA256(K, "NLTP-1.5-X25519" || dh || n_i || n_r || LE32(cid_i) || LE32(cid_r)) k_i2r = HMAC-SHA256(prk, "i2r") k_r2i = HMAC-SHA256(prk, "r2i") The initiator transmits with k_tx = k_i2r and receives with k_rx = k_r2i; the responder transmits with k_tx = k_r2i and receives with k_rx = k_i2r. Ephemeral scalars (sk_i, sk_r), dh, and prk MUST be zeroized immediately upon key derivation. 4.3. Simultaneous Open, Session Staging, and Restart Recovery * *Simultaneous Open Tie-Breaker:* If an endpoint with an unanswered pending HELLO (nonce pend_n_i) receives a valid PT_HELLO carrying nonce n_i, it compares the 16-octet nonces lexicographically. If pend_n_i < n_i, its own HELLO wins and the incoming HELLO is ignored; otherwise it cancels its pending HELLO, wipes pend_sk_i, and responds as 'r'. * *Candidate Session Slot (SESS_TAKEOVER_MS = 1000):* Each endpoint maintains two session slots: live sess[0] and candidate sess[1]. If sess[0] has received authenticated traffic within the preceding 1,000 ms, a newly answered PT_HELLO is installed into sess[1] and promoted to sess[0] only after a subsequent data/control frame authenticates under sess[1].k_rx. Retransmitted identical PT_HELLO frames replay the cached 100-octet HELLO_ACK. * *PT_NO_SESSION (0x0D) Restart Hint:* When an encrypted endpoint receives a version-2 data frame for an unknown peer_cid (e.g., after an MCU reboot), it MAY emit a 36-octet unauthenticated PT_NO_SESSION hint at most once per HINT_INTERVAL_MS = 250 ms containing a 20-octet header (seq64 = 0) and 16-octet payload LE32(peer_cid) || LE64(peer_seq) || LE32(0). The recipient initiates a fresh PT_HELLO only if it has an active session, no handshake is already pending, the echoed peer_cid equals its own conn_id, and 0 < peer_seq <= sess[0].tx_seq. Bains Expires 20 May 2027 [Page 10] Internet-Draft NLTP v1 November 2026 5. RFC 6479 512-Packet Sliding Anti-Replay Window Each established session direction initializes tx_seq = 0 (pre- incremented to 1 on the first frame) and a receive replay window (highest_seq = 0, bitmap[0..7] = 0) modeled on [RFC6479] covering NLTP_REPLAY_WINDOW_BITS = 512 sequence numbers. 1. Sequence number seq64 == 0 MUST always be rejected. 2. If seq64 > highest_seq, the packet is eligible. Upon AEAD tag verification, the 512-bit bitmap shifts left by seq64 - highest_seq bits (clearing all words if the shift is >= 512), sets bit 0, and updates highest_seq = seq64. 3. If seq64 <= highest_seq, let diff = highest_seq - seq64. If diff >= 512, or if bit (diff & 63) of bitmap[diff >> 6] is already 1, the packet MUST be rejected as stale or replayed. Otherwise, upon AEAD tag verification, that bit is set to 1. 6. Systematic GF(2^8) Algebraic Cauchy Erasure Coding Bulk transfers slice the wire buffer into generations of up to NLTP_DEFAULT_GEN_K = 8 systematic rows. Arithmetic operates over the binary extension field GF(2^8) modulo the irreducible polynomial x^8 + x^4 + x^3 + x^2 + 1 (0x11D). Multiplicative inversion computes inv(a) = a^254 in GF(2^8) with inv(0) = 0. For a generation of k (2 <= k <= 8) systematic rows S[0..k-1] and parity offset p_off = idx - k in 0..191, the Cauchy encoding vector C[p_off, 0..k-1] uses disjoint element sets: x_r = 64 + (p_off % 192) /* x_r in [64..255] */ y_c = c & 0x3F /* y_c in [0..63] */ C[p_off, c] = inv_GF256(x_r ^ y_c) ParityRow[p_off] = sum_{c=0}^{k-1} GF256_mul(C[p_off, c], S[c]) Because x_r >= 64 and y_c < 64, (x_r ^ y_c) >= 64 > 0 holds for all (r, c), guaranteeing every square submatrix of the systematic generator matrix [I_k | C^T] is invertible (Maximum Distance Separable property). Any k distinct shards (systematic or parity) suffice to reconstruct the generation via incremental Gauss-Jordan elimination. When k == 1, ParityRow[p_off] equals S[0] verbatim. Bains Expires 20 May 2027 [Page 11] Internet-Draft NLTP v1 November 2026 7. Pre-Encryption LZ4 Block Compression When sending compressible payloads (len >= 32 octets), an endpoint MAY compress the raw payload using the standard [LZ4] raw block format prior to generation slicing and AEAD encryption. If the compressed output is strictly smaller than the input, PT_STREAM_META includes "codec":"lz4" and "raw_bytes":len, while "total_bytes" carries the compressed byte count and "sha256" carries the SHA-256 digest of the original uncompressed payload. Constrained receivers perform zero-heap overlap-safe in-place decompression inside a single receive buffer buf[0..buf_cap-1] whenever buf_cap >= raw_bytes + (comp_len >> 8) + 32 by shifting the reassembled compressed block to buf[buf_cap - comp_len .. buf_cap - 1] and enforcing dp + match_len <= sp and offset <= dp before every literal and match copy. 8. Out-of-Line Reliable Reflex Channel and NAT Traversal Urgent actuator or telemetry-trigger commands use PT_REFLEX_MSG (0x06, flags = 0x02) with payload LE32(reflex_seq) || LE16(msg_len) || msg[0..msg_len-1] (0 <= msg_len <= 192). Reflex frames bypass the bulk congestion window and rate pacer, transmit twice back-to-back on session readiness for immediate loss resilience, and retransmit with 1.5x exponential backoff (45..250 ms up to a 10,000 ms deadline) until acknowledged by a 4-octet PT_REFLEX_ACK (0x0A, flags = 0x02) carrying LE32(reflex_seq). Receivers deduplicate incoming reflexes using a bounded (peer_cid, reflex_seq) ring buffer. For endpoints behind symmetric CGNATs that cannot complete direct [RFC5389] STUN hole punching, NLTP defines an optional 19-octet zero- knowledge UDP relay envelope: "NR" || u8(cmd) || room_tag[0..15] || inner_nltp_pkt, where cmd is 0x01 (DATA), 0x02 (REGISTER), or 0x03 (REG_ACK), and room_tag = SHA-256("NLTP-RELAY-ROOM:" || trim(room))[0..15]. Because the inner NLTP v2 frame remains end-to- end encrypted and authenticated under session keys derived from K, the relay hub learns neither room names nor payload contents. 9. IANA Considerations This document has no IANA actions. NLTP operates over application- configured UDP ports and IEEE 802.11 vendor-specific action frames identified by the "NL" (0x4E 0x4C) magic prefix. 10. Security Considerations Bains Expires 20 May 2027 [Page 12] Internet-Draft NLTP v1 November 2026 * *Forward Secrecy and Pre-Shared Key Entropy:* Compromise of the long-term PSK K after a session has terminated does not reveal past session keys (k_i2r, k_r2i) because ephemeral X25519 scalars (sk_i, sk_r) and Diffie-Hellman outputs (dh) are wiped immediately after derivation. However, a passive attacker who already possesses K at handshake time can impersonate a peer; deployments SHOULD provision high-entropy 256-bit random keys rather than low- entropy passphrases. * *AEAD Nonce Uniqueness:* Session data frames use strictly monotonic 64-bit counters (seq64 = 1, 2, ...) under fresh, direction-separated 256-bit keys (k_i2r != k_r2i), preventing nonce reuse across up to 2^64 - 1 frames per session. Handshake frames (PT_HELLO, PT_HELLO_ACK) sealed directly under K combine a random 31-bit conn_id | 1 with a fresh 63-bit random seq64 | 1, providing 94 bits of CSPRNG nonce entropy per handshake frame; endpoints MUST refuse encrypted operation if no cryptographic random source is available. * *Low-Order Curve25519 Points:* Mandatory rejection of all-zero X25519 outputs ([RFC7748] Section 6.1) prevents small-subgroup confinement and invalid-curve key-Mismatch attacks. * *Replay, Window Poisoning, and Address Spoofing:* Two-phase [RFC6479] verification ensures forged frames never advance highest_seq, and transport adapters update peer network/MAC addresses only after valid_rx increments on cryptographic authentication. * *Compression Oracle Considerations:* Because LZ4 shrinks repetitive byte patterns prior to encryption, applications MUST NOT concatenate attacker-chosen inputs with sensitive secrets inside the same compressed stream if ciphertext lengths are observable on the wire. * *Decompression Bomb and Memory Bounds:* Receivers validate dp + match_len <= sp, dp + match_len <= expected_raw_len, and end-to- end SHA-256 digests strictly after AEAD authentication, preventing unauthenticated memory exhaustion or buffer overflows on zero-heap microcontrollers. 11. References 11.1. Normative References Bains Expires 20 May 2027 [Page 13] Internet-Draft NLTP v1 November 2026 [FIPS180-4] National Institute of Standards and Technology, "Secure Hash Standard (SHS)", FIPS PUB 180-4, DOI 10.6028/NIST.FIPS.180-4, August 2015, . [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed- Hashing for Message Authentication", RFC 2104, DOI 10.17487/RFC2104, February 1997, . [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, . [RFC6479] Zhang, X. and T. Tsou, "IPsec Anti-Replay Algorithm without Bit Shifting", RFC 6479, DOI 10.17487/RFC6479, January 2012, . [RFC7748] Langley, A., Hamburg, M., and S. Turner, "Elliptic Curves for Security", RFC 7748, DOI 10.17487/RFC7748, January 2016, . [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, . [RFC8439] Nir, Y. and A. Langley, "ChaCha20 and Poly1305 for IETF Protocols", RFC 8439, DOI 10.17487/RFC8439, June 2018, . 11.2. Informative References [IEEE8023] IEEE, "IEEE Standard for Ethernet", IEEE Std 802.3-2022, July 2022. [LZ4] Collet, Y., "LZ4 Block Format Description", March 2019, . [RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing, "Session Traversal Utilities for NAT (STUN)", RFC 5389, DOI 10.17487/RFC5389, October 2008, . Appendix A. Cryptographic and Wire Test Vectors Bains Expires 20 May 2027 [Page 14] Internet-Draft NLTP v1 November 2026 A.1. NLTP 1.5 X25519+PSK Session Key Derivation Vector Given the [RFC7748] Section 6.1 shared secret dh, 32-octet PSK K = 1011..2f, initiator nonce n_i = 0102..10, responder nonce n_r = 2122..30, cid_i = 0x11223345, and cid_r = 0x55667789: K = 101112131415161718191a1b1c1d1e1f 202122232425262728292a2b2c2d2e2f dh = 4a5d9d5ba4ce2de1728e3bf480350f25 e07e21c947d19e3376f09b3c1e161742 n_i = 0102030405060708090a0b0c0d0e0f10 n_r = 2122232425262728292a2b2c2d2e2f30 cid_i = 0x11223345 (LE32: 45332211) cid_r = 0x55667789 (LE32: 89776655) prk = 6306595ae52f5df950e3ebdaa2d464fe 047051fa0e38b54075e378f83c7c17e2 k_i2r = 9b2408a16c17371feff864059f2c4f55 6d85d56f88592e61fe23f906e45f91fa k_r2i = 99494825a27dd99ddb4f57a236d4b620 85656f0beedd06ec3255837b35f625ec A.2. Encrypted Version-2 PT_PING Wire Frame (40 Octets) Sealing a 4-octet PT_PING (0x08) payload LE32(1000) = e8030000 under k_i2r above with version = 2, flags = 0x80, conn_id = 0x11223345, seq64 = 1, and ts_ms = 1000 yields: AAD Header (20 B): 4e4c2880 45332211 0100000000000000 e8030000 Nonce (12 B) : 45332211 0100000000000000 Ciphertext (4 B) : 9dc0f833 Poly1305 Tag(16B): 4ee50dfb b2a72a34 76367815 995fb029 Full Wire (40 B) : 4e4c2880453322110100000000000000e8030000 9dc0f8334ee50dfbb2a72a3476367815995fb029 A.3. GF(2^8) Cauchy Repair Row Vectors (k = 8) For k = 8 systematic columns over 0x11D, the first two repair rows (parity_offset = 0 and parity_offset = 1) are: parity_offset = 0 (x_0 = 64): 36 5f f8 d5 92 4e a6 04 parity_offset = 1 (x_1 = 65): 5f 36 d5 f8 4e 92 04 a6 Author's Address Amandeep Singh Bains Email: indianaman1.10.97@gmail.com URI: https://github.com/indian-aman/NLTP-Arduino Bains Expires 20 May 2027 [Page 15]