pub(super) async fn verify_lan_signature(
state: &AppState,
req: &mut InjectionRequest,
)Expand description
LAN-tier per-agent Ed25519 signature verification —
docs/specs/SPEC_JEKT_LAN_TIER_SIGNING_2026_08_15.md §2.4. Async, unlike
verify_jekt_signature’s synchronous local-only key lookup: the claimed
sender’s public key lives on WHICHEVER peer instance actually hosts that
agent, so finding it costs a LAN round trip
(LanDiscoveryController::find_agent_lan_pubkey).
Only meaningful for delivery_tier == "lan" — by this point
req.delivery_tier has already been through the server-side override in
handle_reactive_inject (§3 of the spec), so this is never reachable
off a genuinely lan_key-authenticated request.
No lan_sig at all, or a claimed sender whose public key no peer has on
file → lan_verified stays None — “nothing to check against,” not a
red flag on its own, same semantics as sig_verified/reagent_verified’s
None case. A lan_sig present with a public key found but the
signature doesn’t verify → Some(false), forced TIER=sensitive
unconditionally in handler.rs — an active attempt to forge a specific
agent’s identity.