From 41340becf1c7253b61ff51cec8657fce3e20c96e Mon Sep 17 00:00:00 2001 From: GUVWAF Date: Sun, 12 Oct 2025 18:49:16 +0200 Subject: [PATCH] Add client notification messages for different public key and failed PKI decryption --- meshtastic/mesh.options | 1 + meshtastic/mesh.proto | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/meshtastic/mesh.options b/meshtastic/mesh.options index 37c93416..bd4ac55a 100644 --- a/meshtastic/mesh.options +++ b/meshtastic/mesh.options @@ -69,6 +69,7 @@ *KeyVerification.hash1 max_size:32 *KeyVerification.hash2 max_size:32 +*DifferentPublicKey.public_key max_size:32 # MyMessage.name max_size:40 # or fixed_length or fixed_count, or max_count diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index b10c7806..60eeb51c 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -2022,6 +2022,8 @@ message ClientNotification { KeyVerificationFinal key_verification_final = 13; DuplicatedPublicKey duplicated_public_key = 14; LowEntropyKey low_entropy_key = 15; + DifferentPublicKey different_public_key = 16; + PKIDecryptionFailed pki_decryption_failed = 17; } } @@ -2043,6 +2045,32 @@ message KeyVerificationFinal { message DuplicatedPublicKey {} message LowEntropyKey {} +/* + * Client notifcation message for when a different public key than the currently stored one of a remote node has been received. + */ +message DifferentPublicKey { + /* + * Node number of the remote node we received a different public key from. + */ + uint32 node_num = 1; + + /* + * The different public key we received from the remote node. + */ + bytes public_key = 2; +} + +/* + * Client notification message for when we receive a PKI-encrypted packet from a remote node we couldn't decrypt, + * while we did have a public key for the node. + */ +message PKIDecryptionFailed { + /* + * Node number of the remote node we received an undecryptable PKI packet from. + */ + uint32 node_num = 1; +} + /* * Individual File info for the device */