diff --git a/nym-api/nym-api-requests/src/models/described/type_translation.rs b/nym-api/nym-api-requests/src/models/described/type_translation.rs index efdd558ac3..415184c980 100644 --- a/nym-api/nym-api-requests/src/models/described/type_translation.rs +++ b/nym-api/nym-api-requests/src/models/described/type_translation.rs @@ -210,6 +210,12 @@ pub struct LewesProtocolDetailsV1 { /// LP UDP data address (default: 51264) for Sphinx packets wrapped in LP pub data_port: u16, + #[serde(with = "bs58_x25519_pubkey")] + #[schemars(with = "String")] + #[schema(value_type = String)] + /// LP public key + pub x25519: x25519::PublicKey, + /// Digests of the KEM keys available to this node alongside hashing algorithms used /// for their computation. /// note: digests are hex encoded @@ -457,6 +463,7 @@ impl From enabled: value.enabled, control_port: value.control_port, data_port: value.data_port, + x25519: value.x25519, kem_keys: value .kem_keys .into_iter() diff --git a/nym-api/nym-api-requests/src/models/described/v2.rs b/nym-api/nym-api-requests/src/models/described/v2.rs index 8be3710eed..429fb2ed88 100644 --- a/nym-api/nym-api-requests/src/models/described/v2.rs +++ b/nym-api/nym-api-requests/src/models/described/v2.rs @@ -343,6 +343,7 @@ pub fn mock_nym_node_description(seed: u64) -> NymNodeDescriptionV2 { enabled: true, control_port: 1234, data_port: 2345, + x25519: *x25519.public_key(), kem_keys: kem_hashes_wrapper, signing_keys: signing_keys_hashes_wrapper, }), diff --git a/nym-gateway-probe/src/common/nodes.rs b/nym-gateway-probe/src/common/nodes.rs index bb88848e1a..d929d4285d 100644 --- a/nym-gateway-probe/src/common/nodes.rs +++ b/nym-gateway-probe/src/common/nodes.rs @@ -130,20 +130,16 @@ impl DirectoryNode { .copied() .ok_or_else(|| anyhow!("no ip address known"))?; - let lp_data = match ( - description.lewes_protocol.clone(), - description.host_information.keys.x25519_versioned_noise, - ) { - (Some(lp_data), Some(noise_key)) => Some(TestedNodeLpDetails { + let lp_data = description.lewes_protocol.as_ref().and_then(|lp_data| { + Some(TestedNodeLpDetails { address: SocketAddr::new(ip_address, lp_data.control_port), - expected_kem_key_hashes: lp_data.kem_keys()?, - expected_signing_key_hashes: lp_data.signing_keys()?, - x25519: noise_key.x25519_pubkey, + expected_kem_key_hashes: lp_data.kem_keys().ok()?, + expected_signing_key_hashes: lp_data.signing_keys().ok()?, + x25519: lp_data.x25519, // \/ TODO: proper derivation from build version lp_version: version::CURRENT, - }), - _ => None, - }; + }) + }); Ok(TestedNodeDetails { identity: self.identity(), diff --git a/nym-node/nym-node-requests/src/api/v1/lewes_protocol/models.rs b/nym-node/nym-node-requests/src/api/v1/lewes_protocol/models.rs index 5dffa99541..17900472b6 100644 --- a/nym-node/nym-node-requests/src/api/v1/lewes_protocol/models.rs +++ b/nym-node/nym-node-requests/src/api/v1/lewes_protocol/models.rs @@ -1,6 +1,8 @@ // Copyright 2026 - Nym Technologies SA // SPDX-License-Identifier: Apache-2.0 +use nym_crypto::asymmetric::x25519; +use nym_crypto::asymmetric::x25519::serde_helpers::bs58_x25519_pubkey; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::collections::HashMap; @@ -19,6 +21,12 @@ pub struct LewesProtocol { /// LP UDP data address (default: 51264) for Sphinx packets wrapped in LP pub data_port: u16, + #[serde(with = "bs58_x25519_pubkey")] + #[schemars(with = "String")] + #[schema(value_type = String)] + /// LP public key + pub x25519: x25519::PublicKey, + /// Digests of the KEM keys available to this node alongside hashing algorithms used /// for their computation. /// note: digests are hex encoded @@ -35,6 +43,7 @@ impl LewesProtocol { enabled: bool, control_port: u16, data_port: u16, + x25519: x25519::PublicKey, kem_keys: HashMap>, signing_keys: HashMap>, ) -> Self { @@ -42,6 +51,7 @@ impl LewesProtocol { enabled, control_port, data_port, + x25519, kem_keys, signing_keys, } diff --git a/nym-node/src/node/mod.rs b/nym-node/src/node/mod.rs index abf246c453..f3c6ab940f 100644 --- a/nym-node/src/node/mod.rs +++ b/nym-node/src/node/mod.rs @@ -890,6 +890,7 @@ impl NymNode { self.modes().entry, self.config.gateway_tasks.lp.announced_control_port(), self.config.gateway_tasks.lp.announced_data_port(), + *self.x25519_noise_keys.public_key(), self.compute_kem_key_hashes(), self.compute_signing_key_hashes(), );