Final Network Protocol

FNP in the documentation: the suite it speaks, a session from handshake to rotation and failover, pinning, and where it runs today, at release and on Final Chain.

Last updated 2026-09-05 · maintained in the Final Wiki

FNP: the session-multiplexed, post-quantum tunnel protocol our nodes speak.

#What it is

The Final Network Protocol replaces TLS on every path where the protocol talks to itself or to a wallet. One authenticated session carries many tunnels at once, rotates its keys with zero downtime, and gives perfect forward secrecy by construction: a key that is compromised later opens nothing that was sent before. It is written in C and C++, runs its cryptographic core in constant time, and has been in production inside Final DeFi since 2024.

#The suite

PurposeAlgorithmsNote
Key establishmentML-KEM-1024 (FIPS 203) and HQC-5 (NIST selection 2025)Both are used at every handshake and at every rekey; the session key is derived from both shared secrets, so it stands while either family stands
AuthenticationML-DSA-87 (FIPS 204) required from the node (FN-DSA-1024 / FIPS 206 optional) and from the clientBoth endpoints present Final Certificates; the node signs the handshake transcript with ML-DSA-87 and, when its certificate declares it, FN-DSA-1024; the client signs with its live ML-DSA-87 transaction key. Every CA signature the certificate carries that the peer verifies must verify
ContentAES-256-GCM inside XChaCha20-Poly1305 — two independent keys, the frame header authenticated by both layers, one 16-byte tag per layerThe same encapsulation the intent envelope uses
Hashing and derivationSHA3-256 (FIPS 202), SHAKEEvery digest and every derived key

Plainly: two different locks agree on the session key, so it holds while either of them holds; both sides prove who they are with their certificates; the content travels under AES-256-GCM sealed inside XChaCha20-Poly1305, each with its own key; and every digest is SHA3.

The two key-encapsulation families are fixed for the handshake and every rekey; the node's required session signature is ML-DSA-87, with FN-DSA-1024 optional when the certificate declares it, and the client's is ML-DSA-87. Algorithms are identified by registry id, and the registry is widening: many more post-quantum algorithms become configurable per certificate soon, so what one endpoint chooses is whatever its certificate carries. The same algorithms appear across the Final Chain nodes; see Post-quantum cryptography and Final Certificates.

#A session

  • Handshake. Client and server exchange hello messages under a 20-byte handshake header, prove their identities with their Final Certificates and establish the session key from both encapsulations (ML-KEM-1024 and HQC-5). Timestamps and nonces refuse replays.
  • Data transfer. Once the session is up, packets carry a 6-byte header, or 11 bytes with reliability enabled, and counter-based nonces that are never sent on the wire: 38 bytes of overhead per frame (the header and the two 16-byte tags), 43 with acknowledgements.
  • Tunnels inside the connection. Many logical tunnels share one session and one connection, so a new stream costs no handshake.
  • Rotation without downtime. Session keys rotate on a configurable interval (ten seconds is typical). Traffic migrates from the old session to the new one gradually and probabilistically over that interval, with no interruption and no packet loss; the old key material is overwritten and released.
  • Reliability and failover. An optional acknowledgement protocol guarantees delivery where a service needs it; missed acknowledgements trigger graceful degradation to a standby session and an event for investigation.

#Pinning

Endpoints authenticate with certificates of the network-authentication purpose; hosts and agents pin the SHA3-256 fingerprint of the node certificate they expect, so a substituted endpoint is refused even with a valid certificate of its own. Because the chain is the only root, there is no certificate store to poison and no self-signed anchor to install.

#Where it runs

  • Today: between the protocol's own services and nodes — internal and external communications alike.
  • With the release: post-quantum tunnels from Final Wallet to our nodes, certificate-authenticated and key-encapsulated, terminating at the FinalBackend FNP gateway rather than at a TLS edge.
  • On Final Chain: the node-facing encrypted tunnel becomes a node module, and the Final Node agents gain a management plane — central configuration and updates, coordinated NAT traversal for direct connections between agents, aggregate metrics, role-based administration. That plane is future work; the protocol it manages is the one described here.

#See also

Security-first architecture · Post-quantum cryptography · Final Certificates · Final Wallet: security and capabilities · Roadmap