Questions tagged [pbkdf2]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

Is pass -> [via pbkdf2] -> seed -> ECDSA key pair better than pass(word) hashing?

For a web service, I am considering generating random 25-49 recovery codes as a kind of pass that can be stored in a pass manager (no usernames). Instead of pass(word) hashing on the server, I ...
r j's user avatar
  • 1
0 votes
0 answers
61 views

OpenSSL get PKCS#8 encrypted rsa PBKDF2 iteration count

I have a PCKS#8 RSA Key encrypted with a passphrase and would like to retrieve the iteration count used for the PBKDF2 used to derive the AES Key used for encryption, in order to make sure that they ...
AnotherOne's user avatar
4 votes
1 answer
905 views

What is the math behind iterations in PBKDF2-SHA256 for lastpass users?

I am looking for a technical estimate of how bad the situation is regarding the recent hack of lastpass. The hack was covered by several outlets: Naked Security, Ars Technica. Lastpass has admitted ...
Sakib Arifin's user avatar
1 vote
0 answers
25 views

Can parts of WebCrypto AES-GCM be reused between encryptions

I am trying to better understand the processes involved in e2ee using WebCrypto on the browser. I understand that the only real method to use a passphrase to generate a symmetric key on the browser is ...
masimplo's user avatar
  • 111
1 vote
1 answer
122 views

How long "digits-only recovery code" is secure enough?

I'm implementing encryption in one of my webextension which will encrypt locally stored data. I have a single master CryptoKey (AES-GCM) that encrypts everything. And this master key is then encrypted ...
icl7126's user avatar
  • 113
1 vote
1 answer
454 views

LUKS: longer passphrase iteration count

From the manual of cryptsetup: Passphrase processing: Whenever a passphrase is added to a LUKS header (luksAddKey, luksFormat), the user may specify how much the time the passphrase processing should ...
Dor's user avatar
  • 111
0 votes
1 answer
251 views

Hashing email addresses using scrypt

I want to hash email addresses so that they are anonymous but still unique in my database. I was thinking of using scrypt for this and creating the salt as a sha256 of some secret stored on the server ...
fire's user avatar
  • 195
0 votes
1 answer
62 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 ...
Fax's user avatar
  • 175
1 vote
0 answers
87 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 ...
ChristianF's user avatar
5 votes
1 answer
382 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 ...
ChristianF's user avatar
2 votes
3 answers
410 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 ...
fahadh4ilyas's user avatar
0 votes
1 answer
575 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/...
Brian Minton's user avatar
  • 1,166
0 votes
1 answer
316 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 ...
vrtjason's user avatar
  • 1,105
2 votes
1 answer
358 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 ...
praveenp's user avatar
1 vote
1 answer
439 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, ...
Antonio's user avatar
  • 113
1 vote
1 answer
200 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 ?...
Mohammed Rady's user avatar
0 votes
1 answer
704 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); ...
Kim Mỹ's user avatar
  • 145
1 vote
1 answer
138 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 ...
Dan's user avatar
  • 113
4 votes
0 answers
141 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 ...
brynk's user avatar
  • 1,071
15 votes
4 answers
4k 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 ...
microwth's user avatar
  • 2,483
1 vote
4 answers
819 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 ...
Andrei Petrenko's user avatar
1 vote
2 answers
279 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 ...
JojoTheCodeDude's user avatar
0 votes
1 answer
607 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 ...
Thunderbolt's user avatar
0 votes
0 answers
451 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 ...
Minki's user avatar
  • 101
2 votes
0 answers
325 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 ...
Polizi8's user avatar
  • 63
2 votes
1 answer
296 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 ...
Guillaume Vincent's user avatar
1 vote
2 answers
236 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 ...
KCOtzen's user avatar
  • 119
2 votes
1 answer
5k 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?...
mFeinstein's user avatar
1 vote
2 answers
294 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 ...
username's user avatar
  • 195
0 votes
0 answers
305 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-...
Vahid's user avatar
  • 101
1 vote
2 answers
729 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 ...
BmXaM's user avatar
  • 11
0 votes
0 answers
144 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 ...
user2828102's user avatar
4 votes
1 answer
374 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 "...
Ryan Sheasby's user avatar
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 ...
user avatar
0 votes
1 answer
108 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 ...
J. Doe's user avatar
  • 3
0 votes
2 answers
451 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 ...
AndreKR's user avatar
  • 498
2 votes
0 answers
335 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 ...
john doe's user avatar
  • 698
0 votes
1 answer
780 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:...
Lucian Nitescu's user avatar
1 vote
1 answer
167 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 ...
user avatar
1 vote
1 answer
398 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)...
Adam's user avatar
  • 113
1 vote
0 answers
129 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 ...
kyr0's user avatar
  • 11
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 ...
deltzy's user avatar
  • 237
1 vote
1 answer
844 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: ...
Shameer Kashif's user avatar
11 votes
1 answer
31k 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 ...
Raf's user avatar
  • 221
1 vote
0 answers
124 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: [email protected] Password: correctHorseShoeBattery Nonce given by ...
Killney's user avatar
  • 403
0 votes
1 answer
594 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 ...
sousdev's user avatar
2 votes
1 answer
338 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 ...
ebvtrnog's user avatar
  • 135
0 votes
1 answer
795 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 ...
c00000fd's user avatar
  • 171
6 votes
3 answers
17k 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?...
jnemecz's user avatar
  • 247
3 votes
2 answers
376 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 ...
Sno's user avatar
  • 33