From c7c99efb0dcaca3d9138a4d7f8187cd9af25fcba Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sun, 10 Aug 2025 23:05:07 -0500 Subject: [PATCH 1/3] Add initial protobufs for XEdDSA --- meshtastic/mesh.options | 3 ++- meshtastic/mesh.proto | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 37c93416..25b831d1 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -19,6 +19,7 @@ # outside of this envelope *Data.payload max_size:233 *Data.bitfield int_size:8 +*Data.xeddsa_signature max_size:64 *NodeInfo.channel int_size:8 *NodeInfo.hops_away int_size:8 @@ -89,4 +90,4 @@ *ChunkedPayload.chunk_count int_size:16 *ChunkedPayload.chunk_index int_size:16 -*ChunkedPayload.payload_chunk max_size:228 \ No newline at end of file +*ChunkedPayload.payload_chunk max_size:228 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index a8de0d81..79ed84c5 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1071,6 +1071,11 @@ message Data { * Bitfield for extra flags. First use is to indicate that user approves the packet being uploaded to MQTT. */ optional uint32 bitfield = 9; + + /* + * XEdDSA signature for the payload + */ + optional bytes xeddsa_signature = 10; } /* @@ -1469,6 +1474,11 @@ message MeshPacket { * Indicates which transport mechanism this packet arrived over */ TransportMechanism transport_mechanism = 21; + + /* + * Indicates whether the packet has a valid signature + */ + bool xeddsa_signed = 22; } /* From 22cf0ebd6632256538e6884e8102f367f9543177 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 11 Aug 2025 00:39:43 -0500 Subject: [PATCH 2/3] Add nodeinfo bool has_xeddsa_signed --- meshtastic/mesh.proto | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 79ed84c5..6f5de042 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1609,6 +1609,13 @@ message NodeInfo { * LSB 0 of the bitfield */ bool is_key_manually_verified = 12; + + /* + * True if node is signing its packets via XEdDSA + * Persists between NodeDB internal clean ups + * LSB 1 of the bitfield + */ + bool has_xeddsa_signed = 13; } /* From c7e500e9c5e3afa6adfd4247807c7d6ab56a6141 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 11 Aug 2025 08:28:52 -0500 Subject: [PATCH 3/3] Remove optional tag from xeddsa sig field --- meshtastic/mesh.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 6f5de042..af9b0c2f 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -1075,7 +1075,7 @@ message Data { /* * XEdDSA signature for the payload */ - optional bytes xeddsa_signature = 10; + bytes xeddsa_signature = 10; } /*