feat(client): TLS 1.3 control connection with SPKI pinning and LNEx v3

Replace the custom X25519/HKDF/ChaCha20 TCP layer with rustls (TLS 1.3 only,
ALPN vnox-lnex/3, no plaintext or fallback). Add a trust store (pin, trust on
first use, public CA), block changed fingerprints and identities, bind the
Ed25519 auth signature to the TLS exporter, add RU/EN trust dialog and
update the interop test and e2e voice tool.
This commit is contained in:
Loki 2026-10-24 22:05:19 +02:00
parent 5f594046a6
commit 29883a3187
31 changed files with 2085 additions and 567 deletions

View file

@ -12,6 +12,7 @@ impl Default for UiState {
bookmarks: default_bookmarks(),
selected_bookmark: 0,
status_msg: None,
trust_prompt: None,
channels: Vec::new(),
active_channel: None,
messages: Default::default(),

View file

@ -4,7 +4,7 @@ mod navigation;
mod types;
pub use models::{Channel, ChatMessage, DmConversation, FriendState, GuildState, NodeBookmark};
pub use types::{ConnState, UiState, VoiceUiState};
pub use types::{ConnState, TrustPrompt, TrustPromptKind, UiState, VoiceUiState};
use models::bookmark_label_from_address;

View file

@ -24,6 +24,25 @@ pub enum ConnState {
},
}
/// A pending server trust decision (first use or blocked fingerprint change).
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct TrustPrompt {
pub kind: TrustPromptKind,
/// Trust store key, `host:port`.
pub address: String,
/// Lower-case hex value that was received.
pub received: String,
/// Lower-case hex value that was trusted before (changed fingerprint or identity).
pub expected: String,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TrustPromptKind {
FirstUse,
FingerprintChanged,
IdentityChanged,
}
pub struct UiState {
pub appearance: crate::ui::appearance::AppearancePreferences,
pub conn: ConnState,
@ -31,6 +50,7 @@ pub struct UiState {
pub bookmarks: Vec<super::NodeBookmark>,
pub selected_bookmark: usize,
pub status_msg: Option<crate::ui::i18n::Message>,
pub trust_prompt: Option<TrustPrompt>,
pub channels: Vec<super::Channel>,
pub active_channel: Option<String>,