Skip to main content
gamedev.net
🔒 Locked

Most secure method

Started by nolongerhere Feb 14, 2007 at 3:56 PM 12 replies 1.8k views
Original Post
nolongerhere
nolongerhere
I have been playing around with networking latly and I was looking for something to code. So that led me to wonder, what is the best way for 2 people to anonymously and securely communicate? Would it simply be client 1 connects to Server; client 2 connects to Server. And the server uses something such as PGP? I was doodling on paper and came up with a method that used multiple servers, each of which were "blind" to something... such as the peers IP or the encryption key, which eventually lead to a randomly picked server which connects to client 1. Im sure im going in the wrong direction but im just doing this as an experiment and project to learn networking better. NOTE: The method I came up with didnt use anything like usernames because that isnt really anonymously, my way used a ID generated on the fly as a method for the 2 people to find each other. Though that means client 1 has to in some way, send the ID to client 2 for him to connect to the same server. Which isnt really secure! I also had the idea that the 2 people could always use the same channel (like in IRC) for all of their conversations, but that creates a pattern and someone else may get a hold of it. Im sure I make no since and going in the wrong direction, but please help!
Sneftel
Sneftel
That all depends. Do you require a purely P2P solution, or can a server participate? Do the clients trust the server? Can the clients exchange a secret beforehand, such as their users meeting in person?
nolongerhere
nolongerhere
Sure, they can give the other some info before hand (im guessing a key?).
As far as them trusting the server, no not really. My method used atleast 3 servers so that none of them individually know a lot, they are all "blind" to something like I said. I dont want the two clients to be directly connected or beable to find out each others IP, I also dont want saved data like a table for username/ip in a central server. I guess its kind of impossible to make it unbreakable, especially when you have to go through servers instead of directly connecting.

Im just looking for ideas on something I can implement such as the idea I talked about, though my idea is flawed and probaly isnt worth the effort so im asking here.

Thanks
Sneftel
Sneftel
Quote:
Original post by Falling Sky
Sure, they can give the other some info before hand (im guessing a key?).

How exactly would that work? I thought they were supposed to be anonymous to each other?

Your requirements are in opposition. You say that Alice should be able to "securely" and "anonymously" chat with Bob. That is, Charlie should not be able to determine what Alice and Bob are talking about, and Alice should not know that the person she is chatting with is Bob (or vice versa). But if Alice does not know whether she is chatting with Bob, then she could actually be chatting with Charlie, breaking the first requirement.
hplus0603
hplus0603
If you want to avoid man-in-the-middle attacks, you HAVE to exchange signatures using a trusted method. Else, even a Diffie-Hellman key exchange can be spoofed (by running the process against the middle man, and him running it against the destination).
enum Bool { True, False, FileNotFound };
Ozymandias43
Ozymandias43
The best way for people to anonymously and securely communicate is to have a drop point somewhere on the Internet on the website of an uninterested third party, for instance, user 1 leaves a review for a product on Amazon that includes the word "synergy" and the message is encoded into the otherwise uninteresting review. If you can work a one-time pad into it somehow, you're golden.

But you're talking about networking. When you say anonymous, does that mean you don't want the clients to know who the other is? I'd say you're on the right track by using multiple middle men, none of whom know the details of both clients. Did you want client 1 and 2 to find each other somehow, or did you want to set up truly random connections between users?
Bob Janova
Bob Janova
What do you mean by 'anonymous'? The people need at least identifiable handles, otherwise you can never know if you're talking to who you mean to.
hplus0603
hplus0603
The problem with the "disinterested middle party" is that that party may only claim to be dis-interested, but really logs IP addresses.

Another way to state the anonymity problem is:
- I want to send some information, tagged with identifier X
- You want to receive this information, again by knowing that the tag is X
- How can I put the information into the net, such that it is findable using tag X, without that information being traced back to me?
- How can you receive the information from the net, using X as the look-up key, without the fact that you received this information being recorded?

There are some results in this area, for example around the FreeNet concept (you might want to look at www.freenetproject.org). However, it is not trivial, and it uses resources disproportionately to what the initial information is, to build shells of anonymity.

Then you get the next problem: if I upload some information and say it should be tagged "X," how do you trust that I'm not lying about the suitability of that tag? There are some systems using chains of trust and peer group voting that are showing promise, but it is also not a totally solved problem (especially in the face of preserving anonymity).
enum Bool { True, False, FileNotFound };
nolongerhere
nolongerhere
Thanks for all the replies, let me clear some things up.

I do want both users to be anonymous to each other and beable to converse with each other, though it may require communication outside of the program... let me give you an example.

Dan found out from his friend Tom that Tom knew a guy named "Bob" that could help Dan out with this problem. So Dan and "Bob" get online and meet up using this program and they found each other thanks to Tom telling each other a keyword. And boom there connected.

The anonymousity doesnt come necessarily from the person's identity (though in this example it is) but from the IP of the user.

I hope that clears some things up and sure there are many flaws, the main ones I can think of are: Requires communication outside of the program; No verification that your talking to the real person (though I dont know if thats ever exactly possible remotely unless your using code in your communications, which leads back to the first problem of having to communicate outside of the program).

Im sure just like anything else there is no perfect means to pull this off, but im sure theres very good methods and very bad methods. Another similar idea I had was both users connect to the main server. The main server then finds a random server and sends it both clients info. The random server then connects to both clients.

For some reason I have the idea of "spawned" servers in my head. Please someone tell me if that idea is worth it. It has lead me to more ideas such as a "life time" of spawned servers. Like the server created for the 2 clients will be "terminated" after say, 5 minutes.

Thanks

Sneftel
Sneftel
Quote:
Original post by Falling Sky
Dan found out from his friend Tom that Tom knew a guy named "Bob" that could help Dan out with this problem. So Dan and "Bob" get online and meet up using this program and they found each other thanks to Tom telling each other a keyword. And boom there connected.

If Tom knows Bob in person, and can pass along a public key for Bob (possibly generated specifically for that connection), that's pretty much all you need. Once you have that, you can use public key encryption for security (server can't understand the encrypted communications, just pass them along), and a trusted server which doesn't keep logs (or, failing that, a network such as Tor) for anonymity.

Quote:
Another similar idea I had was both users connect to the main server. The main server then finds a random server and sends it both clients info. The random server then connects to both clients.

What would this accomplish? The main server still knows Dan and Bob. You've just added another entity to worry about trusting.

Quote:
For some reason I have the idea of "spawned" servers in my head. Please someone tell me if that idea is worth it.

For encryption or anonymity? Can't see how. Unless you are literally planning to spawn physical computers out of nothingness and connect them to the internet in random places around the world, which would have a variety of applications but which is physically impractical.
nolongerhere
nolongerhere
I realize the server would know both Dan and Bob, but wouldnt know they are together. I thought it would also give them a "generated", "middle man" that they both can trust and is not a part of the central server. Pretty much I was thinking that the spawned server is just like an instanced area in MMOs. The main server would end connection once the other server is spawned and would then "forget" that Dan and Tom were sent requests to join that server, or rather, it forgets about that generated server all together.

Like I said, I dont have much knowledge or experience in this field and these are just ideas ive came up with based on my thoughts of how things like this work.

If a public key is generated for Bob specifically for that connection, can it be generated by the client and never really seen by the client? Im guessing how that works anyways.

So your saying just to have a main server which Bob and Tom both connect to, use whatever keyword or channel name or w/e to find each other, and then just use encryption? That sounds like most communications programs out there :-p
hplus0603
hplus0603
Quote:
I realize the server would know both Dan and Bob, but wouldnt know they are together.


Yes, it would. Because it receives data from A, and sends it to B.

The only way to not know those guys are together would be to forward ALL the data to ALL the participants, and then use cryptography on the clients to sort it out. That wouldn't be particularly efficient, though.
enum Bool { True, False, FileNotFound };
nolongerhere
nolongerhere
Quote:
Original post by hplus0603
Quote:
I realize the server would know both Dan and Bob, but wouldnt know they are together.


Yes, it would. Because it receives data from A, and sends it to B.

The only way to not know those guys are together would be to forward ALL the data to ALL the participants, and then use cryptography on the clients to sort it out. That wouldn't be particularly efficient, though.


I meant the MAIN server wouldnt realize those 2 are together, only the "spawned" server would. But im just going with 1 central server, no complex useless stuff.

Thanks
sevensevens
sevensevens
This sound alot like zero knowledge proof. In general they use a secure hash function sum (like SHA, MD5) along with the full message to ensure that no one is modifying bits after they leave the client.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.