question to coders: how to store passwords

randac56

Member
May 25, 2018
915
0
16
I'm wondering if anyone has any stradegy for storing passwords when they have to be send out....I'm familar with methods of salting them and hashing them when you are RECIEVING them from a user (like for a database of some kind) but does anyone know a method for doing thing when you need to SEND them and they must be sent out correctly?


The reason i ask is, currently, we have to store passwords in plain text for the loginmgr and i'd really like to come up with something more secure...i've had a few ideas but none of them have panned out.


Remember, this biggest challenge here is that we need to be able to have the application SEND the passwords out as they actually exist (or logging in via the loginmgr fails)

If anyone has any ideas please post it here.
 

simur612

Member
May 25, 2018
879
0
16
There really is no secure way to do this. You could use something like mcrypt to encrypt the passwords with a shared key, but this is not useful as you would have to store the key on the user's system along with the encrypted data. The intention of this kind of protection is to send the password encrypted and have the receiver decrypt it with the key - obviously this is not possible in this case (not without proxying login requests via rutorrent.org or some other site anyway).

On most systems though application passwords are often stored in plain text since if someone gets physical access to the machine you are really in trouble anyway. I often set environment vars to store database login credentials for example since this means they are not stored in .php files, (this offers some protection from people managing to browse the source files), but it's still only a layer of obfuscation because they can readily access the enviroment vars if they get access to the machine itself. I think it's just something you will have to live with - the best way to help security is to (where possible) not send the passwords via an unencrypted protocol (such as regular HTTP) - send passwords via TLS/SSL instead if you are not already doing so.
 

peshua19

Member
May 25, 2018
897
0
16
You could also save the passwords to a file through rtorrent (over xmlrpc), if it is being stored with chmod 700 for the user only that user can read out his/her own passwords and rutorrent can read out the passwords through xmlrpc.