Oddbean new post about | logout

Notes by Martti Malmi | export

 bruh. iris.to:
- snort UI
- social graph spam filtering
– builtin cashu wallet
- random feed e... 
 Fixed it for you
 https://image.nostr.build/17202defe2d4295a3fd83b7bb4bbc3b982a724e14f940d35e05c8174e1c9ec33.png

Upload is fast, but nostr.build takes some time to check the image and return the url
 https://image.nostr.build/1cc298a7cce6d0519962f410fc1be085d1c9e3d24a743009e920865c1edbd82f.png

nostr:nevent1qqsy6uqg95hfc6qfj4ausk8h59tjkhy3pm2vakxygm3ftkxq8stetfcpremhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet59upzq5xeflpdskqvdq4swxj59793uvdzqzc9pzatjk3nhmcg2h0js8trkt6wzz 
 My son, nostr:npub14fc6q22gfzztjx04umzgjrp7n0fqvfe2n43hzg2m8233ner2v76qgevg7a has a new #nostr pr... 
 Zap.army 
 What is the relationship between Iris and Snort now? Are they still united? Or is Iris like the e... 
 They're separate codebases again. Iris uses NDK and Snort uses the Snort system (also available as a library). 
 Lovely!  Nothing seems to happen when I click "Download Large Graph". 
 There's no download indicator but it should be downloading https://files.iris.to/large_social_graph.json. You can also try downloading from that link and feeding to "load from file". 
 Added to https://iris.to and https://graph.iris.to the option to download a large pre-crawled social graph with 161K users and 5.25M follow relationships.
 https://image.nostr.build/c937f408d0543e06c86ae4df700d3ead8e61122c53fe7d1c54e3bb7382c487a4.png 
 It’s so large that it crashes the mobile browser though 🤷‍♂️ 
 Signal started by not allowing anyone to export it. That was forward secrecy. But when they added... 
 Forward secrecy means that compromise of a long-term key doesn't reveal past messages. Signal does provide that. It's a different category of attack if someone gets access to your device and sees your chat history, or tricks you to link an untrusted device.

Export is possible in any client, at the very least with screenshots or by writing the message history on a piece of paper, but that's not related to forward secrecy. Disappearing messages is the solution when you don't want your message history potentially seen by anyone later.

You can use a VPN to hide your geolocation from Signal (which you should do on Nostr as well if you need privacy), but it's true that they can connect your messages to your phone number, see when and probably with whom you're chatting. Not surprised if intelligence agencies are mining that data.

With Nostr we're at least over the phone number part, there's no single service that sees all traffic and there are different ways to fix the metadata issue — and do forward & backward secrecy when desired. 
 If you can export and import it, you don't have any forward secrecy... Ever.  
 Signal doesn't have forward secrecy if you can save a backup of your chat? I don't think that's the definition. 
 As long as you never let the ratchet state be exported from the main client, you should be fine.
... 
 There's nothing preventing users from moving to another DM client. You can always go back to the old client or export or copy paste message histories if you need them.

It's not comparable to Twitter or Facebook, because you own your identity key and can always change the client or relays.

There's always a tradeoff between availability and security of messages, and maybe there are different use cases for both kinds of messaging. On Nostr, we are free to choose. 
 They can only see message history as far as the linked device allows and can't see future messages if the device unlinks. I don't know the exact details how Signal does this, but I don't think its forward and backward secrecy is broken because of the feature. 
 Actually even without device linking, I'd rather use forward-secret messages even if they're out of sync with some other client. 
 Then you have just broken forward and backward secrecy: Attackers can use that feature to reassem... 
 They can only see message history as far as the linked device allows and can't see future messages if the device unlinks. I don't know the exact details how Signal does this, but I don't think its forward and backward secrecy is broken because of the feature. 
 I think forward and backward secrecy are unachievable in Nostr. You can either be able to  load y... 
 Maybe we can have something like Signal for connecting sessions on different devices / clients so they see the same messages. 
 I guess cryptographic forward & backward secrecy would be the most important addition, along with hiding the recipient metadata. I see Jeff started double ratchet at https://github.com/nostr-protocol/nips/pull/1206 and moved on to MLS. I'll take a look. 
 What attack does the symmetric ratchet protect from? If your device is compromised, your message history will be revealed anyway.

Maybe it would help in the case when you locally delete earlier messages in a chain ("disappearing messages" or otherwise) but they're still on relays. 

Maybe I answered my own question, but is there something else besides this?

Why not more difficult? Implementing DH + symmetric ratchet is more complexity than just DH. 
 Deriving a single-use public key for signing each Nostr event would have the advantage of messages not being linked to any other message or user, though. 
 We already 'discarded" double ratchet for not adding much on top of nip 17. Now, the focus is on ... 
 Am I right that nip-17 reveals the message recipient public key? 
 The advantage of the double ratchet is in the automated operation of the symmetric ratchet and th... 
 What attack does the symmetric ratchet protect from? If your device is compromised, your message history will be revealed anyway.

Maybe it would help in the case when you locally delete earlier messages in a chain ("disappearing messages" or otherwise) but they're still on relays. 

Maybe I answered my own question, but is there something else besides this?

Why not more difficult? Implementing DH + symmetric ratchet is more complexity than just DH. 
 Halp me understand double ratchet. What's the advantage over just periodically generating new keys and doing DH between them? Would be fairly simple to do on Nostr. Even if your main private key was stolen, your message history would be safe.

In addition to DH keys, double ratchet also has individual "message keys" and "sending/receiving chain keys". In what real-life scenario would they be compromised without also compromising all past messages on device?

https://signal.org/docs/specifications/doubleratchet/
 https://image.nostr.build/c66a4b601a146bbd7bdb93122fa7b1d778355f75801deaa1298be7a09444f465.png 
 Amazing! But isn't one of the main powers of social media that your post goes viral and lots of p... 
 Social graph is not just the people you follow (1st degree), but also people they follow (2nd degree) and so on.

Currently Iris loads up to 2nd degree by default. There's also a tool for crawling up to 3rd degree, but it consumes a lot of bandwidth and cpu. 2nd degree was 20K users and 3rd degree 160K users in my graph, so there's plenty of diverse voices.

Optionally we could show posts from unknown users who have a nip05 (e.g. username@iris.to) from a bot-resistant provider. In a permissionless system like Nostr, we will always need to limit write access somehow or it will be filled with spam.

https://image.nostr.build/1407ad9d130088eceff4a8f1d73dc4f546237b47db170c8f48313d38839695eb.png 
 Added a tool for crawling the follow lists of your friends-of-friends. My graph of 160K users and 5M follow relationships is 36 MB on disk.

https://image.nostr.build/1407ad9d130088eceff4a8f1d73dc4f546237b47db170c8f48313d38839695eb.png 
 Nice.
Does the zero-config zaps happen / default to ecash if a user didn't fill their LN address ... 
 It sets npub.cash address only when you create a new user on Iris. Maybe it could suggest npub.cash address for existing users who don't have a LN address yet. 
 Rolled out new https://iris.to version:

* Zero-configuration zaps for new users: comes with a [npub]@npub.cash lightning address and an integrated Cashu wallet (cashu.me)
* ReplyGuy-free experience: automatically hides content by users not in your social graph
* "Unseen" feed. Click "home" or switch tabs to refresh.
* "Adventure" feed. Shows content from everyone in your social graph.
* Social graph based fast user search
* Better scroll position retention on back navigation

"Add to home screen" for better mobile use experience & push notifications.

This new version is based on NDK. I think it's a good idea for web devs to work together on shared core libraries.

Not perfect, but I'll keep working on it! If you preferred the previous Iris version, you should use https://snort.social which is basically it.
 https://image.nostr.build/2f997643856deed77cbb27eb68549fe5def27b3464f1d88d716c80badac0d354.png 
 We had a Cashu dev call yesterday and four (!!) new wallets based on NIP-60 were presented. NIP-6... 
 Apparently cashu.me is not nip-60 yet — is there some other wallet I should use on iris.to instead?

Is nip-60 on public relays a privacy tradeoff? I imagine it reveals when there's been activity in your wallet. 
 Recurso de tradução que tinha no menu dos 3 pontinhos, nos posts
Thends posts
nip05 automático... 
 Sorry that Iris doesn't have translations yet! Snort.social is basically the old version of Iris if you prefer it. 
 On the relay side, maybe allow nip-42 authenticated users to push gift wraps (where event.pubkey is not the authenticated user).

On the client side you need to process all incoming gift wraps and only check WoT after unwrapping. That adds some spam processing overhead unless you only connect to WoT relays. 
 Gift wraps don't hide recipient metadata, and you can guess who are talking to each other by timestamp correlation 👀

Creating a new shared keypair for each secret chat doesn't have this problem, but it can be tricky to keep track of all the keypairs between sessions. 
 How do you make gift wraps work with WoT? 
 On the relay side, maybe allow nip-42 authenticated users to push gift wraps (where event.pubkey is not the authenticated user).

On the client side you need to process all incoming gift wraps and only check WoT after unwrapping. That adds some spam processing overhead unless you only connect to WoT relays. 
 Imagine a relay with countless mailboxes, each with a unique number. For parties already engaged ... 
 How would you derive the address? Something like event.pubkey = publicKey(KDF(messageKey))? I imagine "mailbox address" would need to be the signer's public key so others can't spam the mailbox. 
 Social graph filtering works great and doesn't require domain names or other trusted parties, but nip05 (maybe limited to trusted providers) can be one way to complement it for newbies who are not yet in the graph. 
 Based on user research we did last week on onboarding, there are a lot of active Nostr users with... 
 I was thinking about bitcoin mining style PoW which some have suggested, but actually I'm concerned it might hinder normal users more than spammers. There was a PoW-based anonymous reddit once, but it was filled with spam. https://github.com/notabugio/notabug 
 what is nip05 and how do i get one? 
 Basically a domain-name based Nostr username, get one for free at https://iris.to/free-nostr-address 
 What happens to new users to Nostr who don’t know anyone? Who are legit and not bots?  
 It's best if they can be introduced by someone, or get noticed by zapping. 

Secondarily, messages from users who have a nip05 from a bot-resistant provider like iris.to, or provided a sufficient proof-of-work, could be scored higher, at least within the "messages from unknown users" pool. 
 活理さんが描かれたんですか?! 
 Yes; he's not only a translator, swordsman and academic, but also an artist! 
 so like WoT? how many degrees deep and is this opt in or communicated to the user? if all my ques... 
 Yes. It actually limits to 5th degree so basically everyone who's somehow connected. It only initially downloads up to 2nd degree follows though, and then further when you visit their profiles. I could make these parameters configurable. 
 how u do this  
 It only shows content from authors who are in your social network. Nostr-social-graph library https://github.com/mmalmi/nostr-social-graph 
 try https://beta.iris.to for a replyguy-free experience 
 Testing ecash wallet 
 Test 
 14 WoT relays good to go sir 

wss://wot.utxo.one
wss://nostrelites.org
wss://wot.nostr.party
wss... 
 If your client doesn't support WoT yet, at least you can use WoT relays.

nostr:nevent1qqsqqqqqz6p6am89g4586w2wfkr29vzvd680k9xmwmrzzh4x4u4dt7qpzamhxue69uhhyetvv9ujumn0wd68ytnzv9hxgtczyr3vea70ypqr70e2ff2mx28smca78p2c5l2lxd3jlk4wl3exc8ywkw9clk8 
 It depends on your use case, nutscash does not support NWC, it really is just an all in one cashu... 
 It's just embedded as a /cashu subdirectory & iframe in the user interface. I'd like to make it more seamlessly integrated, so you could quick zap, show the balance and automatically redeem incoming zaps from npub.cash without the wallet page being open. 
 Should I use nuts.cash @nutscash instead of cashu.me as the integrated wallet in beta.iris.to? 
 Yes. Purple for yourself and followed users. Orange for users that are followed by users who are followed by at least 10 users you follow, and gray for at least 1. 
 for clarity 🐒
purple: you and your follows
orange: followed by at least 10 users you follow
gray: followed by at least 1 user you follow 
 Looks great! What are the levels of trust? I see grey, purple and orange checkmarks for profiles.... 
 Yes. Purple for yourself and followed users. Orange for users that are followed by users who are followed by at least 10 users you follow, and gray for at least 1. 
  https://image.nostr.build/5b27a090cdf43f8268fdaf5b3ab0ae832e14acd3e490035610a6c8ee1ccae24e.png
 https://image.nostr.build/12d0aeaa4c9a8c406b3588ee7aa82960afbd18950bd7789583cd9a795038555b.png

Published npm package nostr-social-graph and its demo on https://search.iris.to

It builds a social graph from Nostr follow events. You can query followed users, followers and follow distances. You can change the graph root user, efficiently calculating new follow distances.

It maps public keys to integers as internal representation, consuming less memory and storage when serialized. My graph of 23 000 users and 120 000 follow relationships is 2.2 MB on disk.

The package also includes pre-crawled datasets of follows and profiles that you can optionally use. They're used on https://beta.iris.to and https://search.iris.to for hydrating the search index and profile cache.

https://beta.iris.to uses the social graph for filtering of replies and notification, so you don't need to see that reply guy again (unless he's followed by people you follow — need to add "muted by followed users" support).

https://www.npmjs.com/package/nostr-social-graph
https://github.com/mmalmi/nostr-social-graph 
 Just made it fetch missing follow lists from your follows when you change current user 
 As clients implement WoT filtering based on follow lists, the meaning of "follow" might become more like "endorsement", whether we like it or not. Your followers might complain / unfollow if your follows bring unwanted content to their feed. Other lists would be used when you just want to follow without endorsing. 
 おはようございます ☕️ Woke up at 5 am Helsinki time to adjust to Tokyo time. 
 nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s nostr:npub17plqkxhsv66g8qux... 
 Yes 👍 
 Nice. is this the first client to do this? 
 Afaik yes, but I think others will follow. Having a wallet and zaps out-of-the-box makes onboarding newbies so much easier. 
 Wow! Did you embed the wallet or are you hosting it yourself? 
 I'm hosting it myself, so it can access the nsec stored on the same domain and works without configuration. Enabled npub.cash and Coinbase exchange rate by default. 
 Yes, but looks like it's worst than the new. 
 It's the same application 
 Hi, What happened to the new.iris.to? 
 It should redirect to beta.iris.to 
 Added cashu.me wallet to https://beta.iris.to . When you sign in as a new user, you're all set to send and receive zaps without configuring anything. It sets [npub]@npub.cash as your lightning address.

Haven't implemented zap button send via cashu yet, but you can copy the zap invoice and pay it in the wallet.
 https://image.nostr.build/46587e9d2fc0725ca2e1c00f2850fc8b3f2c248de797e3115a9be2803183f664.jpg 
  https://image.nostr.build/e3fafe2a671f40cfe39fb316ba0363fc0241d42f1bed99ec5df3bca7eadf93d3.png

Nostr.band API down @brugeman

When API is down and user not logged in, maybe I should show "Follows" or "Adventure" feed curated by my own social graph or something as a placeholder.

Best would be NDK SQLite adapter which could calculate the trending stuff locally. 
 Is there some way to receive normal zaps to a cashu wallet? 
 Thinking of integrating some existing cashu wallet as the default wallet of https://new.iris.to 
Event not found
 Have you configured CORS headers? It's necessary to allow requests that originate from other domains like iris.to or snort.social.