Questions tagged [pbkdf2]
PBKDF2 is a key derivation and strengthening function, commonly used for password storage.
166
questions
0
votes
1
answer
47
views
Key derivation for password manager backup?
Backing up your password manager is a good idea in case your house burns down, but where do you store the password to the off-site backup?
Remembering the master password is easy, but re-using the ...
1
vote
0
answers
47
views
Security implications of using a plaintext master password as the salt for PBKDF2 in a zero-knowledge system
I was reading the BitWarden Security Whitepaper (BitWarden is an open source, zero-knowledge password manager that performs encryption/decryption on the client side) and came across the following ...
5
votes
1
answer
196
views
Design of a web based password vault
I'm designing a password vault that's accessible to clients through an existing web application. The clients are small, (and mostly non-technical) businesses that aren't using password managers, but ...
2
votes
3
answers
198
views
Is using random salt to pbkdf2 for every request to Rest API good/bad?
Here are my conditions:
My Rest API must accept username and plain password. But, that's very bad. That's why the client must encrypt the password first and my rest API will decrypt it to get the ...
0
votes
1
answer
190
views
Is pbkdf2 with hmac using md5 still secure?
I have an old system that can do PBKDF2 with HMAC using MD5, but not SHA-2. Now I know that MD5 is insecure and shouldn't be used for new applications, but https://crypto.stackexchange.com/a/9340/...
1
vote
1
answer
167
views
Use PBKDF2 for both authentication and decryption on NodeJS
I am using PBKDF2 on NodeJS to authenticate a user who submits username & password. To do this, when the user first registers, I generate a salt, I use 200000 iterations, I specify a key length of ...
2
votes
1
answer
171
views
Use pre-computed PBKDF2 key with high iteration count as password
We provide web redirection based integration with our partners' web apps. The flow is something like the following, and the password is generated randomly and shared with them during the onboarding ...
1
vote
1
answer
199
views
Does using a random number of iterations for PKBDF2-SHA256 help if I only have to protect one key used to encrypt a password protecteded file? [duplicate]
I read about Recommended # of iterations when using PBKDF2-SHA256?
I have also read in Why not just use a small but unusual number of hashing rounds? that when there are multiple password to protect, ...
1
vote
1
answer
107
views
Can I use part of PBKDF2 output as an IV (nonce)?
SHA-256 generates a 32-byte hash, Is it a safe practice to use the first 16 as an iv (nonce) and the second 16 as a key ?
What other things I should consider when using PBKDF2 in a scenario like this ?...
0
votes
1
answer
295
views
How to correctly convert a bit key to string for aes 256 encrytion?
I am using CryptoJS AES 256 encryption:
CryptoJS.AES.encrypt(string, secret);
The secret is generated through:
function generateKey(str) {
const salt = CryptoJS.lib.WordArray.random(128 / 8);
...
1
vote
1
answer
102
views
Is combining salt from two places secure enough and what length
I need to implement some hashing scheme for an open-source project. This is what I currently have and I'd like to hear whether this is secure enough -
The password is hashed using PBKDF2-SHA256 (which ...
4
votes
0
answers
120
views
I/O cost and dedicated hashing hardware/ SHA2/ PBKDF2
Is there existing work (or algorithms) that explore (or exploit) imposing an i/o cost to disadvantage hashing hardware, while still using SHA2-family of hashes?
Is this even possible, or would any ...
15
votes
4
answers
3k
views
PBKDF2 usage will slow REST API down?
When implementing password hashing using PBKDF2 for authenticating access to a REST api,when we say that PBKDF2 is slow does it mean that it's going to take a lot of time to hash the password and ...
1
vote
4
answers
805
views
Securely establish and verify PIN over network
Is there a (relatively simple) protocol for setting up a (6-digit) PIN on a remote server, that also prevents those, who may get a DB dump from the server, from brute-forcing that PIN?
Is PBKDF2 and ...
1
vote
2
answers
213
views
Is the following a secure method for file encryption?
So the goal is to use AES-CBC-256 to encrypt the data in a file. To derive the AES key and IV pbkdf2 will be used to generate a 384 bit output using a given password and salt, where the first 256 bits ...
0
votes
1
answer
357
views
Challenge-Response authentication and SSL
I'm currently developing an Android Application that communicates with a server and needs the user to login.
The connection is secured with SSL and certificate pinning.
For user authentication I'm ...
0
votes
0
answers
317
views
Android: How safe is PBKDF2 with a 4 digit pin?
Our Product Manager wants a 4 digit pin for login in our app, obviously for UX reasons, so user don't have to remember their password each time when they login.
A refresh token can be retrieved from ...
2
votes
0
answers
200
views
Is it possible to use Argon2id hashes with PAM?
I was wondering if it's possible to implement more secure KDF like bcrypt, scrypt, pbkdf2 and argon2id in PAM authentication.
Ideally I would like to have their hashes instead of SHA-512 ones directly ...
1
vote
1
answer
211
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
2
answers
178
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
1
answer
3k
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?...
1
vote
1
answer
178
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
0
answers
233
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-...
1
vote
2
answers
512
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
0
answers
122
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
1
answer
302
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
3
answers
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
1
answer
92
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
2
answers
248
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 ...
2
votes
0
answers
258
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
1
answer
477
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
1
answer
163
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
1
answer
329
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
0
answers
95
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
2
answers
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
1
answer
643
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: ...
10
votes
1
answer
23k
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
0
answers
116
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
1
answer
488
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
1
answer
288
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
1
answer
662
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 ...
6
votes
3
answers
16k
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?...
3
votes
2
answers
326
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
0
answers
6k
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
1
answer
292
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
2
answers
239
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 ...
4
votes
3
answers
5k
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
vote
1
answer
414
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
1
answer
344
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
1
answer
642
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 ...