Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8210755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:11:00+00:00 2026-06-07T10:11:00+00:00

At the moment I’m trying to build a log in system with a very

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T10:11:02+00:00Added an answer on June 7, 2026 at 10:11 am

    How about comparing the two? Here is code to hash a password of 8000 random bits and corresponding times:

    Hashlib:

    #!/usr/bin/env python
    import hashlib
    import random
    
    password = str(random.getrandbits(8000))
    print hashlib.sha512(password).hexdigest()
    

    Hashlib including salt:

    #!/usr/bin/env python
    import hashlib
    import random
    
    password = str(random.getrandbits(8000))
    salt = str(random.getrandbits(256))
    print hashlib.sha512(password + salt).hexdigest()
    

    bcrypt:

    #!/usr/bin/env python
    import bcrypt
    import random
    
    password = str(random.getrandbits(8000))
    print bcrypt.hashpw(password,bcrypt.gensalt())
    

    Timing bcrypt:

    $ time ./bcrypt_test.py 
    $2a$12$Om3a3zKsCNAM/SLB3hq5w.HYukFwn4CJ73rjXYNUPgqckUx2uLEmG
    
    real    0m0.401s
    user    0m0.313s
    sys 0m0.013s
    

    Timing hashlib:

    $ time ./hashlib_test.py 
    9e37eb4f164bbb1808833297d0244327e4faac109cd92729228f6e36d75d23044ac13a7a1907515cd6db44474b244678779e3ae4e97d8355c2069332aae52d61
    
    real    0m0.032s
    user    0m0.021s
    sys 0m0.010s
    $ 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At the moment I'm trying to figure out how use default and custom settings
At the moment I'm trying to use Python to detect when the left mouse
At moment I want to implement picture upload without using any plug-ins. My upload
At the moment I am trying to HTTP response request in my Sharepoint WarmUp
At the moment I am just trying to get jquery to show an alert
At the moment I use the following code to convert dynamic URLs to static
At the moment I am trying to declare a global object in c++ as
At the moment I use DATEPART(yy, MY_DATE) = DATEPART(yy, GETDATE()) to get Year-To-Date details
At this moment there is a very basic flash project that connects to a
I'm at the moment doing some very basic pattern matching with quotations. My code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.