jb55 on Nostr: > Who wants to give me a tutorial on how the NIP-04 decryption key is derived by the ...
Published at
2022-08-07 15:27:19Event JSON
{
"id": "103e825a655920c3033c28067ae74303620d97e68538aa952c80eaea6a07099e",
"pubkey": "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245",
"created_at": 1659886039,
"kind": 1,
"tags": [
[
"e",
"cb7b841188c76d959806d6ffd99894e11bfd6e88861936f74365bb54298b2710"
],
[
"p",
"2ef93f01cd2493e04235a6b87b10d3c4a74e2a7eb7c3caf168268f6af73314b5"
],
[
"hashtag",
"l560"
]
],
"content": "\u003e Who wants to give me a tutorial on how the NIP-04 decryption key is derived by the recipient?\n\nDamus code is here: \n\nhttps://github.com/damus-io/damus/blob/b7513f28fa1d31c2747865067256ad1d7cf43aac/damus/Nostr/NostrEvent.swift#L560\n\nsee `get_shared_secret`. it’s important to use memcpy as the hash function when calling secp256k1_ecdh.",
"sig": "9048329741048c8d82e27bc05cca31a08bc945eb5604ca5a87b11349778fd7afe93c19a4fcac02266bd51637d9d365a35d2f8448b057600ddb8a062cd70a05fb"
}