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), HQC-5 (NIST selection 2025), Classic McEliece-8192128, FrodoKEM-1344All four are used in every handshake; the session key is derived from all four shared secrets, so it stands while any one of them stands
AuthenticationML-DSA-87 (FIPS 204), SLH-DSA-SHAKE-256s (FIPS 205) and FN-DSA-1024 (FIPS 206), over the endpoint identity certificatesBoth endpoints present Final Certificates; every signature the certificate carries must verify. Which algorithms a certificate carries is configurable per certificate, so the set an endpoint authenticates with is the set its certificate declares
ContentFour nested authenticated layers: AES-256-GCM innermost, then ARIA-256-GCM, then Camellia-256-GCM, XChaCha20-Poly1305 outermost — four independent keys, the frame header authenticated by every layer, one 16-byte tag per layerThe same encapsulation the intent envelope uses (AES-256-GCM inside XChaCha20-Poly1305), taken to four layers; a joint key search stays at 2^512 under Grover's algorithm
Hashing and derivationSHA3-256 (FIPS 202), SHAKEEvery digest and every derived key

Plainly: four different locks agree on the session key, so it holds while any one of them holds; both sides prove who they are with their certificates; the content travels under four ciphers with four separate keys, each sealing the last; and every digest is SHA3.

The four key-encapsulation families are fixed for the handshake; the signature set follows the certificates. 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 all four encapsulations. 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: 70 bytes of overhead per frame (the header and the four 16-byte tags), 75 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 identities 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 node 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