What is Nostr?
Vitor Pamplona
npub1gcx…nj5z
2024-09-15 20:47:16

Vitor Pamplona on Nostr: Bloom filters are awesome! More feedback is welcome! ...

Bloom filters are awesome! More feedback is welcome!
I like the proposed nip76!

While Vitor Pamplona (npub1gcx…nj5z) has some medical data in mind, what I see this enable is to share kind-1 posts with groups, only! Those 12 I awarded a batch for example. Or all my 2000 follows.

The assumption of privacy would be low - any of the group could leak the event to a relay that doesn't care about nip76 but it's akin to facebook groups providing privacy. The bigger the group, the more likely somebody leaks stuff but with the bloom filter tag you can extremely efficiently limit access to any set of pubkeys.

But just how efficient are these Bloom filters here? Extremely efficient! To limit access to just a single pubkey, assuming you spend as many bytes as it would take to write the pubkey out, you get a false positive rate of at most one in 319784383802483100000000000000000000000000.

But how about groups of 12 or 2000?

12 pubkeys can be specified with a FPR of 1E-9 with 66B of data or 1E-17 with 118B.

2000 pubkeys can be specified with a FPR of 1E-9 with 12kB of data or 1E-17 with 20kB.

In both examples we need 6 or 10 bytes per pubkey respectively, compared to 32B which these pubkeys actually weigh.

https://github.com/nostr-protocol/nips/pull/1497
Author Public Key
npub1gcxzte5zlkncx26j68ez60fzkvtkm9e0vrwdcvsjakxf9mu9qewqlfnj5z