From e9b83744e29d4037d7f2dc7989541016924bfb4a Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sun, 4 Aug 2024 22:36:33 -0500 Subject: [PATCH] Adds public_key and private_key for PKI co-authored-by: edinnen --- meshtastic/mesh.options | 2 ++ meshtastic/mesh.proto | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 7075e2d..32a3104 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -3,6 +3,8 @@ *macaddr max_size:6 fixed_length:true # macaddrs *id max_size:16 # node id strings +*public_key max_size:32 # public key +*private_key max_size:32 # private key *User.long_name max_size:40 *User.short_name max_size:5 diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index 619ad92..19f93e2 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -681,6 +681,12 @@ message User { * Indicates that the user's role in the mesh */ Config.DeviceConfig.Role role = 7; + + /* + * The public key of the user's device. + * This is sent out to other nodes on the mesh to allow them to compute a shared secret key. + */ + bytes public_key = 8; } /* @@ -1345,6 +1351,12 @@ message MyNodeInfo { * Phone/PC apps should compare this to their build number and if too low tell the user they must update their app */ uint32 min_app_version = 11; + + /* + * The private key of the device. + * This is used to create a shared key with a remote device. + */ + bytes private_key = 12; } /*