Hi,
I'm creating a webpage and would like to use the eggdrop userfile as the authentication database.
I'm using PHP and the mcrypt library (which supports blowfish) to check if a password is correct. To use it, I'd need to know what salt eggdrop uses. Anyone got an idea of how it's created, how does eggdrop verify passwords?
Thanks in advance.
<font size=-1>[ This Message was edited by: Matta on 2002-02-09 18:58 ]</font>
well I'm quite interested in this discussion. I'm wondering how I can get a php script output an encrypted password an eggdrop could "understand". I can't get how mcrypt can output that, can anybody help me on that point ?
nevermind, as I couldn't make that mcrypt stuff work, I did a C programm that take a password in argument and returned it encrypted the eggdrop way (blowfish), this solves the problems I had. It may solve yours too Matta.
I assume there is actually no key used by the encpass fonction. It seems to be a one way algorithm, you can encrypt a password but (happily !) can't decrypt a password. Why would you want to do that anyway ? If you want to check if a password is correct, just compare the encrypted version of it with the encrypted version in the user file.
Hey guys, in case anyone's interested.... I had written a Python SWIG module to do this a while back using an "eggpass.c" I stumbled across on the mailing list. For some reason, when I upgraded to Slackware 8.1, it stopped working correctly for me and was spitting out garbage (or nothing at all). In the process of trying to figure out why, I came across this thread and then decided to just look at mod/blowfish.mod/blowfish.c myself and try and port it. It didn't take loo long and appears to be working like a champ now with my SWIG module. Here's the URL:
i'm pleased find your .c, i was looking for it for a week now.. my prob wuz the same, have the mysql db with user passwds and have to encrypt what user typed in to match.. i also tried to modify blowfish.c, but still too dumb to get that work, so thanks, works perfectly, i just optimize it for my needs (only encryption ::))) so thanks again PoTa