Hi to all! I’m writing a python module (python+sqlalchemy) to manage user and domain configuration on my system (I hope to get a CLI tool, a Web app and even a native Mac app, via PyObjc, from my lib). I’m implementing password crypto, but I have some problem in generating CRAM-MD5 password, dovecot style. I’ve found an old discussion on this mailing list and a piece of Perl that works, but I need to implement it in Python; I’ve even read code (hmac-md5.c), but before start hard coding (hard from my POV at least, since I’ve never worked with crypto algorithms in a deep way), is there anyone that have had solved the problem or has any idea on how to approach it?
TIA Andre
On 12/16/2009 05:11 PM Andre wrote:
Hi to all! … I’m implementing password crypto, but I have some problem in generating CRAM-MD5 password, dovecot style. … is there anyone that have had solved the problem or has any idea on how to approach it?
CRAM-MD5 requires a lot of code. ;) It was to hard to me for the moment, so I'm using subprocess.Popen. If this may be a solution for you, have a look at: http://hg.localdomain.org/vmm/file/160/VirtualMailManager/VirtualMailManager...
Regards, Pascal
The trapper recommends today: decade.0935018@localdomain.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, Dec 16, 2009 at 06:12:48PM +0100, Pascal Volk wrote:
On 12/16/2009 05:11 PM Andre wrote:
Hi to all! … I’m implementing password crypto, but I have some problem in generating CRAM-MD5 password, dovecot style. … is there anyone that have had solved the problem or has any idea on how to approach it?
CRAM-MD5 requires a lot of code. ;) It was to hard to me for the moment, so I'm using subprocess.Popen. If this may be a solution for you, have a look at: http://hg.localdomain.org/vmm/file/160/VirtualMailManager/VirtualMailManager...
What's missing from hmac and hashlib? Why wouldn't e.g. [1] work?
[1] http://susampal.blogspot.com/2009/02/auth-cram-md5.html
Regards
- -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFLKSSXBcgs9XrR2kYRAsX+AJ4+hplibewYv8qzyhAHHy8oDbYqGgCfW4Zn p3TPmeXx/YNz5o8BvBkm3eU= =M5YF -----END PGP SIGNATURE-----
On 12/16/2009 07:19 PM tomas@tuxteam.de wrote:
What's missing from hmac and hashlib? Why wouldn't e.g. [1] work?
Because it's used for authentication, nor for generating a hashed password for the auth database. You are welcome to provide a few lines of Python code:
if your_func(1) == 'ec00b524a75a96f0d66ee664a828f0ea28563e1aa10f9e2d5289c17328b89918': print "bingo ;-)"
Regards, Pascal
The trapper recommends today: fabaceae.0935019@localdomain.org
participants (3)
-
Andre
-
Pascal Volk
-
tomas@tuxteam.de