PHP 2-way encryption: I need to store passwords that can be retrieved

Posted by gAMBOOKa on Stack Overflow See other posts from Stack Overflow or by gAMBOOKa
Published on 2011-02-23T10:48:00Z Indexed on 2011/02/25 23:25 UTC
Read the original article Hit count: 214

Filed under:
|
|
|

I am creating an application that will store passwords, which the user can retrieve and see. The passwords are for a hardware device, so checking against hashes are out of the question.

What I need to know is:

  1. How do I encrypt and decrypt a password in PHP?

  2. What is the safest algorithm to encrypt the passwords with?

  3. Where do I store the private key?

  4. Instead of storing the private key, is it a good idea to require users to enter the private key any time they need a password decrypted? (Users of this application can be trusted)

  5. In what ways can the password be stolen and decrypted? What do I need to be aware of?

© Stack Overflow or respective owner

Related posts about php

Related posts about security