Mark Dickinson <dicki...@gmail.com> added the comment:

> 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?

----------
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8596>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to