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
4
votes
1 answer

How can I generate the same secure hash in Java and Ruby using PBKDF2

I am porting a web application from Ruby to Java and would like to allow the users to log in without resetting their passwords. Here is the Ruby code that generates the hash using the pbkdf2 gem: PBKDF2.new { |p| p.password = password p.salt =…
kensei62
  • 144
  • 9
4
votes
0 answers

How to use PBKDF2 password hashing in an embedded Linux device

I have a need to generate password hashes in a Windows application and, at a later time, download them to a Linux device to be inserted into the shadow password file. For marketing reasons using PBKDF2 is attractive at the Windows end as it provides…
Rob Smyth
  • 1,768
  • 11
  • 19
4
votes
1 answer

How to match crowd database passwords?

I would like to have a piece of code that is able to check if a given password match the one stored in the crowd cwd_user table. The passwords in that table starts with "{PKCS5S2}..." and I found in the link below that crowd is using the PBKDF2…
Asterius
  • 2,180
  • 2
  • 19
  • 27
4
votes
1 answer

Storing PBKDF2 Settings Alongside Password

I'm experimenting with PBKDF2 for my passwords right now, and it dawned on me that if I were to ever upgrade to a faster machine in the future, I would want to increase the number of PBKDF2 iterations. However, this would invalidate all the current…
Huy T
  • 1,273
  • 1
  • 11
  • 21
4
votes
1 answer

Reverse engineering how Gitlab uses Devise for PBKDF2 tokens

I'm trying to figure out the steps performed by Gitlab, a Ruby on Rails application, to arrive at the authentication token they use. My knowledge of ruby is basic, and I don't know Ruby on Rails. From what I have figured out, starting with their…
Ed I
  • 7,008
  • 3
  • 41
  • 50
4
votes
1 answer

Better practice with PKBDF2, AES, IV and salt

So, I'm encrypting list of documents with AES algorithm. I use PBKDF2 to determine key from user password. I have a few question about store data and IV/salt: How to store documents: Encrypt all documents with one AES key, IV and salt Encrypt each…
Wayne
  • 333
  • 1
  • 8
  • 19
4
votes
1 answer

SHA3 status and PBKDF2-HMAC-SHA3 test vectors

Since SHA-3 seems to be an already known function (Keccak as the finalist of NIST hash function competition) I have several questions related to this topic: NIST site says that NIST is closed due to a lapse in government funding. Is there any…
Oleg Stepura
  • 95
  • 2
  • 11
4
votes
1 answer

pbkdf2 and hash comparison

I use mitsuhiko's implementation of pbkdf2 for password hashing: def pbkdf2_bin(data, salt, iterations=1000, keylen=24, hashfunc=None): """Returns a binary digest for the PBKDF2 hash algorithm of `data` with the given `salt`. It iterates…
wombatonfire
  • 4,585
  • 28
  • 36
4
votes
1 answer

RNGCryptoServiceProvider does not produce same hash for same PWD,Salt,Iteration combination

Oki So I want to hash my password by appending random salt in .Net . The inbuilt classes I m using for this purpose are RNGCryptoServiceProvider - to generate the random salt and Rfc2898DeriveBytes - to hash the actual password. But when I call the…
Vipresh
  • 1,250
  • 15
  • 31
3
votes
2 answers

zero knowledge architecture

I would like to encrypt some user data with the zero-knowledge architecture. I reference the implementation of the bitwarden and don't understand some parts. First, I would like to use the the argon2 to derive the key instead of pbkdf2, since it…
Daniel Chan
  • 343
  • 5
  • 13
3
votes
1 answer

PBKDF2 in Java with Bouncy Castle vs .NET Rfc2898DeriveBytes?

I have some C# code that generates a key using PBKDF2. //byte[] salt = new RNGCryptoServiceProvider().GetBytes(salt); byte[] salt = new byte[] { 19, 3, 248, 189, 144, 42, 57, 23 }; // for testing byte[] bcKey = new Rfc2898DeriveBytes("mypassword",…
Jake Petroules
  • 23,472
  • 35
  • 144
  • 225
3
votes
1 answer

Pbkdf2 How to verify hashed password?

I am using the following code to hash passwords using Pbkdf2: private string HashPassword(string password) { // generate a 128-bit salt using a secure PRNG byte[] salt = new byte[128 / 8]; using (var rng =…
Clairvoyant
  • 81
  • 1
  • 9
3
votes
1 answer

Reproducing JS PBKDF2 Hash in C#

I had to implement some new security features for an Existing Database. They used to hash passwords on the side of the client with a salt from the DB. They used this code to hash the passwords before sending them to the server: var hash =…
VanDeath
  • 519
  • 1
  • 7
  • 20
3
votes
1 answer

How to get php hash_pbkdf2 decrepit value

I have encrypted the string using PHP hash_pbkdf2 function. Please review the below code: $password = "password"; $iterations = 10000; $salt = 1111; $hash = hash_pbkdf2("sha256", $password, $salt, $iterations, 20); The result of hash value…
Kanewilliam
  • 199
  • 2
  • 18
3
votes
0 answers

Generate "PBKDF2" in Google Apps Script

Does anyone know how I can generate a PBKDF2 key in Google Apps Script? (including generating the "salt" value needed) I'm looking for something like this from Node.js: const key = crypto.pbkdf2Sync('secret', 'salt', 100000, 64, 'sha512'); Or…