Protocol proposal: easy mutual contact on-boarding
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
この issue はまだ評価されていません。
説明
Summary
A new message format to allow for mutual contact enrollment between two Companions without physical presence, plus minor modifications of client / companion behavior to allow an "add contact" workflow.
Motivation
In the past week alone, I've had three different contacts with new MeshCore users from 1-2 hops away who sent greetings to the Public chat room, but were inexperienced and needed further guidance. Flooding the Public room with 1:1 support is not appropriate due to the cost of flood packets to the network and to room subscribers, not reliable due to packet loss, and not always possible if repeaters are misconfigured, so I wanted to establish a direct contact as quickly as possible.
Direct messages only work if both users have the mutual public keys in the contact list. To achieve that, I need to:
- Advert my public key and tell the other user to find and to add me (or tell them to set auto-add contacts, which is not recommended any more), and to ensure that they have managed to add me (which can fail if Repeaters throttle repeated Companion Adverts)
- Make them send Adverts of their own until I get one (or try to find them on one of the many corescope sites) and add them (same reliability issue)
- Send them a DM and hope it arrives
I didn't manage to walk even one of the three users through all these steps.
It would be really great to have an easier mutual contact on-boarding process that works well for users who don't (yet) know the RF aspects and protocol limitations of MeshCore.
Specification
This proposal adds a new mesh Contact Request message type with a respective response, and requires a yet-to-be-defined addition to the Companion protocol.
Contact Request
If user A already knows the public key of user B, user A can initiate a chat/contact relationship with B by sending them an Anonymous Request message as follows:
[destination hash, 1B][A's public key, 32B][mac, 2B][encrypted payload, variable length]
Encrypted payload:
[timestamp, 4B][greeting message, variable length text]
The request is sent using direct routing (if the path is known) with a fallback to flooding, similar to other request types.
Contact Request Processing
B's companion should acknowledge the reception of the request if the decryption was successful. However the response should not indicate whether the contact request was accepted, rejected, or whether A already was a contact before the request.
Alternative: the response contains a flag of "pending" or "added" depending on whether the contact already existed / was immediately added by B, to indicate to A that they can send DMs now.
The response is sent on the reverse path to A.
If A's key wasn't known before, and A isn't blocked, then B's companion should display it as "Contact request" or "Pending contact" in the chats, show the greeting message sent by A, and provide to the user the following choices:
- Add to contacts
- Ignore request
- Block sender
When the contact is added, a fully encrypted response can be sent to let A know that the contact request was approved and that messaging is possible now.
Contact Initiation
If neither A nor B knows the other public key yet, the easiest way is to post a contact link <public key:B> into a room or to provide a meshcore://contact/add?name=B&... link OOB. When A taps the link in a room or scans a respective QR code for an unknown Companion, A's client should prompt for a contact request message. Then, A's Companion would send the Contact Request message to the newly added public key.
A's companion should show a note that B might not be able to receive messages from A, until the request approval or a chat message from B is received.
Compatibility
To the best of my knowledge, the ANON_REQ mechanism isn't yet specified for Companions, so there will be no breaking change.
The proposal doesn't restrict the already existing mechanisms of adding contacts, but provides a new shortcut mechanism that falls back to the status quo if one of the involved parties is running an old firmware.
Security Implications
The Contact Request response leaks to A that the B companion exists, has the correct public key, and might reveal to A whether A is on B's contact list.
The on-boarding process shown here has no out-of-band verification of the public keys, so user impersonation is possible. However, this is less of a problem than having "auto-add contacts" enabled, as it requires a directed ANON_REQ and not merely a flooded Advert.
This mechanism can be used by a user to spam contact requests to other users. However, the spammer needs to know the respective public keys, and sending direct contact request is much costlier than spamming public rooms.
- 主要言語
- C
- スター
- 3.9k
- フォーク
- 1.5k
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 61
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
meshcore-dev/MeshCore のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
meshcore-dev/MeshCore#4015 ·
メンテナーはふだん 2 日以内に返信
-
CMD_SET_DEFAULT_FLOOD_SCOPE leaves an older, longer name's tail after the new name対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
meshcore-dev/MeshCore#3891 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
meshcore-dev/MeshCore#3826 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
meshcore-dev/MeshCore#3825 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
meshcore-dev/MeshCore#3781 ·
メンテナーはふだん 2 日以内に返信
meshcore-dev/MeshCore の issue をすべて見る
似ている issue
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBufferオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
389ds/389-ds-base#8251 ·
メンテナーはふだん 1 日以内に返信
-
bug data-types
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ClickHouse/clickhouse-cpp#645 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ROCm/hrx-system#3628 ·
メンテナーはふだん 1 日以内に返信