Replies: 4 comments 31 replies
-
Beta Was this translation helpful? Give feedback.
25 replies
-
Sorry for my noobness in cryptography, but using 2 tags in rumor like these:
Like this: // external wrap layer
{
"id": "<id>",
"kind": 1059,
"pubkey": "<Buyer's ephemeral pubkey>",
"content": { // Seal
"id": "<seal's id>",
"pubkey": "<index 1 pubkey (trade key)>",
"content": { // Rumour
"id": "<rumor's id>",
"pubkey": "<Index 0 pubkey>",
"kind": 1,
"content": [
{
"order": {
"version": 1,
"action": "new-order",
"content": {
"order": {
"kind": "buy",
"status": "pending",
"amount": 0,
"fiat_code": "VES",
"fiat_amount": 100,
"payment_method": "face to face",
"premium": 1,
"created_at": 0,
"trade_key_index": 1
}
}
}
}
],
"created_at": 1691518405,
"tags": [
[
"nonce",
"u64 value"
],
[
"signed_nonce",
"index 0 signature of the nonce tag"
]
]
},
"kind": 13,
"created_at": 1686840217,
"tags": [],
"sig": "<index 1 pubkey (trade key) signature>"
},
"tags": [
[
"p",
"<Mostro's pubkey>"
]
],
"created_at": 1234567890,
"sig": "<Buyer's ephemeral pubkey signature>"
} So we have:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Proposal with identity signature as a gift wrap tag.// external wrap layer
{
"id": "<id>",
"kind": 1059,
"pubkey": "<Buyer's ephemeral pubkey>",
"content": { // seal
"id": "<seal's id>",
"pubkey": "<index 2 pubkey (trade key)>", // trade key (must match trade key in rumor)
"content": { // rumor
"id": "<rumor's id>"
"pubkey": "<index 2 pubkey (trade key)>", // trade key in rumor
"kind": 1,
"content": [
{
"order": {
"version": 1,
"action": "new-order",
"content": {
"order": {
"kind": "buy",
"status": "pending",
"amount": 0,
"fiat_code": "VES",
"fiat_amount": 100,
"payment_method": "face to face",
"premium": 1,
"created_at": 0,
"trade_key_index": 2,
"mostro_key": "<mostro pubkey>", // mostro key in rumor (avoids replay attack)
"identity_key": "<index 0 pubkey (identity key)>", // identity key in rumor (nullable in full privacy mode)
"reputation": true, // indicates this trade is reputation tracked (requires identity_key)
}
}
}
},
],
"created_at": 1691518405,
"tags": []
},
"kind": 13,
"created_at": 1686840217,
"tags": [],
"sig": "<index 2 pubkey (trade key) signature>" // proof of trade key ownership
},
"tags": [
["p", "<Mostro's pubkey>"], // mostro key (must match mostro key in rumor)
["is", "<index 0 signature of the rumor's id>"], // proof of identity key ownership, not required in full privacy mode
],
"created_at": 1234567890,
"sig": "<Buyer's ephemeral pubkey signature>"
} |
Beta Was this translation helpful? Give feedback.
5 replies
-
Thank you all for your amazing ideas, we have a final version, closing this discussion |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It is required to read NIP-59 (gift wrap) and NIP-06 to fully understand this document
In order to have interoperability, when a user started the client for first time, the client should create a new mnemonic seed phrase which is the only information users will need to share with other client to have the same
Mostro session
. Mostro clients should use the derivation pathm/44'/1237'/38383'/0/0
.Clients will always use the first one (zero)
m/44'/1237'/38383'/0/0
to identify the user with mostrod, users who wants to maintain reputation can send an event to Mostro signed with thezero
key, the identifier, used to update their rating, the client will start deriving new keys fromm/44'/1237'/38383'/0/1
for each new order created or taken, users who don't want to maintain reputation simply don't send the identifier event to mostrod, let's see it in more detail with an example:Alice starts a Mostro client for first time, at that moment the client creates a new mnemonic seed phrase and derive two keys, the identifier key (index
0
) and the next operation key with index1
m/44'/1237'/38383'/0/1
, we will use operation keys to sign the gift wrap seal event.Before start operating the client automatically should identify with Mostrod, in order to achieve this the client send a message in a Gift wrap Nostr event to mostrod with the seal signed with index
1
key and this content's rumor:1
key and with the index0
pubkey in the rumor, inside the content the client signs the chanllenge with index0
key, this way Mostrod knows that the user of index1
is also the user of index0
, Here the content's rumor:Now Alice can create or take a new order with the index
1
key, and Mostrod can show the reputation liked to index0
key, in the particular case there is no reputation, but it will be the next time Alice operates.Alice create a sale order using index 1 key
Bob takes the order
After finish the deal, both mostro clients derive the next key, Alice new key is index
2
(m/44'/1237'/38383'/0/2
) and send a message in a Gift wrap Nostr event to mostrod with the seal signed with index2
key, Here the content's rumor:Mostrod respond with a random number hashed with sha256
Alice's client sends a message in a gift wrap Nostr event to Mostrod with seal signed with index
2
key and with the index0
pubkey in the rumor, inside the content the client signs the chanllenge with index0
key, this way Mostrod knows that the user of index2
is also the user of index0
Now Alice can create or take a new order with the index
2
key, and Mostrod can show the reputation liked to index0
key.Full privacy mode
Clients must offer a more private version where the client never ask for a challenge to mostrod, in that case mostrod can't link users orders, the tradeoff is that users who choose this option cannot have a reputation
Beta Was this translation helpful? Give feedback.
All reactions