Skip to content

Add identity sign CLI command#2817

Open
vaizki wants to merge 1 commit into
meshcore-dev:devfrom
vaizki:repeater-cli-sign-command
Open

Add identity sign CLI command#2817
vaizki wants to merge 1 commit into
meshcore-dev:devfrom
vaizki:repeater-cli-sign-command

Conversation

@vaizki

@vaizki vaizki commented Jun 23, 2026

Copy link
Copy Markdown

Adds a command to sign arbitrary data with the repeater / room server private key. The use is to authenticate repeater ownership on analysis platforms etc.

  • data is limited to 64 bytes due to CLI input / output buffer limitations, didn't want to change them
  • verification command identity verify <message> <signature> was planned but scrapped due to the same limitations
  • not sure if "identity sign" is the best command name but might be an ok command namespace for future additions
  • mesh::Utils::fromHex() returns 0 for errors like non-hexchars which is a bit ambiguous so a new helper parseHexBytes() was added, this could be inlined of course

Example: I want to view my node's detailed statistics so the platorm asks me to sign a random string (in this case "MeshCore"):

identity sign
  -> Usage: identity sign <data_hex>

identity sign 4d657368436f7265
  -> > E861F72FC8BBF2DBB7C4997257289CC0727D48D9A011DF6AF66F264802A1F4BF51FC864A6FF967A16AF6475A4898A23B4F8CF7F0B99A7735C3289F5C6C793802

After pasting the resulting signature to the platform it can be certain that I have access to the node and its private key, allowing me to link the repeater to my account.

Note: This function already exists in the KISS firmware as the SetHardware Extensions (0x06) -> SignData (0x04) TNC command and includes the verify command as well. So this brings the same feature to the repeater CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant