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

Questions tagged [pbkdf2]

PBKDF2 is a key derivation and strengthening function, commonly used for password storage.

7
votes
2answers
1k views

What could an attacker do if they gained access to PBKDF2 hashes?

This is regarding a web application where a user has to login with their personal email as the ID, and a password they have chosen personally. If an attacker somehow gained access to a credential ...
0
votes
1answer
85 views

Implementation of PMKID computing function

I am trying to implement a function, let's say in Python to compute Pairwise Master Key Identifier (PMKID) after reading the previously discovered bug in WPA2. Googling gave me this logical statement: ...
1
vote
1answer
1k views

How to encrypt data in frontend/backend with a key that is not stored anywhere and is only known to owner?

I have read bunch of answers and tutorials on how client side cryptography is not a good idea because of many reasons listed mainly in Javascript Cryptography Considered Harmful article. Some facts ...
1
vote
0answers
65 views

Re-using the hash value of password to server by malicious actor

Let's say Alice logged into https://www.facebook.com with her email and password: Email: Alice@gmail.com Password: correctHorseShoeBattery Nonce given by ...
0
votes
1answer
109 views

Encrypt data using PBKDF2, but still provide password reset feature [duplicate]

In my application I would like to encrypt user data in such a way that I do not have access to it. To do this I will follow the following steps: Generate 256-bit key Encrypt data with key Derive ...
2
votes
1answer
120 views

Automatic choice of the hash function for key derivation

This is a theoretical question: does this make sense and is secure? My goal is to strengthen the passphrase. The flow is the following: I enter a pssphrase admin1234. This passphrase is going to be ...
0
votes
1answer
281 views

Conversion of user passwords from SHA-1 & encrypting plaintext data [duplicate]

I'm currently working on conversion of an old database format where user login passwords were stored as SHA-1 hashes. That same table also contains other user data that is stored in plaintext. My ...
-1
votes
2answers
3k views

How Facebook hashes passwords

I found this presentation how Facebook stores customer passwords and how they do authentication. This slide shows how they hash passwords: Is it a good idea to do such operations with a raw password?...
1
vote
2answers
144 views

Web Service Authentication Using PBKDF2 and a Public Salt - Does the salt need to change on every request?

I have implemented PBKDF2 authentication for some web services. The client is given the following information, so they can duplicate the PBKDF2 function: the hashing algorithm (SHA256) a secret ...
1
vote
0answers
1k views

Using PBKDF2 for hash and AES key generation implementation

I am writing a Java application that is required to locally authenticate a user with a password and then use the password to generate an AES-256 key for local file encryption/decryption. I understand ...
0
votes
1answer
232 views

Review on encrypted data storage algorithm

I'm building a small command line tool (mostly for fun) that is meant to store data (such as passwords or files) encrypted into a local database, with a user supplied password, pretty much the same ...
1
vote
2answers
127 views

Protecting Passwords Using Short Hash Length

Does anybody use deliberately short hash lengths for passwords to increase the chance of false positive collisions in the event of a brute force attack on the database? When trying to decide on a ...
1
vote
3answers
1k views

Why is there a Cap on Password length? [duplicate]

Why when we sign up on sites like Facebook and Gmail do our passwords have to be 8-12 characters in length, or some other cap? 8-12 spaces are finite, but you can make your passwords more "secure" by ...
-1
votes
1answer
97 views

Use Public/Private key pair for password authentication

Is it safe to generate a public/private key pair from a users password using PBKDF2, and send the public key to the server to store as the user's key? Then when the user logs in, it would again ...
0
votes
1answer
291 views

Is my authentication strategy secured?

I want to implement an authentication system by following good practices, i want it as simple as possible and secured (im not going to implement some magic hashing function or something to feel a hero....
0
votes
1answer
277 views

Is it insecure to use PBKDF2 on a SHA1 hashed password? [duplicate]

If you already have SHA1 hashed passwords and you're trying to migrate to a better password hashing algorithm, is it less secure to just use PBKDF2 to hash the SHA1 hashes you already have instead of ...
5
votes
2answers
693 views

Securing data on Android app using a 6 digit PIN

Lets say that on an Android app the user has to enter a 6-digit PIN on startup. Let's also say that we have some sensitive data in this application that we'd like to encrypt. The way I would to this ...
0
votes
1answer
95 views

With the recent denouncing of SHA-1 by Google, should SHA-1 based PBDKF2 now be avoided? [duplicate]

Google recently announced "the first practical technique for generating a collision" for SHA-1. I'm currently planning a password hashing implementation for a website, and historically we have used ...
1
vote
1answer
197 views

Cloud based private key storage for users

Say I want to create a cloud based private key storage for users, which they can use to sign documents. On the server side I would use a HSM to make the key storage more secure. One option is that ...
0
votes
0answers
117 views

How to tune a KDF algorithm to protect a private key?

I need to protect a private key RSA-4096 with a key derived by a KDF algorithm. Instead of hiding any aspect of the algorithm I would like to tune it such that the key derivation is a proof of work ...
3
votes
3answers
180 views

When brute-forcing a private-key stored as binary how do you know you found a solution?

Given the following scenario: the user has a password and a symmetric key is derived from it by PBKDF2 or bcrypt a private RSA key is protected by the above symmetric key the encrypted private key in ...
8
votes
1answer
354 views

LastPass's use of client-side Salt

The LastPass Team states the following in their FAQ: Do you use a salted hash for logging in? Yes, we first do a 'salt' of your LastPass password with your username on the client side (on ...
1
vote
1answer
186 views

can the iteration number of pbkdf2 be a security flaw? [closed]

I am now working on a project that involves saving two different pbkdf2 hashes on the server. i was wondering whether there is a mathematical connection between a 1000 iterations hash of a given ...
3
votes
2answers
176 views

Is a salt necessary for PBKD when the hash is used as an encryption key?

I'm generating a key from a password to encrypt data with AES256. Since the generated hash is not stored, would I need to use a salt? If I use a salt and it is made public, is my encrypted data any ...
3
votes
2answers
101 views

Is there a risk of using AEAD encryption algorithms when the key is generated from a password?

I need to encrypt something on a smartphone. The data is relatively small and would be stored encrypted on the phone. I was thinking AES-GCM with a key generated by a password (chosen by the app's ...
0
votes
2answers
142 views

Can I calculate the derived key generated by pbkdf2(password || SOME_TEXT) if I know pbkdf2(password)?

If I know the derived key DK1 DK1 = PBKDF2(sha512, password, random_salt, iterations = 1000, output length = 20) it is possible to calculate the derived key DK2 DK2 = PBKDF2(sha512, password || ...
3
votes
2answers
3k views

SHA256 instead of Rfc2898DeriveBytes [closed]

Is it enough to use this method with SHA256 or it is better to use Rfc2898DeriveBytes (which orginally uses SHA1)? public static byte[] ComputeHash(byte[] data, byte[] salt, int iterations) { ...
1
vote
1answer
206 views

Is this implementation of PBKDF2 correct?

I am preparing for a presentation and I just want to double check that I've got it right: PBKDF2 is: for (0,4096) { data1 = HMACSHA1(data1, data2); data2 = HMACSHA1(data2, data1); } ...
2
votes
2answers
320 views

Enterprise level password hashing

I need to create some hashing classes (C#) for a login service where (unfortunately) the passwords needs to be stored in SQL server database. In the past I've been using BCrypt or PBKDF2 but there are ...
1
vote
1answer
2k views

WPA/WPA2 Handshake — A question on the computation of the MIC

During the WPA/WPA2 4-way handshake, the first two steps are as follows. (1) The AP sends an ANonce to the client, (2) The client computes its own Nonce (SNonce), computes the Preshared Transient Key (...
0
votes
2answers
70 views

Who is author/designer/creator of PBKDF2 algorithm?

Just consisting list of credits/references who's algorithms I've used in my software and found that I couldn't identify who is real author of PBKDF2 Can anyone hint me?
-1
votes
3answers
476 views

Are GPG, PBKDF2 and SHA256 all AES?

As far as I understand what defines an AES is you use the same private key for encrypting and decrypting. Do all GPG, PBKDF2 and SHA256 lay under this category? PBKDF2 I know for a fact it is, but ...
3
votes
1answer
892 views

Differences between LUKS and Veracrypt

These two FDE solutions are similar, but I noticed different executions speed: specially mounting a device it seems that Veracrypt takes more time decrypting it. So I would like to compare it with ...
0
votes
2answers
167 views

Anonymisation better than just a hash

I'm trying to help anonymise users but still give them some controls. So this is different from say, anonymising a data set where you never need to go back to the original users. Let me give you an ...
1
vote
1answer
119 views

How secure is the UNIX sha_crypt as a password storage algorithm? [duplicate]

So I have been working on password storage, especially on the algorithms to use (and to not use). Most people are recommending scrypt or PBKDF2 for valuable reasons, but I have not seen any talks ...
8
votes
2answers
343 views

Is there any recommended approach for “upgrading” MD5 hashes to something secure? [duplicate]

I'm currently dealing with a couple of user accounts containing MD5 hashed passwords. These accounts got migrated from an old system into our current system which uses PBKDF2 for password hashing. I ...
6
votes
2answers
863 views

Is it safe to publish something encrypted with a password if you make it insanely difficult to crack?

Let's say you have a very important private key that you don't want to lose. You think of posting it to http://pastebin.com/ but then relize that elimanates the point. So you think of encrypting with ...
1
vote
0answers
435 views

SQLCipher and PRAGMA key on iOS

I'm a bit confused as to how SQLCipher handles the PRAGMA key provided for encrypting the SQLite database For background: I'm looking at options for encrypting application data at rest. From the ...
1
vote
1answer
116 views

Secure WebApp authentication

I know there are many questions about hashing passwords on the client side out there, but none of them, which I found, address my use case. My app will be end-to-end-encrypted and it is not an option ...
1
vote
3answers
603 views

Isn't using pbkdf2 + scrypt + bcrypt best?

Since slower is better and key stretching is an awesome way to increase security over potentially low entropy passwords, doesn't it make sense to use all three? To be clear, this is about ...
8
votes
2answers
994 views

Incrementing Work-Factor of Hash Functions Over Time

For a long time hash functions have required a work-factor in order to keep the operation "slow" enough to protect individual passwords in the case of a database leak. Bcrypt and PBKDF2 being notable ...
6
votes
2answers
445 views

Am I weakening symmetric OpenPGP encryption by deploying a custom pre-derivation?

I often use GnuPG to encrypt files with a passphrase. I'm very paranoid, and afraid that the key derivation used by GnuPG isn't slow enough. For this reason, I've decided to do my own key derivation ...
6
votes
1answer
125 views

How to determine the good number of PBKDF2 iterations according to technology evolution?

I'm using PBKDF2 to derivate passwords but I never know what can be considered as a "sufficient" value for the iteration count. Technology evolves very fast and I would also like to know how often ...
4
votes
1answer
829 views

How secure is my software for file encryption with AES-256?

I'm working on a project to build software for file encryption with AES in Java, it's operation is quite simple, but I was wondering if it is really safe. The program prompts the user for a ...
2
votes
1answer
412 views

Password based Asymmetric Key generation

I am looking for a password based key derivation scheme that results in an asymmetric key pair. I have worked with PBKDF and its variants but could not come up with any way of generating a key pair. I ...
2
votes
2answers
347 views

Is this use of PBKDF2 for generating passwords secure?

Reading Security Engineering by Ross Anderson, chapter 2.4.7.1 Password Manglers got an idea that finally seems to solve the issue I have with the existing 'I need to remember a strong* password for ...
-2
votes
2answers
7k views

How to securely transfer password from a registration page to the database [duplicate]

What steps must be followed to send password securely from the user registration page (i.e. client side) to the server over a non encrypted channel (http) when the user registers for the first time on ...
1
vote
1answer
737 views

What password based key derivation does PKCS #12 use?

I would like to make a note that I have read all of rfc 7292. I am trying to decrypt encrypted private key in a pkcs#12 pfx file. The private key is enveloped within pkcs#8 shrouded key bag. The ...
7
votes
2answers
5k views

Best reasonable way to store a secret safely

I'm working on a software that need to store and use secrets. These secrets can be for example: a password to connect to a database a client secret for an OAuth 2.0 client_credentials grant. I need ...
11
votes
3answers
5k views

Parameters for PBKDF2 for password hashing

I use PBKDF2 with SHA-256 to store hashes of passwords. I use the following parameters: number of iterations desired = 1024 length of the salt in bytes = 16 length of the derived key ...