Questions tagged [pbkdf2]

PBKDF2 (Password-Based Key Derivation Function 2) is a key derivation function that is part of RSA Laboratories' Public-Key Cryptography Standards (PKCS) series.

432 questions
13
votes
1 answer

How to use PKCS5_PBKDF2_HMAC_SHA1()

I am trying to use PKCS5_PBKDF2_HMAC_SHA1() and below is my sample program. I wanted to make sure if my result of PKCS5_PBKDF2_HMAC_SHA1() is correct so I verified the same with the website http://anandam.name/pbkdf2/ and I see a different result. …
pkumarn
  • 1,383
  • 4
  • 22
  • 29
13
votes
3 answers

PBKDF2-HMAC-SHA-512 test vectors

I have not been able to find published test vectors for PBKDF2-HMAC-SHA-512. I've built a function that (finally!) reproduces the 7 HMAC-SHA-512 test vectors in RFC 4231, and the 32-byte test vectors for PBKDF2-HMAC-SHA-256 found in this…
Fred Federspiel
  • 158
  • 1
  • 7
13
votes
5 answers

About how fast can you brute force PBKDF2?

After the linkedin password hash leak, I've been looking at our password hashing. We using Django 1.4 which uses PBKDF2, which is great and a step up from the previous SHA1. However I'm curious how easily one could brute force that. I'm looking at…
Amandasaurus
  • 58,203
  • 71
  • 188
  • 248
12
votes
2 answers

Java - PBKDF2 with HMACSHA256 as the PRF

I've been given the task of creating a Login API for our project and I'm supposed to use PBKDF2 with HMACSHA256 as the PRF. The plain text password is hashed using MD5 and then fed into the PBKDF2 to generate a derived key. The problem is, I'm not…
Android Noob
  • 3,271
  • 4
  • 34
  • 60
12
votes
2 answers

Is there a standard for using PBKDF2 as a password hash?

Join me in the fight against weak password hashes. A PBKDF2 password hash should contain the salt, the number of iterations, and the hash itself so it's possible to verify later. Is there a standard format, like RFC2307's {SSHA}, for PBKDF2 password…
joeforker
  • 40,459
  • 37
  • 151
  • 246
11
votes
4 answers

.NET: Difference between PasswordDeriveBytes and Rfc2898DeriveBytes

I'm trying to understand some C#-code, I have been handed, which deals with cryptography, and specifically uses PasswordDeriveBytes from System.Security.Cryptography. In the .NET docs , it says that PasswordDeriveBytes uses "an extension of the…
adamski
  • 111
  • 1
  • 3
11
votes
4 answers

Django pbkdf2_sha256 JS implementation

I have a database from django and I want to work with it from Node.js. I have a task: authenticate users. Known from database: algorithm pbkdf2_sha256, salt, 10000 iterations and base64-encoded hash. What steps I must to do in JS to encode some…
SoWa
  • 314
  • 4
  • 12
10
votes
1 answer

bcrypt vs pbkdf2 for encrypting private keys

I'm building an application in which a password is used on the client side to encrypt a private key of a elliptic curve key pair. Then the password is bcrypted and sent to the server (along with the encrypted private key) and the public…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
9
votes
1 answer

How to derive IV and key to crypto.createCipheriv for decryption?

I have seen other questions which ask about creating the initialization vector (IV) for encryption and it seems using a random value is one option. However, I need to generate the IV for decryption, so I have to use the same one that the data was…
Michael
  • 9,060
  • 14
  • 61
  • 123
9
votes
2 answers

Cryptography best practices for password storage in Node

I'm looking for a straightforward, secure, solution for storing a user's password using Node. I'm a cryptography novice, but have been trying to piece a solution together from researching online. I'm looking for validation that what I came up with…
markdb314
  • 5,735
  • 6
  • 25
  • 26
9
votes
1 answer

PBKDF2 Python keys vs .NET Rfc2898

I am trying to write a Python module that will encrypt text that our existing .NET classes can decrypt. As far as I can tell, my code lines, up but it isn't decrypting (I get an 'Invalid padding length' error on the C# side). My pkcs7 code looks…
shelbydz
  • 543
  • 6
  • 23
9
votes
1 answer

PBKDF2-HMAC-SHA1

To generate a valid pairwise master key for a WPA2 network a router uses the PBKDF2-HMAC-SHA1 algorithm. I understand that the sha1 function is performed 4096 times to derive the PMK, however I have two questions about the process. Excuse the…
Jason
  • 91
  • 1
  • 1
  • 2
9
votes
1 answer

python passlib: what is the best value for "rounds"

from the passlib documentation For most public facing services, you can generally have signin take upwards of 250ms - 400ms before users start getting annoyed. so what is the best value for rounds in a login/registration if we consider that there…
Abdelouahab Pp
  • 4,252
  • 11
  • 42
  • 65
8
votes
4 answers

Rfc2898DeriveBytes + PBKDF2 + SecureString is it possible to use a secure string instead of a string?

I've a function GetPassword, that returns a SecureString type. When I pass this secure string to Rfc2898DeriveBytes to generate a key, Visual Studio shows an error. My limited knowledge tells me that it is because Rfc2898DeriveBytes accepts only a…
NoobTom
  • 555
  • 1
  • 9
  • 21
8
votes
4 answers

Encrypting(MD5) multiple times can improve security?

I saw some guy who encrypt users password multiple times with MD5 to improve security. I'm not sure if this works but it doesn't look good. So, does it make sense?
Sanghyun Lee
  • 21,644
  • 19
  • 100
  • 126
1
2
3
28 29