This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson, pvo
Date 2010-05-02.21:47:00
SpamBayes Score 0.00028154624
Marked as misclassified No
Message-id <1272836822.24.0.701214883365.issue8596@psf.upfronthosting.co.za>
In-reply-to
Content
> FreeBSD's crypt(3) doesn't explain the 'salt' for Blowfish crypt exactly.

Reading:

http://www.freebsd.org/cgi/man.cgi?query=crypt&apropos=0&sektion=3&manpath=FreeBSD+7.2-RELEASE&format=html

and especially the section entitled "Modular crypt", it looks like your salt should take the form "$2$salt$ignored", where there are at most 8 characters of salt and the 'ignored' bit is ignored.

So your $2a$ looks wrong to me:  shouldn't it be $2$?  And after that, in the examples that you give, the only used portion of the salt is "05", which is the same in all the examples, so I'd expect to get the same output in each case.

I can't see any way that Python could be contributing to this:  if you look at the implementation (in Modules/cryptmodule.c), you'll see that the crypt function (called crypt_crypt in the source) really is a trivial wrapper around the system function;  there's no pre- or post-processing of arguments.

Can you attach the C code that's giving the different results?
History
Date User Action Args
2010-05-02 21:47:02mark.dickinsonsetrecipients: + mark.dickinson, pvo
2010-05-02 21:47:02mark.dickinsonsetmessageid: <1272836822.24.0.701214883365.issue8596@psf.upfronthosting.co.za>
2010-05-02 21:47:01mark.dickinsonlinkissue8596 messages
2010-05-02 21:47:00mark.dickinsoncreate