Send dm on sigit sign/complete #230

Open
enes wants to merge 14 commits from 92-send-completion-dm into staging
Member

Closes #92

The PR implements the initial private DM sending (nip17) as discussed in the issue #92, makes the changes to addRelay function by skipping duplicate relays while adding, and createWrap function by having a wrap's created_at date set randomly in the past (up to 2 days) per recommendations to avoid time-analysis attacks (https://github.com/nostr-protocol/nips/blob/master/59.md#other-considerations).

We send the dms on sigit:

  1. creation to the next signer (unless they are the creator) - /sign
  2. signing
    • if NOT last to creator that sigit was signed, and to the next signer (unless they are the creator) - /sign
    • if last to everyone (creator, signers, viewers) - /verify

Each dm does the following:

  1. fetch receiver relays
  2. fetch preferred dm relay list from all receiver relays (kind 10050)
  3. prepare event, seal and wrap with proof of work
  4. send the event to preferred dm relay list (or fallback to receiver relays if list empty)

Postponed:

  • Check the updated createWrap for side effects. The updated function now sets created_at randomly up to two days in the past. How will this affect the sorting we do in fetchEvents (when limit is set filter.limit)?
    Edit: Not relevant.

Blocked:

  • Issue with callbackPath navigation - handleRootRedirect when users are not logged in (#229)

Improvement possible:

  • Make sure to have a unique "sender" for the sigit so the messages (for creator) arrive in the same conversation
    Edit: Opened as a separate issue as a "nice to have"
Closes #92 The PR implements the initial private DM sending (nip17) as discussed in the issue #92, makes the changes to `addRelay` function by skipping duplicate relays while adding, and `createWrap` function by having a wrap's `created_at` date set randomly in the past (up to 2 days) per recommendations to avoid time-analysis attacks (https://github.com/nostr-protocol/nips/blob/master/59.md#other-considerations). We send the dms on sigit: 1. **creation** to the next signer (unless they are the creator) - `/sign` 2. **signing** - **if NOT last** to creator that sigit was signed, and to the next signer (unless they are the creator) - `/sign` - **if last** to everyone (creator, signers, viewers) - `/verify` Each dm does the following: 1. fetch receiver relays 2. fetch preferred dm relay list from all receiver relays (kind 10050) 3. prepare event, seal and wrap with proof of work 4. send the event to preferred dm relay list (or fallback to receiver relays if list empty) Postponed: - [x] ~~Check the updated `createWrap` for side effects. The updated function now sets `created_at` randomly up to two days in the past. How will this affect the sorting we do in `fetchEvents` (when limit is set `filter.limit`)?~~ Edit: Not relevant. Blocked: - [x] Issue with `callbackPath` navigation - `handleRootRedirect` when users are not logged in (https://git.nostrdev.com/sigit/sigit.io/issues/229) Improvement possible: - [x] Make sure to have a unique "sender" for the sigit so the messages (for creator) arrive in the same conversation Edit: Opened as a separate issue as a "nice to have"
enes added 2 commits 2024-10-14 10:49:04 +00:00
fix: only send to next signer on create
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 32s
3b4bf9aa29
enes added 1 commit 2024-10-14 11:19:53 +00:00
refactor: show sent dm count, don't sent twice to creator
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 33s
b04f4fb88d
enes added 4 commits 2025-01-24 14:09:28 +00:00
enes added 2 commits 2025-01-31 18:40:18 +00:00
Fix #229
chore(git): merge staging into 92-send-completion-dm
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 58s
47fcdea385
enes added 1 commit 2025-02-07 10:05:05 +00:00
chore(git): merge branch 'staging' into 92-send-completion-dm
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 57s
25780a6789
enes added 3 commits 2025-02-07 16:24:42 +00:00
enes changed title from wip: Send dm on sigit sign/complete to Send dm on sigit sign/complete 2025-02-07 16:24:51 +00:00
Owner

There is no privacy issue with using the actual sender key to seal (kind-13) the information, as it is encrypted into the content of the gift wrap

The intention behind the use of random sender keys was to avoid metadata linkage for kind-4 DMs

There is no privacy issue with using the actual sender key to seal (kind-13) the information, as it is encrypted into the content of the gift wrap The intention behind the use of random sender keys was to avoid metadata linkage for kind-4 DMs
enes added 1 commit 2025-02-18 16:45:59 +00:00
chore: remove extra comment whitespace
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 49s
f422ee338c
s approved these changes 2025-02-20 04:45:31 +00:00
All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 49s
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 92-send-completion-dm:92-send-completion-dm
git checkout 92-send-completion-dm
Sign in to join this conversation.
No description provided.