Questions tagged [bcrypt]
BCrypt is an adaptive cryptographic hash function for passwords. It incorporate a salt to protect against rainbow table attacks and is also an adaptive hash - over time it can be made slower and slower so it remains resistant to specific brute-force search attacks against the hash and the salt.
220
questions
667
votes
4
answers
330k
views
Do any security experts recommend bcrypt for password storage?
On the surface bcrypt, an 11 year old security algorithm designed for hashing passwords by Niels Provos and David Mazieres, which is based on the initialization function used in the NIST approved ...
548
votes
11
answers
94k
views
Is my developer's home-brew password security right or wrong, and why?
A developer, let's call him 'Dave', insists on using home-brew scripts for password security. See Dave's proposal below.
His team spent months adopting an industry standard protocol using Bcrypt. ...
132
votes
3
answers
150k
views
Recommended # of rounds for bcrypt
What is nowadays (July 2012) the recommended number of bcrypt rounds for hashing a password for an average website (storing only name, emailaddress and home address, but no creditcard or medical ...
120
votes
3
answers
75k
views
Does bcrypt have a maximum password length?
I was messing around with bcrypt today and noticed something:
hashpw('testtdsdddddddddddddddddddddddddddddddddddddddddddddddsddddddddddddddddd', salt)
Output: '$2a$15$jQYbLa5m0PIo7eZ6MGCzr....
108
votes
1
answer
54k
views
In 2018, what is the recommended hash to store passwords: bcrypt, scrypt, Argon2?
There are many questions about picking a hash function, including How to securely hash passwords? or Are there more modern password hashing methods than bcrypt and scrypt?, with very detailed answers, ...
102
votes
5
answers
102k
views
What is the specific reason to prefer bcrypt or PBKDF2 over SHA256-crypt in password hashes?
We know that to slow down password cracking in case a password database leak, passwords should be saved only in a hashed format. And not only that, but hashed with a strong and slow function with a ...
85
votes
10
answers
10k
views
Why improvising your own Hash function out of existing hash functions is so bad
I'm afraid I'll have tomatoes thrown at me for asking this old question, but here goes.
After reading that cooking up your own password hash out of existing hashing functions is dangerous over and ...
62
votes
4
answers
12k
views
Is Bcrypt a hashing algorithm or is my study material wrong?
I'm currently studying for my Comptia Security+ exam and on a practice test online I got this question:
Or, represented as text:
▶ Which of the following are hashing algorithms? (Select all that ...
61
votes
3
answers
55k
views
Is bcrypt better than scrypt [duplicate]
Possible Duplicate:
Do any security experts recommend bcrypt for password storage?
I'm no security expert and do not pretend to be that's why I'm asking here. I write many PHP based applications ...
56
votes
5
answers
9k
views
Is using bcrypt on existing SHA1 hashes good enough when switching password implementation?
I'm working on improving a CMS where the current implementation of storing password is just sha1(password). I explained to my boss that doing it that way is incredibly insecure, and told him that we ...
53
votes
3
answers
19k
views
Which is the best password hashing algorithm in .NET Core?
What are the considerations when picking the best password hashing algorithm in .NET Core?
I read that not all hashing algorithms are compliant / unverified, so I am a hesitant on just getting ...
47
votes
2
answers
10k
views
Are there more modern password hashing methods than bcrypt and scrypt?
This question made me start thinking about password hashing again. I currently use bcrypt (specifically py-bcrypt). I've heard a lot about PBKDF2, and scrypt.
What I'm wondering is if there are any "...
45
votes
3
answers
10k
views
Is bcrypt(strtolower(hex(md5(pass)))) ok for storing passwords? [duplicate]
I have a large database where passwords are stored as strtolower(hex(md5(pass))) (which is a bad way to store passwords, prone to rainbow tables, cheap to dictionary attack, no salt, etc.),
and I'm ...
44
votes
1
answer
18k
views
How to apply a pepper correctly to bcrypt?
Update: There is a better way to add a server side key, than using it as a pepper. With a pepper an attacker must gain additional privileges on the server to get the key. The same advantage we get by ...
38
votes
8
answers
16k
views
Client side password hashing
Edit: Updated to put more emphasis on the goal - peace of mind for the user, and not beefing up the security.
After reading through a few discussions here about client side hashing of passwords, I'm ...
38
votes
7
answers
8k
views
Does replacing a bcrypt hash with an invalid hash result in no possible working password?
I have a manager who likes to "deactivate" accounts by replacing the existing bcrypt hash in the database with a simple dash (-).
This seems to work as the old password is no longer valid and there ...
36
votes
2
answers
25k
views
Is it possible to get hacked if my bcrypt hash is publically known?
I just checked https://haveibeenpwned.com/ and I have noticed that I was pwned, therefore I checked the file that hosts the details of my "credentials", however, I see my email in plain text but the ...
34
votes
5
answers
5k
views
Is it possible to increase the cost of BCrypt or PBKDF2 when its already calculated and without the original password?
I just wanted to know if you can increase the cost (iterations) of those two algorithms off-line.
I want to increase the cost every year of my users passwords.
One solution is to recalculate them when ...
32
votes
2
answers
10k
views
What maximum password length to choose when using bcrypt?
When I generated password for GitHub with KeePass I got a message on GitHub site that said the limit for password length is 72 characters. It seemed weird it not being a power of 2 so I googled a bit ...
32
votes
2
answers
4k
views
Can client-side hashing reduce the denial-of-service risk with slow hashes?
When storing user's passwords that you need to verify against (but not use as plaintext) the current state of the art is:
Hash the password
Use a salt
Use a slow hash function - bcrypt, scrypt, etc.
...
30
votes
2
answers
12k
views
Insecure versions of crypt hashes
I read at crackstation not to use these variants of bcrypt* ($1$, $2$, $2a$, $2x$, $3$),but I've used bcrypt ($2a$) in various sensitive implementations recently.
Can any security expert clarify why ...
29
votes
3
answers
19k
views
Is a HMAC-ed password is more secure than a bcrypt-ed or scrypt-ed password?
Given an option , which one should I choose , a HMAC for storing a password securely or a bcrypt or scrypt library?
28
votes
4
answers
7k
views
How secure is this hash-based personal password scheme? [duplicate]
I use a password scheme where I keep a small number of easy to remember personal passwords. Instead of using the passwords directly for each service, I run them through a hashing algorithm first, as a ...
28
votes
1
answer
19k
views
bcrypt no need to store salt?
I'm confused with bcrypt, I would think I would need to store my salt, and then compare my plain text password + salt to the hashed password, however from documentation it does not look like storing ...
25
votes
3
answers
40k
views
How is storing an API secret key in plaintext (in a database) secure?
The answers to this question Is it okay for API secret to be stored in plain text or decrypt-able? are somewhat unsettling to me. I'm trying to wrap my mind around how storing a secret key in ...
24
votes
6
answers
5k
views
Does Rehashing a weak hash with a strong algorithm make it strong?
Imagine the following situation. We're making a web application which should be really safe
Now the accounts/users are not directly added by us but they receive a letter with a logincode. We get a ...
23
votes
3
answers
3k
views
Should you care about DoS attacks if your server is using bcrypt?
(I just asked this question on "cryptography SE" and was suggested to ask it here instead)
EDIT I just realized my question is mostly a dupe of: Prevent denial of service attacks against slow hashing ...
22
votes
2
answers
8k
views
How secure is BCRYPT(SHA1(Password)) [duplicate]
This question is a fork from a previous question here:
Is it safe/wise to store a salt in the same field as the hashed password?
Assume you run a web portal, and store passwords in SHA1 hashes. How ...
19
votes
5
answers
57k
views
How to do client side hashing of password using BCrypt? [duplicate]
I am migrating an old application which used MD5 hashing to Spring Security with BCrypt encoding of passwords. I want to encode the password on new user creation page, change password page and on ...
16
votes
4
answers
7k
views
How can I make sure password hashing is secure on computers while not being prohibitively slow on mobile devices?
I'm new to cryptography and its implementations. I'm designing an Android app where an user enters a password to retrieve some encrypted data. After some research on possible solutions I ended up with ...
15
votes
1
answer
5k
views
Is it a good practice to add hard-coded salt to BCrypt passwords?
I am currently learning about cybersecurity and trying to implement it in my next web application.
I have been reading some articles about hashing, specifically SHA2 and Blowfish.
In this article, it ...
14
votes
2
answers
8k
views
Why should I choose SHA (such as SHa-512), instead of bcrypt or PBKDF2, for FIPS-compliance?
Due to regulation, my company needs to be FIPS-compliant.
I was looking at the current list of FIPS-approved cryptographical methods and I notice that neither bcrypt or PBKDF2 are in this list.
Does ...
14
votes
4
answers
7k
views
Challenging challenge: client-side password hashing and server-side password verification
We have a website where users need to log in to access privileged information. Obviously we are using SSL, but I also want to avoid plaintext passwords from accidently ending up in server logs, or ...
14
votes
2
answers
13k
views
Mathematically, how long would it take to crack a bcrypt password hash?
So I'm currently using bcrypt to hash passwords with a randomly generated salt (as seen in the pip bcrypt module), with 12 rounds.
I have been looking around, but I cannot find a detailed and clear ...
13
votes
2
answers
7k
views
Does bcrypt compare the hashes in "length-constant" time?
I saw this function slowEquals() while reading Salted Password Hashing - Doing it Right, which uses a byte-level xor comparison to avoid timing attacks. I was wondering whether this is what Bcrypt ...
13
votes
2
answers
2k
views
Why is the BCrypt text "OrpheanBeholderScryDoubt"
I'm looking for a reference about the weird initial BCrypt text "OrpheanBeholderScryDoubt"
Why was this string used?
Would using 192 zeros or ones not have worked well in practice for some reason?
...
13
votes
3
answers
3k
views
BCrypt's 72-character limit and using it as a general digest algorithm
Goal: have token/cookie-based authentication that doesn't require keeping sessions on the server
TL;DR: What, if any, is the accepted mechanism to work around the 72-character limitation of BCrypt?
...
12
votes
4
answers
5k
views
What are the pros and cons of using sha256 to hash a password before passing it to bcrypt?
I recently became aware of the fact that bcrypt truncates passwords to 72 characters. Practically speaking my intuition is that this does not pose any major security problems. However, I understand ...
11
votes
4
answers
5k
views
Does the strength of password matter in bcrypt?
Even if I choose 1 character for my password or 32 characters with numbers, letters, uppercase symbols etc. the bcrypted password will still be 60 characters length password. So does the password ...
11
votes
2
answers
10k
views
safe to use jBCrypt and recommend it to my organization?
I'd like to recommend to my fellow developers that we all use bcrypt to hash stored passwords. We all use java and I hesitate to recommend jBCrypt only because its latest version number (0.3) ...
11
votes
4
answers
3k
views
Is it good practice to SHA512 passwords prior to passing them to bcrypt?
I want to allow any-sized passwords to be allowed to be submitted. I currently use bcrypt as a key derivation function for passwords, however I have realized that it has a maximum input length of 72.
...
11
votes
2
answers
6k
views
“Official statement” on php.net : CRYPT_BLOWFISH is strongest hash algorithm. Why?
First: I asked this question on stackoverflow and was kindly asked to post this here again. See the original question here.
According to the [early] doc pages of the new PHP 5.5 password hashing/...
11
votes
1
answer
1k
views
Would it make sense to use Bcrypt and PBKDF2 together?
I've read various opinions about whether Bcrypt or PDBKF2 is a better key derivation hashing method. The answer seems to depend on a lot of complicated factors that are not easy to analyze. Would ...
11
votes
3
answers
2k
views
How should I choose a difficulty factor for my password hashing function?
Assuming that I'm doing password hashing properly and using bcrypt, scrypt or PBKDF2, how should I go about choosing an appropriate difficulty factor? i.e rounds for bcrypt, iterations for PBKDF2 and ...
10
votes
3
answers
12k
views
Does NIST really recommend PBKDF2 for password hashing?
We hesitated between BCrypt and PBKDF2 for password hashing. In many forums and blogs people say something like "In their Special Publication SP 800-132 NIST basically recommends using PBKDF2 for ...
10
votes
2
answers
706
views
How were weak passwords brute forced in github?
Github faced a brute force password-guessing attack recently that involved "nearly 40K unique IP addresses".
Passwords were also "stored properly" using bcrypt, (salt + hashed).
Given that bcrypt ...
9
votes
3
answers
8k
views
Client-side BCrypt, store salt and hash separately in MySQL database [duplicate]
I’m developing an Android app with a MySQL database for storing user login credentials. I’m using jBCrypt for hashing passwords before storing them in the database. On registration, the password is ...
9
votes
6
answers
2k
views
Should I hash a password if it is randomly generated
The best practice is we should hash a user password using algorithms such as bcrpyt to protect the user, however, given the following conditions, is hashing in the backend still matters?
the password ...
9
votes
3
answers
2k
views
Hashing Password on Client Side to avoid lag on single-core game server? [duplicate]
I am currently implementing a simple login system. I would like to securely store all the user passwords in my database. The passwords are the most important components. All the other user data is not ...
9
votes
3
answers
9k
views
bcrypt: random salt vs computed salt
I'm pretty new to the whole password hashing business, so I might be missing something obvious.
I was looking at the bcrypt algorithm, in particular BCrypt.Net, and I was wondering if it wouldn't be ...