Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

(jptxs)Re: Securing Passwords

by jptxs (Curate)
on Apr 01, 2001 at 08:13 UTC ( [id://68783]=note: print w/replies, xml ) Need Help??


in reply to Securing Passwords

You could build a small java applet to do the MD5 work on the client side. It would be much faster than Javascript and also keep the code your business so it would be harder to figure out what you were up to even if the transmissions were intercepted...
"A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche

Replies are listed 'Best First'.
Re: Securing Passwords
by cLive ;-) (Prior) on Apr 02, 2001 at 05:14 UTC
    Here's how I deal with it:
    • password is stored crypted on server
    • user sends password which is crypted and checked
    • if ok, append REMOTE_ADDR environment variable, crypt this and send back as a cookie
    • for future requests, read crypted password from file, append REMOTE_ADDR, crypt this and compare with cookie sent

    This means that:

    • unencrypted password is entered only once
    • cookie only works from that IP address
    • if cookie is sniffed, it's not very useful
    Of course, if security is essential, you'd be using SSL with 128bit encryption, wouldn't you, making most of this conversation moot :)

    cLive ;-)

      two thoughts right off the top of my head: DHCP and mobile users. Basically, IP is not a reliable method of identification in any scheme. What you suggest means floating into keeping a state - which is covered very well by merlyn here, in a thread that's somewhat relevant to this too.
      "A man's maturity -- consists in having found again the seriousness one had as a child, at play." --Nietzsche
        The cookie should be set to be good only for that session of the browser. The result is that, even using DHCP, it will work just fine, since when the person disconnects and re-connects from elsewhere, they will have to re-login to the central server. Also, what about the idea of having the central server, which (once it checks the passwd), creates a cookie, does an MD5 hash of the cyphertext cookie, then RSA encrypts the hash with a public key. (then base64 encodes it all as one string and sets the cookie).

        After that, subsequent calls tear off the signature field, unencrypt it, then compare the result to their own MD5 hash of the rest of the cookie. Since IP and username, etc. are in the cookie, those items can also be tested, giving the same protection as the other methods.

        This method is only really usefull of course in a place with multiple servers, one central passwd server, etc. But it works. We use it.

        What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"
        Valid points, but for my task:

        DCHP - IP stays the same for that session doesn't it? That's all I need.

        Mobile users - the application I use it for is not designed to use mobile phones.

        AFAIK, AOL is our only problem (users' requests get sent through multiple proxy servers?!?! I'm not even sure about that issue even existing - I read it somewhere, but our clients don't use AOL, so again, not an issue), It's only used to check that this session is being run from the same IP that logged in.

        "IP is not a reliable method of identification in any scheme"

        I agree. What I mean is that the IP is not being used to identify the user, the password does that. I only use the IP to ensure that all future requests are made using a cookie that is useless if stolen and used by another user.

        But then, like I said, this is what I use. Different circumstances require different approaches. This was the best I could think of for my particular task :)

        later

        cLive ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://68783]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found