At the moment I’m trying to build a log in system with a very high security.
So I want to use bcrypt and I’ve also found a 3rd party library,
py-bcrypt.
But the author said it is a pure python implementation.
Now I read somewhere that it is not recommended to use bcrypt in python only because it is too slow and this results in a security leak. bcrypt should be implemented in C.
Can anyone confirm this? Now what should I do?
Should I use:
- bcrypt (python)
- SHA512 (from hashlib)
- something different
I’m using Google App Engine
EDIT:
http://packages.python.org/passlib/lib/passlib.hash.bcrypt.html#bcrypt-backends
It should be noted that the pure-python implementation (#4) is too
slow to be useable, given the number of rounds currently required for
security. Because of this, it is disabled by default, unless the
environment variable PASSLIB_BUILTIN_BCRYPT=”enabled” is set.
How about comparing the two? Here is code to hash a password of 8000 random bits and corresponding times:
Hashlib:
Hashlib including salt:
bcrypt:
Timing bcrypt:
Timing hashlib: