On Mon, 2004-02-02 at 16:32, Richard Miller wrote:
> * Is one way more secure than another for authenticating and using 
> passwords without using SSL?

Don't be deceived by HTTP-DIGEST (vulnerable to replay attack). And
don't ever store info (other than session key) in cookies, use
server-side sessions instead.

There's a little discussion of a method for authentication here:
<http://pajhome.org.uk/crypt/md5/chaplogin.html>
It's not too hard to do, in fact it's what Yahoo! Mail does if you're
not using SSL. You can view the source of their login page with a bit of
work and see how they do it. (Requires the client have JavaScript
enabled).

CHAP means Challenge Hash Authentication Protocol and basically means
that you send the client a challenge which he adds to his password, then
hashes it and sends it back to you. You only allow one try per challenge
and you make it available only to that session.

Of course, if you never stored their password in the first place then
you'd have to add the challenge to the hash of their password on the
client side instead of adding the challenge to the password itself.

Something like this

on the client: hash(challenge+hash(password))
on the server: hash(challenge+stored_hash)
where stored_hash = hash(password)

Then you just check if the results match. If they do the client knows
the password.

Now, the real crypto guys are going to scream at me 'cause there are
some important things that have to go into this for it to be really
secure. Make sure your challenge is random enough and long enough to not
be very likely repeated.

I've never actually implemented this BTW.

SSL is, of course, a better way (though not perfect either).

--
Andrew Jorgensen


____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to