Questions tagged [pbkdf2]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
91 views

How can I calculate the entropy reduction in my system I'm going to introduce?

I am the creator of LessPass, a deterministic password generator. The core of LessPass is not very complicated. I have 2 methods calc_entropy and render_password: calc_entropy transforms the master ...
1
vote
2answers
81 views

What is the Best Practice to change a secret password with PBDKF2

I read about recommendations about secret keys (or password as rfc8018 call it), one of them is to change the password from time to time. I would like to know: is there some best practice for this ...
0
votes
1answer
231 views

BCrypt vs PBKDF2-SHA256

I read that LastPass uses PBKDF2-SHA256 for storing the Master Password hash, I wonder how this compares to BCrypt and why did they chose this, as SHA256 is a quick hash (probably compensated by PKDF2?...
0
votes
0answers
91 views

Safest alternative for hashing credit card numbers to use the hash as fingerprint?

Same question asked here in 2014 but since a lot has changed since then, I would like to get feedback from experts on the latest best practices. The problem We need to hash credit card numbers to ...
0
votes
1answer
51 views

Can I use PBKDF2 derivation function to generate a MAC in PKCS12 file?

It seems that the default password based key derivation function that is used by PKCS12 to generate a MAC is this one. It is unique to the standard and probably not used anywhere else. Is it possible ...
0
votes
0answers
90 views

Securely encrypt and decrypt files via PBE in Java (Jasypt seems insecure)

This post has been MOVED to StackOverflow due to lack of answers on Info Security: https://stackoverflow.com/questions/60960802/securely-encrypt-and-decrypt-files-via-pbe-in-java-jasypt-seems-...
0
votes
0answers
34 views

Establish a symmetric key: KDF based on shared secret and random salt or key wrapping?

I am designing a basic KMS based on a simple HSM, I only have access to: AES256, SHA256, PBKDF2, HMAC (and combinations like AES256-HMAC-SHA256). The admin and the users of the system have a personal ...
0
votes
2answers
179 views

PBKDF2 hash over PBKDF2 key derivation

Imagine an app where any user provides a username and a password. This password is used to generate a 'strong' encryption key (for AES encryption) with the PBDKF2 key derivation algorithm. This ...
0
votes
0answers
61 views

Password authentication using a master key and KDF without storing password

I want to make a service stateless(has no data to store or mantain). But the service shoule be able to authenticate user. What I'm considering is using key derivation function with a shared master ...
4
votes
1answer
124 views

PBKDF2 doesn't seem to have a standardised implementation?

I recently read about the bug in Django with regards to PBKDF2 causing Denial of Service with large passwords: https://www.djangoproject.com/weblog/2013/sep/15/security/ This is because PBKDF2 "...
7
votes
3answers
2k views

Why are KDFs slow? Is using a KDF more secure than using the original secret?

According to the Wikipedia page for key derivation functions, a KDF's purpose is to derive a secret key for cryptography: In cryptography, a key derivation function (KDF) derives one or more secret ...
0
votes
1answer
47 views

Deriving a key with PBKDF2 from RFC1751 output

I am building a system that at some point requires a 256 bit key AES key. I used to feed passphrases through PBKDF2 to derive a key, but then I decided to generate random passwords of 12 words ...
0
votes
2answers
92 views

Protect key-streched hashes from rainbow tables?

I have a database table with accounts. I'm using PBKDF2 to create hashes from passwords. The passwords are of the correcthorsebatterystaple type, so we assume they are secure and unique. There are no ...
0
votes
0answers
143 views

Why does linux cryptsetup use PBKDF2 instead of bcrypt?

I've noticed that linux's cryptsetup utility by default uses the PBKDF2 for a key derivative function (KDF) versus using bcrypt, when bcrypt has more resistance to brute forcing from gpus. Why would ...
0
votes
1answer
199 views

XVWA PBKDF2 with sha256 and 1000 iteration

In XVWA (Xtreme Vulnerable Web Application) I presented with an PBKDF2 with sha256 and 1000 iteration as such: <?php function create_hash($password) { // format: algorithm:iterations:salt:...
1
vote
1answer
114 views

Is it safe to use 2 password derivation functions to one password?

The example I'm working on is this: i store the user password using Argon2 in my database and then use PBKDF2 to derive an AES key from the user password , and store only the salt used in PBKDF2, i ...
1
vote
1answer
183 views

Safe to switch from PBKDF2 to SHA-1 for token verification?

Whenever I need to generate a token (email account confirmation, password reset, remember me cookie, view email in browser etc) I generate a string of random bytes (typically 32 using the Fortuna PRNG)...
1
vote
0answers
56 views

How to correctly store the users credentials [closed]

I am writing an application that requires a username/password for the first time. I was wondering if the concept code below is a valid and secure way to store user passwords in the database. I hope ...
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 ...
1
vote
1answer
435 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: ...
8
votes
1answer
12k 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
73 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
330 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
206 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
480 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
vote
2answers
11k 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
227 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 ...
3
votes
0answers
3k 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
240 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
181 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 ...
2
votes
3answers
4k 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 ...
0
votes
1answer
245 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
296 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
542 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 ...
6
votes
2answers
1k 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
106 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
289 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
130 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 ...
2
votes
3answers
446 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
569 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
345 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 ...
2
votes
2answers
321 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
133 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
225 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 || ...
4
votes
2answers
5k 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
324 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
395 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
3k 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
77 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
740 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 ...