feat(gateway): TLS 1.3 only control plane and LNEx v3 channel-bound handshake

Replace the X25519/HKDF/ChaCha20 TCP layer with rustls TLS 1.3 (ALPN
vnox-lnex/3). Auto-generate a self-signed certificate keyed by the server
identity or load an operator certificate, publish the SPKI fingerprint,
bind HELLO and AUTH signatures to the TLS exporter, reject plaintext, TLS 1.2
and LNEx v2 peers with an explicit error. BREAKING: protocol v3.

Claude-Session: https://claude.ai/code/session_01GDjxLvBcnJqniFQGUGb1V4
This commit is contained in:
Loki 2026-10-24 22:05:30 +02:00
parent a5b9c324f7
commit 0d2af0ddd6
Signed by: boba
GPG key ID: 253067914055423B
45 changed files with 1322 additions and 806 deletions

View file

@ -19,6 +19,11 @@ impl ServerIdentity {
use ed25519_dalek::Signer;
self.signing_key.sign(message).to_bytes().to_vec()
}
/// Ed25519 seed. Only used to derive the TLS key of the auto generated certificate
/// (see `crate::tls`), so the certificate fingerprint is a function of the identity.
pub(crate) fn signing_seed(&self) -> [u8; 32] {
self.signing_key.to_bytes()
}
pub fn pubkey_hex(&self) -> String {
hex::encode(self.signing_key.verifying_key().to_bytes())
}