Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

bcrypt is an intentionally slow hash algorithm specially designed for passwords.

0
votes
1answer
35 views

Hashing user password without database to store salt

I am building an Android app that will run purely locally on the user's device, no servers. It has a database that I want to encrypt with the user's password, which requires a 64 byte key. I've ...
0
votes
1answer
34 views

Why does PHP crypt give this unexpected result [closed]

So I have this PHP code,it is meant to encrypt a users password... Three problems/questions: My 'salt' CHANGES ITS NAME I get the same result Is this actually how the result is meant to be? PHP CODE ...
0
votes
1answer
32 views

Set/change password functionality on password: should I apply bcrypt server- or client-side?

I am writing a webpage on which a user can set (when registering) and change his/her password. This page is only served over HTTPS. When the user is altering his/her password, he/she is already ...
3
votes
1answer
192 views

If and why is it bad to scrypt a bcrypted password?

This has been already brought up on security SE, but very sadly, this particular interesting issue got watered down in a far broader question. If and why is it bad to use the following hashing ...
0
votes
1answer
237 views

What is best practise for salting and multiple-hashing of passwords?

I have been presented with some custom PHP code for salting passwords and applying multiple rounds of hashing. It looks reasonable, but I fear home-grown crypto. Is there an existing password ...
1
vote
1answer
110 views

Practical BCrypt plus XOR encryption for small messages

This is a practical solution available and potentially useful to everyone, so please give some leeway not banning this question. Details are at the end, but here is the question: How secure is the ...
2
votes
1answer
85 views

Unable to implement Client and Server Side Hashing (Validation problem)

I'm trying to implement hashing on both client and server Sides for my web/mobile Application. On the client side, I implemented the slow hashing algorithm (bcrypt) On the server side, I tried to use ...
3
votes
2answers
2k views

Looking at hash output – is Base64 encoding in any way better than HEX encoding?

I was wondering why most "normal/unsafe" crypto hashes like SHA-256, SHA-512, Whirlpool, RipeMD-160, MD5, etc. are HEX encoded. But most "secure" crypto hashes (KDF' ) like ...
3
votes
1answer
431 views

Can pbkdf2 be used with a fixed salt to give a deterministic slow hash?

I need a password hashing function that is deterministic. Correlation attacks are not a concern. The same password must produce the same hash. I just want to protect the password against dictionary ...
1
vote
2answers
177 views

Can multiple hashing weaken the password?

Problem. I want a longer key out of password than my hashing function provide. Idea. I want to hash password multiple times rotating chars one position each time and use composite key. Question. ...
3
votes
2answers
277 views

XOR Encryption with bcrypt password de-biasing

Objective: To have a very simple to verify, but very secure small message encryption. Idea: Message ⊕ bcrypt( Password). We remove password biases with bcrypt ...
0
votes
1answer
94 views

Are there any known values for common hashes known to have no preimage

In a system which requires a user to have a password, as a quick workaround I wrote random junk as the bcrypt hash so that no one will be able to login to that user. However theoretically there ...
3
votes
1answer
2k views

Benchmark differences between SHA-512 and bcrypt

So I recently made a benchmark SHA-512 vs bcrypt with hashcat CUDA. Here are the results : ...
1
vote
1answer
301 views

Question about hashing passwords with PBKDF2

I am new here and new to encrypting and securing passwords, so please forgive me if this question is not posted to the right location or if my question is bad. I have been working on a web app in ...
2
votes
1answer
134 views

Relation between encryption algorithms and (password) hash functions

This is a really basic question. Blowfish is not seen as a secure cipher. but bcrypt is one of the most secure hash functions. So first: How can a hash function be based on an encryption algorithm, ...
11
votes
1answer
1k views

Encrypting bcrypt hashes

I've been asked by a client to give some advice on hashing and as it isn't my area I'm looking for someone who knows what they are talking about. The client is hashing 4-6 digit PINs (mostly 4 digit) ...
8
votes
2answers
347 views

What impact could general quantum computing have on BCrypt?

While discussing the 72 character limit of BCrypt, the question of resilience to quantum cryptanalysis came up. A search online didn't give me much of a lead as to what research has been done in this ...
30
votes
3answers
4k views

Dropbox Password security

Dropbox have recently published How Dropbox securely stores your passwords Is this really more secure than using bcrypt with a complexity of 11 or 12 ? The password "chain" is secure as its weakest ...
9
votes
4answers
2k views

Why bcrypt is one-way while Blowfish is reversible?

While bcrypt is often regarded as an irreversible hashing function, it's based on the reversible Blowfish cipher. I'm just curious about how does this work. Here's ...
3
votes
1answer
393 views

anything obviously wrong with my custom password hash scheme?

i sha2-256 hash the password, then i base64 encode the hash (per RFC 2045) , resulting in a 44 bytes string looking like LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=...
2
votes
2answers
795 views

Using bcrypt for MAC - is it correct and secure?

Suppose there is a hashing function: $$ph = bcrypt(sha256(m + k), salt)$$ Here $ph$ is a password hash obtaining by applying $bcrypt$ on $sha256$ result of concatenating a message $m$ with a secret ...
9
votes
1answer
927 views

Does a big salt have the same memory effects as Bcrypt?

Citing Thomas Pornin on the question Why can't one implement bcrypt in Cuda?: bcrypt is a variant of the Blowfish key scheduling, which is defined over a table (a few kilobytes) which is constantly ...
2
votes
0answers
29 views

Some questions about the internals of bcrypt [duplicate]

I'm attempting to get a better understanding of cryptography and have run into some questions about bcrypt. Bcrypt relies on the blowfish cipher, which is a reversible method of encryption. But ...
10
votes
3answers
900 views

The internals of bcrypt

I'm attempting to get a better understanding of cryptography and have run into some questions about bcrypt. Bcrypt relies on the blowfish cipher, which is a reversible method of encryption. But ...
4
votes
1answer
373 views

Why does 0x00 make bcrypt weaker?

On the following site: https://paragonie.com/blog/2015/04/secure-authentication-php-with-long-term-persistence when talking about the dangers of using bcrypt it states: There is a nontrivial ...
4
votes
2answers
708 views

Long passwords and Bcrypt

I need to store passwords for a web application, and was looking at Bcrypt for a possible solution. After some research, it appears only the first 72 bytes influence the final hash output. While it is ...
1
vote
1answer
424 views

bcrypt collision probabilities assuming same password and work factor?

What is the likelihood of 2 bcrypt hashes colliding if they use the same work-factor and input? Are bcrypt's salts large enough to prevent this from happening?
31
votes
1answer
17k views

Password hashing security of argon2 versus bcrypt/PBKDF2?

I wonder if it can be approximated how much of a security margin the new argon2 hash, winner of the password hashing competition, can give over bcrypt or PBKDF2, for an attacker using large GPU ...
1
vote
1answer
104 views

Encrypt hash using hash of hash?

I wonder what is wrong with this scheme for authentication. Server sends random challenge, C Client returns (C, B(P)) encrypted in H(B(P)) where B(P) is high work factor salted hash of the user ...
2
votes
1answer
928 views

Bcrypt input length vs collisions

I am currently implementing oauth2 bearer token authentication and am storing the tokens bcrypt encrypted. My question is how long should the tokens be to achieve maximum security. E.g. at what length ...
3
votes
2answers
123 views

Public SRP verifiers or public hash chain “public keys” when secret is low entropy password

I want to set up the following: An untrusted server should host user sessions and authenticate users without knowing their passwords or being capable of creating a fake user session in the user's ...
1
vote
1answer
4k views

Advantages/Disadvantages of Bcrypt vs. hash/salt

I have an application that I use sha3-512 to hash my password with a randomly generated 64 characters salt for each password. Is it bad to use this method to store passwords? I know many people ...
2
votes
2answers
517 views

How do I verify a reset token if the token is hashed in DB?

I've been searching around the web for best practice how-to on secure password reset system (email with reset url), and the idea to hash the token in the database, which I did not implement at first, ...
14
votes
3answers
2k views

Is there a way to use bcrypt with passwords longer than 72 bytes securely?

From my understanding BCrypt truncates the password to 72 bytes. If a password is longer than 72 bytes, what is a way to store that password using bcrypt securely without compromising it? Or is this ...
0
votes
1answer
93 views

Using hashed password as shared secrets. Good or bad idea?

I built a system that allowed users to generate an unlimited number of email addresses. Instead of storing each one in a db, I created addresses dynamically and made the address an hmac signed ...
2
votes
1answer
514 views

Key derivation for AES-Encryption key and HMAC

Okay so I have two options for how I would derive two keys for AES encryption and HMAC they are as follows: Run BCrypt on a users passphrase and then use the bouncy castle implementation of HKDF in ...
3
votes
2answers
924 views

Using bcrypt derived keys for encryption?

Sorry for this ignorant question but I am currently weighing up the advantages and disadvantages of BCrypt over PBKDF2 and from what I have read BCrypt is considered more secure but from what I have ...
5
votes
1answer
417 views

Why don't we use bcrypt and scrypt together?

Everyone is comparing bcrypt to scrypt. Bcrypt is proven, lots of cryptoanalysis and no vulnerabilities so far, but uses very low memory. While scrypt uses a lot of memory, but it's too early in its ...
2
votes
1answer
466 views

Strange Password Hashing

I know about PBKDF2, bcrypt, scrypt, etc. and while I'm not a crypt professional, I think I understand why are they better than just "hash(pass+salt)". But a colleague of mine surprised me with the ...
1
vote
0answers
97 views

Looking for alternative key stretching

I am by no means a security expert, but I am curious whether functions that don't produce different outputs when raised to the power of N (without any psuedo-randomness) exist, that are as strong as "...
1
vote
2answers
509 views

scrypt and bcrypt for benefits of both?

I've been reading about bcrypt and scrypt, and it seems that the general consensus is that bcrypt is more "tried and true", but scrypt is better in theory. Couldn't you just hash something with ...
4
votes
2answers
598 views

bcrypt and pbkdf2 double hashing

If I want to protect myself from implementation of algorithm issues and inherent design flaws of algorithms in password hashing, what would be most secure way to combine two hashes? bcrypt(pbkdf2(pw))...
1
vote
1answer
401 views

What's wrong with my security model - or how can it be attacked?

I'm working on a little personal project where security is very important, and I've thought for a while about the best way to do this. Now I am looking for a little outside help on good practices. The ...
1
vote
2answers
751 views

How terribly flawed is this design for key storage?

Dave here, with a plan for storing secrets. Threat model: Database and keyfile may (will?) be stored on un-trusted servers. Database contains many valuable secrets (passwords), encrypted by key ...
3
votes
1answer
168 views

ASN.1 OID of bcrypt

What is the ASN.1 OID associated to bcrypt (the key derivation scheme)? For instance, PBKDF2 has 1.2.840.113549.1.5.12 and it is therefore possible to store a ...
1
vote
3answers
1k views

How can I accomplish Key Derivation in JavaScript? [closed]

I need to take a potentially weak user password and derive a strong key for AES encryption in JavaScript. How can I do this? I expect the hardest problem is generating a good random salt - perhaps an ...
2
votes
3answers
1k views

Questions about BCrypt and PBKDF2

I would ask you some questions about users' password storage in a login system. What algorithm do you suggest me to use? bcrypt or PBKDF2? I was looking for a way to implement them client-side and i ...
4
votes
1answer
335 views

Securely generating passwords based on a secret and a public identifier

I'm trying to create a good scheme for generating passwords in my systems management scripts. What I'd like to do is have a secret key (let's say hello123), which I ...
0
votes
1answer
203 views

Trying to finalize my understanding about password storing

am sorry, an a beginner, so please forgive me if i make mistakes, so here is what I understood: PBKDF2: uses HMAC, so, the message is the password, and the key that crypts the message is the salt? or ...
2
votes
1answer
3k views

Bcrypt VS Scrypt, Again?

I found this article on SO, but the answer was short, and the subject was closed, What i don't understand, is: Which one of the two limits memory usage to avoid custom Hardware to break the password? ...