Two way encryption with PHP - some libraries for doing this?

This is a discussion on Two way encryption with PHP - some libraries for doing this? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi All, Up until now I have been storing passwords in the database as an sha1 hash. I like doing ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-24-2004
Joshua Beall
 
Posts: n/a
Default Two way encryption with PHP - some libraries for doing this?

Hi All,

Up until now I have been storing passwords in the database as an sha1 hash.
I like doing it this way, but a problem arises with people who forget their
passwords - I cannot retrieve it for them.

The simplest option would be cleartext passwords. Easy enough. But what I
would prefer to do is some sort of two-way encryption, so I can encrypt the
passwords, store them in the database, and then get them back. Are there
any PHP libraries out there that can do this? I have thought about rolling
my own, but do not want to duplicate somebody else's effort.

A cursory look for this sort of thing returned only one-way (hashing)
encryption techniques. This leaves me back where I was, having to reset
users passwords, rather than emailing it back to them.

I am not running a banking application here, so I am not too paranoid about
security. But, it would be nice to have some reasonable level of encryption
that is harder than rot13 to break.

Thoughts?

-Josh


Reply With Quote
  #2 (permalink)  
Old 04-25-2004
Cameron
 
Posts: n/a
Default Re: Two way encryption with PHP - some libraries for doing this?

http://us2.php.net/manual/en/ref.mcrypt.php


"Joshua Beall" <jbeall@donotspam.remove.me.heraldic.us> wrote in message news:<_tAic.65561$L31.5100@nwrddc01.gnilink.net>.. .
> Hi All,
>
> Up until now I have been storing passwords in the database as an sha1 hash.
> I like doing it this way, but a problem arises with people who forget their
> passwords - I cannot retrieve it for them.
>
> The simplest option would be cleartext passwords. Easy enough. But what I
> would prefer to do is some sort of two-way encryption, so I can encrypt the
> passwords, store them in the database, and then get them back. Are there
> any PHP libraries out there that can do this? I have thought about rolling
> my own, but do not want to duplicate somebody else's effort.
>
> A cursory look for this sort of thing returned only one-way (hashing)
> encryption techniques. This leaves me back where I was, having to reset
> users passwords, rather than emailing it back to them.
>
> I am not running a banking application here, so I am not too paranoid about
> security. But, it would be nice to have some reasonable level of encryption
> that is harder than rot13 to break.
>
> Thoughts?
>
> -Josh

Reply With Quote
  #3 (permalink)  
Old 04-26-2004
Lucas
 
Posts: n/a
Default Re: Two way encryption with PHP - some libraries for doing this?

Hi Joshua,

two possible solutions:

1) have people remember their passwords or they will have to live with
new ones.
2) or start up a bank. :)


P.S. You may wanna store passwords in plaintext since you are not
running a bank. If the database gets compromised the attacker will
very likely not be interested in your passwords (since s/he already
posesses system wide access)

Best Regards,

Lucas


"Joshua Beall" <jbeall@donotspam.remove.me.heraldic.us> wrote in message news:<_tAic.65561$L31.5100@nwrddc01.gnilink.net>.. .
> Hi All,
>
> Up until now I have been storing passwords in the database as an sha1 hash.
> I like doing it this way, but a problem arises with people who forget their
> passwords - I cannot retrieve it for them.
>
> The simplest option would be cleartext passwords. Easy enough. But what I
> would prefer to do is some sort of two-way encryption, so I can encrypt the
> passwords, store them in the database, and then get them back. Are there
> any PHP libraries out there that can do this? I have thought about rolling
> my own, but do not want to duplicate somebody else's effort.
>
> A cursory look for this sort of thing returned only one-way (hashing)
> encryption techniques. This leaves me back where I was, having to reset
> users passwords, rather than emailing it back to them.
>
> I am not running a banking application here, so I am not too paranoid about
> security. But, it would be nice to have some reasonable level of encryption
> that is harder than rot13 to break.
>
> Thoughts?
>
> -Josh

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:48 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0