News for hackers. Stuff that matters.
Re:Show HN: Anonymous messaging with a 1km radius by theveloped on Thursday October 27, 2016 @09:40AM (#12805013)
Due to the fact that distance matching is done server side the application doesn't have any knowledge with regard to distance. The only knowledge one has is whether or not one receives messages from an other user.

Using triangulation to pinpoint an other users location would therefore require to move in and out of range (while the targeted user is continuously sending messages). Thus significantly more difficult than if the actual distance measure was depicted in the UI or leaked elsewhere.

Finally closing the API to outside requests limits the ease with which the above could be automated. Any idea's for further improving these security measures are most welcome!

Re:Show HN: Anonymous messaging with a 1km radius by pavel_lishin on Thursday October 27, 2016 @10:21AM (#12805291)
> Using triangulation to pinpoint an other users location would therefore require to move in and out of range (while the targeted user is continuously sending messages).

Or spoofing their actual location.

Re:Show HN: Anonymous messaging with a 1km radius by mseebach on Thursday October 27, 2016 @09:51AM (#12805075)
> would therefore require to move in and out of range (while the targeted user is continuously sending messages).

That, or a number of co-operating clients located at various locations in and out of the range.

A simple fix would be to have every sender generate a random vector of random length 0-100 meters (and re-generate every time you've moved at least 100 meters, you don't want to regenerate if the sender doesn't move as you'd be able to zero-in on a prolific sender), and have the message "originate" from the end of that vector.

Re:Show HN: Anonymous messaging with a 1km radius by tghw on Thursday October 27, 2016 @10:53AM (#12805541)
How exactly do you close the API to outside requests? It's not hard to reverse engineer most APIs, either by decompiling the app or just watching the wire.
Re:Show HN: Anonymous messaging with a 1km radius by tokenizerrr on Thursday October 27, 2016 @02:11PM (#12807691)
You don't. That is impossible.
Re:Show HN: Anonymous messaging with a 1km radius by bo1024 on Thursday October 27, 2016 @04:04PM (#12809344)
I can't tell how it works from the site, but a good approach is to randomize the distance threshold a bit each time. For example: if users are within 1km, always connect; if more than 2km apart, never connect; 1.xkm apart, connect with probability x.

That kind of thing combined with some rate limits (how often one can attempt to connect to a user) should be effective.

(edit) Actually, I think I like mseebach's suggestion even more: For each user, pick a random location about 100m away from them, then pretend they're there until they've moved far enough away, then repeat.

Re:Show HN: Anonymous messaging with a 1km radius by rawnlq on Friday October 28, 2016 @02:04AM (#12813489)
I am not sure if your original solution will actually work.

For example an attacker can just spoof enough accounts to sample from your distribution to figure out the true center. Imagine spoofing a grid of users with let's say K fake accounts per dot, then if you plot the histogram of who managed to connect you will see a very clear bump in the 2d histogram in the shape of circle.

The solution in your edit is much better.

Re:Show HN: Anonymous messaging with a 1km radius by civilian on Thursday October 27, 2016 @04:52PM (#12809978)
Heh, it's like salting their location.
Re:Show HN: Anonymous messaging with a 1km radius by yarou on Thursday October 27, 2016 @06:37PM (#12810967)
Believe it or not, but this is exactly what the Chinese government mandates. It's known as China shifting[0], and can cause quite a lot of headaches.

[0] https://en.m.wikipedia.org/wiki/Restrictions_on_geographic_d...

Re:Show HN: Anonymous messaging with a 1km radius by bo1024 on Friday October 28, 2016 @12:38AM (#12813134)
I'm thinking of ideas like [differential privacy](https://en.wikipedia.org/wiki/Differential_privacy).