News for hackers. Stuff that matters.
Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by ac4tw on Tuesday April 17, 2018 @12:37PM (#16859918)
Greetings, I develop Stealthy with the OP. After reading a lot of the HN dApp posts, I want to address two frequently occurring topics from the comments:

1. How decentralized is this dAPP? Stealthy is decentralized in two main ways. The first is that it does not require a centralized signaling server to establish connections, when two people have added each other as contacts. That of course requires that they initially co-ordinate outside of stealthy (though we do however have a convenience mode that does a one-time centralized introduction / discovery service if both users have that enabled). The second is our storage, which is built atop Blockstack's GAIA storage system (more info here: https://github.com/blockstack/gaia).

2. How secure is Clientside javascript crypto? In other HN posts, I've seen quotes like: 'Nobody who's serious about security is going to use an app that does crypto in javascript. Why not make browser plugins to avoid this complication?' and posted the classic Javascript cryptography being considered harmful article. Blockstack gets around this in a way similar to being a plug-in with their one-time browser download (which is essentially a node process that also has your crypto keys/generation capabilities so you're not transmitting those back and forth for acquisition purposes). You can find more information on that subject in this forum post: https://forum.blockstack.org/t/blockstack-vs-clientside-js-e...

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by lawl on Tuesday April 17, 2018 @04:36PM (#16862092)
I don't understand what a blockchain is needed for. Resolving registered identities to a public key? Because I can't seem to sign up without an e-mail address, which seems... weird to me.

What is the centralized storage used for? Offline messages and history sync between devices? edit: i didn't see the dAPP part, is it also used in P2P messaging?

How does your decentralized lookup avoid leaking friend requests out into the open?

On your website it also sais you use WebRTC for P2P communication. Am I correct in my assumption then that the STUN/TURN/ICE server at least knows who started talking to whom and when?

I really miss a detailed architecture/protocol overview. It doesn't have to be as detailed as for example the signal docs[0], but just something to be able to understand your architecture and the choices you made on a high level.

[0] https://signal.org/docs/specifications/doubleratchet/

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by ac4tw on Tuesday April 17, 2018 @05:41PM (#16862561)
Good questions lawl. I'll try to address them in order:

1. "A blockchain, implemented using virtualchains [6], is used to bind digital property, like domain names, to public keys. Blockstack’s blockchain solves the problem of bootstrapping trust in a decentralized way i.e., a new node on the network can independently verify all data bindings." [https://blockstack.org/whitepaper.pdf]

2. I believe collecting an email is required in case you need to recover your 12 word pass phrase.

3. The default storage that comes with a Blockstack account is a Microsoft Azure Blob. If you implement your own GAIA hub, you can circumvent that with a number of other options, but conventionally you would refer to the other options as 'centralized' too. Consider this though: "We decentralize data storage with relationship to trusted 3rd parties - remove control from app developers, cloud storage providers, etc and give it to users." [https://forum.blockstack.org/t/gaia-decentralisation/4275/2].

Anyway, each user's storage is used for the following things: - contact lists - conversations - offline messaging - initiating WebRTC connections

It is all encrypted client side.

4. We have two forms of discovering users.

The first is where the users coordinate outside of Stealthy to add eachother as contacts--at this point communication is established only between the two chat clients with no third party, consequently there is not traditional leakage that may occur in this mode.

The second (which can be disabled from options) uses a centralized DB and listeners to simply exchange the notion that someone wishes to talk to you. If that centralized DB were to be hacked, that request could theoretically be leaked. The invitation to talk only occurs initially when both parties are not within eachother's contact lists.

5. We do use WebRTC for P2P communication and it can be disabled from the options or during initial configuration. The STUN/TURN/ICE server could certainly acquire some of the information that you mention.

6. We agree with your notion of an architecture / protocol overview and are currently considering precisely how we will proceed with that. Earlier this month we spoke with a representative from the EFF and their advice was to publish a paper on the subject and then commence with formal review of our work, similar to Signal.

Hopefully this helps.

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by lawl on Tuesday April 17, 2018 @06:16PM (#16862787)
Thanks, you answered some questions, but I still have some question marks. I've bookmarked the website and will check back for the (white)paper.
Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by chrisco255 on Tuesday April 17, 2018 @01:00PM (#16860135)
Curious about the choice to use cloud storage vs. IPFS or something similar. What was behind that?
Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by prabhaav on Tuesday April 17, 2018 @01:07PM (#16860194)
With Stealthy, everything is encrypted client side. Therefore, cloud storage acts as a 'dumb' storage for all your encrypted files.

You can store your files redundantly on S3, Azure, Google Cloud, Dropbox, and even IPFS. We just have to enable all those drivers :)

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by nunyabuizness on Tuesday April 17, 2018 @05:20PM (#16862422)
I think these are more questions about Gaia than Stealthy, but apply to any multi-user application on Blockstack:

- How are my messages to another user retrieved from my encrypted storage? - Does sending you a message push the message into your storage? - Do I (i.e., my Blockstack node) have to be online for my message to you to be retrieved later (say, the next time you're online)?

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by prabhaav on Tuesday April 17, 2018 @05:31PM (#16862482)
All the messages user A sends to user B is stored in user A's storage. User B poll's user A's storage for the messages.

We have offline messaging (file polling) and online messaging via WebRTC.

You don't have to be online, your contacts are polling your storage and as long as your storage is online, the messages will be sent.

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by prabhaav on Tuesday April 17, 2018 @05:48PM (#16862607)
Once User B receives the message, it is also stored in User B’s storage too.

We're also considering ephemeral messages so the messages aren't stored at all.

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by 18pfsmt on Tuesday April 17, 2018 @07:46PM (#16863353)
I'm curious if you all could implement some sort of "mixing service" so as to minimize metadata?
Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by ac4tw on Tuesday April 17, 2018 @09:22PM (#16863880)
18pfsmt, that's an interesting question. Do you have any specific examples you can point us to? When I think about a network drawn atop of say WebRTC connections, it's possible for a message to travel realtime via hops from person A to person B via persons C, D & E even though persons A & B have no direct connection, obfuscating the path and connection information that lawl alluded to with STUN/TURN/ICE servers. A similar situation exists for offline messaging polling between data storage where we could obfuscate that transaction via another user's client (i.e get person C to poll for messages from Person B to Person A offline). I'm not sure if this is what you had imagined or if you were thinking of something else?
Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by lawl on Wednesday April 18, 2018 @08:21PM (#16872410)
Not sure if it's helpful for your specific case, but that's pretty much what Tox is doing. They have a DHT and to 'avoid' leaking connection information they implemented onion routing[0]

> Tox generates a temporary public/private key pair used to make connections to peers in the DHT. Onion routing is used to store and locate Tox IDs, to make it more difficult to, for example, associate Alice and Bob together by who they are looking for in the network.

Again, I'm not sure if that'd be all that helpful in a case where e.g. Azure sees all the edits, I think timing attacks are pretty simple when you see the entire network. But then again, I'm not an expert and I also have no clue how your software works, so i don't want to go out on a limb.

[0] https://wiki.tox.chat/users/techfaq

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by 18pfsmt on Wednesday April 18, 2018 @03:42PM (#16870410)
Yes, that's similar to what I had in mind. Have you all looked at https://en.wikipedia.org/wiki/Zerocoin ? My understanding is that Zerocoin eventually developed their own protocol/ blockchain, but originally they operated a mixing service on top of Bitcoin.

I admit to being out of my element on this, so I may not be phrasing things correctly, but reading through this discussion it seemed like there would be lots of public metadata for a would-be attacker to work with.

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by ac4tw on Wednesday April 18, 2018 @09:11PM (#16872616)
Indeed if one was observing the entire network, they might be able to piece together useful metadata as you both suggest. The kind of thing you might do with a NarusInsight. Tox and Zerocoin have done some interesting work towards this end and it's definitely something for us to consider going forward.

Thank you lawl & 18pfsmt for highlighting protection of metadata vs. content. At this time protecting content seems like the minimum bar by which one should measure, with metadata protection being the ultimate goal without sacrificing performance or convenience.

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by lawl on Thursday April 19, 2018 @04:19AM (#16874214)
I totally get security/privacy vs. usability. I'm not trying to shoot you down btw. I just think we need to openly talk about these trade-offs or rather, make them clear to people who care about them (me).

Signal for example is great when it comes to confidentiality and actually easy enough to use so my mom messages me on signal, not so great when it comes to not leaking metadata. Nobody else I know uses Tox. But I know that when I use Signal it's a trade-off I'm fine with, but I'm aware of it.

Re:Show HN: Decentralized P2P Messaging with Blockchain Veri... by ac4tw on Friday April 20, 2018 @01:43AM (#16882403)
Absolutely agree with you. Transparency in a messaging platform is important (it's sort of captured in EFFs criteria for a messenger too as regards open sourcing and inspection--not sure if you saw their recent 4 part series on messaging or earlier piece on all available messaging tools).

Your comments and 18pfsmts got me thinking about metadata from a different angle than I had been considering prior--that of a state actor's capability to observe the entire network. Your comments never came across as negative.