2 ms·
Why does the server present any data to be signed at all? The client generates a string, I am Sam logging into Google and Time is Now, Signed Sam. The server h
by zaroth 12y ago
Why does the server present any data to be signed at all? The client generates a string, I am Sam logging into Google and Time is Now, Signed Sam.
The server has the public key and verifies.
- jerf 12y agoNow the server can send the signed value somewhere else, and they can be Sam, too. In fact, even if the server itself uses some sort of challenge-response, it can use the response anywhere that implements your policy.
- zaroth 12y agoAny scheme that protects against MITM is used to establish the baseline encrypted channel. Then what follows is used to authenticate the client, right? The message you generate will only work for the server you generate it for, and likewise, you must ensure you are securely delivering the message to the correct server. It's often useful to treat these as two distinct problems solved at different layers in the stack (1) establish secure channel to shared public server, (2) authenticate.
- pjc50 12y agoChannel security isn't the important thing: once you've securely delivered the authentication to the server, can that server use it to authenticate somewhere else?
- kentonv 12y agoA timestamp doesn't prevent replay attacks, it just time-limits them. Also, requiring time sync tends to be problematic -- many people have incorrect clocks. Finally, just because your protocol uses a timestamp at some position doesn't mean some other protocol won't interpret those bits in some other way. Removing server-controlled bits makes an attack harder but not necessarily impossible.
- zaroth 12y agoBut anyone who can get this signed message can also get the session token? Or are the rules of the game this has to work over an unencrypted channel? In which case you need two keys and you do DH.
- kentonv 12y agoI assumed the "time is now" was meant to prevent replays. But yes, it's great if you can establish a secure channel first with a session key generated based on randomness provided by both client and server and then, once the session is up, send a signature of the session key, signed by your long-term key. No timestamp needed, then (I think). (Insert obligatory reminder not to roll your own crypto.) But this is beside the point. You still have the problem that you are signing a thing, and if the signing key isn't restricted to signing only this type of thing, there is a risk that the thing you are signing could have a different meaning when interpreted as a different type. Even if the client fully-controls the content of the thing to be signed, this is still possible. Perhaps you can dismiss it as "unlikely", but I'm not sure I'm comfortable doing so.