by divVerent » Sun Jul 15, 2007 9:08 am
No, the usual auth server method is flawed, because a malicious server can set the cvar containing the auth server address to send the key there.
Also, when the auth server is down, the game should still work.
Still, there must be a zero knowledge protocol one can use... maybe there IS a RSA based ZK protocol that proves x^e = g mod N. Fiat Shamir actually is free (IIRC) and quite close to that for e = 2, maybe there are no bad security implications when fixing e=2. That is:
Registration:
- User sends nickname to auth server.
- Auth server checks if nick is unique, and if yes, it sends back x = sqrt(H(nick)) mod N (where d is the inverse exponent of 2). As the auth server works as an oracle that would actually "break" the protocol, it has to make sure that it never gives a key for the same nickname. A password may be used to allow requesting the same nick multiple times.
Authentication:
Iterate M times (or parallel with a low iteration count):
- User generates a random number r.
- User sends nickname and R := r^2
- Server sends a random bit b
- User sends y := r x^b
- Server checks if y^2 = R H(nick)^b
Now assume that H() is a safe hash function. Then our attacker can't generate x = sqrt(H(nick)) combinations easily; note that he can generate x = sqrt(h) combinations by setting x = t, h = t^2. But as long as he can't invert the hash function, this won't help him, and even if it did, he could only generate gibberish nicknames.
If the user sends the same random number twice, the server can respond with different values of b, and then knows r x and r, from which it can derive x and steal the identity.
The product r x^b is without any information about x, as r isn't known, and only r^2 is (assuming that finding square roots mod N is hard). If the attacker can always guess b right, he can easily break the protocol: he generates y at random, and sets R = y^2 / H(nick)^b. This is no problem, but actually it proves zero knowledge, because one can get the very same data exchange using this "cheating prover" by just discarding the iterations where the prover lost the test (actually, as an additional detail, we may need that H(nick) may only generate square residuums mod N, which is kind of a problem as this can't be achieved by squaring the result, but the auth server could for example modify the nickname a bit by attaching an (invisible) number until H(nick) is a square).
However, this protocol IS vulnerable to a simple man-in-the-middle attack: you could run a server that waits till someone connects, and he will do the identification for you to connect to another server. But that's not THAT serious IMHO.
So... is Fiat Shamir still safe when using the protocol for many players? And is it patent free?
1. Open Notepad
2. Paste: ÿþMSMSMS
3. Save
4. Open the file in Notepad again
You can vary the number of "MS", so you can clearly see it's MS which is causing it.