Martti Malmi on Nostr: I'm at Bitcoin Amsterdam, but spent half the day finishing some Signal-style double ...
I'm at Bitcoin Amsterdam, but spent half the day finishing some Signal-style double ratchet messaging.
Deployed an experimental version on
https://iris.to. You can create chat invite links and give them to friends via QR or other messaging. The UI is still lacking and glitchy, but just had to demo at the conference.
The chats cannot be publicly linked to either participant, and even if your main Nostr key is revealed, the content and existence of past messages stays hidden.
Also published npm package nostr-double-ratchet 0.0.1:
https://www.npmjs.com/package/nostr-double-ratchetIt's not actually double ratchet yet, but the single ratchet already achieves forward and backward secrecy.
The second ratchet would help secure the latest consecutive messages by same author, in case a message key for the most recent of their messages is compromised. That makes disappearing messages or manually deleted messages more secure. I guess we'll have to do it so we can say "Signal-level security".
This is obviously not tested or audited yet, but probably it's not worse than normal Nostr DMs 😅
You can take a look at the source code, but I'll write a better technical description later. It's using existing Nostr cryptography + some key derivation stuff. Chat invites use gift wrap -like arrangement addressed to the inviter's temporary session key.
https://github.com/mmalmi/nostr-double-ratchetPublished at
2024-10-09 15:41:34Event JSON
{
"id": "cb269c047392657426a91288172d79f6d05517dfa13aff33b62dafef00796457",
"pubkey": "4523be58d395b1b196a9b8c82b038b6895cb02b683d0c253a955068dba1facd0",
"created_at": 1728488494,
"kind": 1,
"tags": [],
"content": "I'm at Bitcoin Amsterdam, but spent half the day finishing some Signal-style double ratchet messaging.\n\nDeployed an experimental version on https://iris.to. You can create chat invite links and give them to friends via QR or other messaging. The UI is still lacking and glitchy, but just had to demo at the conference.\n\nThe chats cannot be publicly linked to either participant, and even if your main Nostr key is revealed, the content and existence of past messages stays hidden.\n https://image.nostr.build/b4533acd973793f7114fd5c272ccd5b5045ea0bd127c214e8314fc4c8282a354.png\n https://image.nostr.build/ded8c0437548cb1359d34b43b966b64f798cd2f98ae5f859771f47cc551cd5bd.png\n https://image.nostr.build/4458f2de8f4d424aff137d2d7ed283dd27501e1abc0a43234405008614a5cb70.png\n\nAlso published npm package nostr-double-ratchet 0.0.1: https://www.npmjs.com/package/nostr-double-ratchet\n\nIt's not actually double ratchet yet, but the single ratchet already achieves forward and backward secrecy.\n\nThe second ratchet would help secure the latest consecutive messages by same author, in case a message key for the most recent of their messages is compromised. That makes disappearing messages or manually deleted messages more secure. I guess we'll have to do it so we can say \"Signal-level security\".\n\nThis is obviously not tested or audited yet, but probably it's not worse than normal Nostr DMs 😅\n\nYou can take a look at the source code, but I'll write a better technical description later. It's using existing Nostr cryptography + some key derivation stuff. Chat invites use gift wrap -like arrangement addressed to the inviter's temporary session key. https://github.com/mmalmi/nostr-double-ratchet",
"sig": "bf7526b127b776ee0c3b148be94a7f9e15a5baea0bbdc1d2d75c52003806f22d7e58f7355bedb0bc2264107c112387a8342ef9bf229ea1f83dd3c601e6c1eaad"
}