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
41
votes
3 answers

PBKDF2 with bouncycastle in Java

I'm trying to securely store a password in a database and for that I chose to store its hash generated using the PBKDF2 function. I want to do this using the bouncy castle library but I don't know why I cannot get it to work by using the JCE…
andrei.serea
  • 950
  • 1
  • 9
  • 15
35
votes
2 answers

PBKDF2WithHmacSHA512 Vs. PBKDF2WithHmacSHA1

I'm working on a Java authentication subsystem that specs the storage of passwords in the DB as PBKDF2-generated hashes, and I'm now trying to decide whether I should use SHA1 or SHA512 as PRF. I went through the specs of both but they are very…
DTs
  • 1,196
  • 1
  • 11
  • 28
32
votes
1 answer

PBEKeySpec what do the iterationCount and keyLength parameters influence?

Delving into the java encryption and hashing world I see examples of the constructor for the PBEKeySpec class with various values for the iterationCount and the keyLength parameters. Nothing seems to explain what these parameters impact or mean. I…
Mark
  • 803
  • 3
  • 11
  • 21
30
votes
2 answers

SALT and HASH using pbkdf2

I am using the following methods to create a salted and hashed password from the crypto lib in nodejs: crypto.randomBytes(size, [callback]) crypto.pbkdf2(password, salt, iterations, keylen, callback) For the randomBytes call (creating the SALT)…
lostintranslation
  • 23,756
  • 50
  • 159
  • 262
28
votes
4 answers

Reliable implementation of PBKDF2-HMAC-SHA256 for JAVA

UPDATED 2019: Bouncycastle now support PBKDF2-HMAC-SHA256 since bouncycastle 1.60 Is there any reliable implementation of PBKDF2-HMAC-SHA256 for JAVA? I used to encrypt using bouncycastle but it does not provide PBKDF2WithHmacSHA256'. I do not want…
dgregory
  • 1,397
  • 1
  • 12
  • 26
23
votes
4 answers

PBKDF2-HMAC-SHA2 test vectors

There are test vectors for PBKDF2-HMAC-SHA1 in RFC6070. There are test vectors for HMAC-SHA2 in RFC4231. But so far I haven't found test vectors for PBKDF2-HMAC-SHA2 anywhere. I'm most interested in SHA256, so I'll post some vectors I calculated…
Christian Aichinger
  • 6,989
  • 4
  • 40
  • 60
23
votes
4 answers

PBKDF2 implementation in C# with Rfc2898DeriveBytes

Guys, I'm trying to implement a PBKDF2 function in C# that creates a WPA Shared key. I've found some here: http://msdn.microsoft.com/en-us/magazine/cc163913.aspx that seems to produce a valid result, but it's one byte too short... and the wrong PSK…
Nick
  • 2,913
  • 12
  • 40
  • 52
18
votes
3 answers

PasswordDeriveBytes vs Rfc2898DeriveBytes, Obsolete but way faster

I'm working on a encryption functionality based on classes inherited from SymmetricAlgorithm such as TripleDes, DES, etc. Basically there're two options to generate consistent key and IV for my algorithm class, PasswordDeriveBytes and…
tshao
  • 1,127
  • 2
  • 8
  • 23
17
votes
3 answers

PBKDF2 using CommonCrypto on iOS

I'm trying to use CommonCrypto to generate keys using PBKDF2 but I can't seem to import CommonCrypto/CommonKeyDerivation.h, I just errors that it is not found. Any ideas? edit: I should probably mention I have already added the security framework…
AnthonyM
  • 1,115
  • 2
  • 10
  • 20
17
votes
2 answers

Password Hashing: PBKDF2 (using sha512 x 1000) vs Bcrypt

I've been reading about the Gawker incident and several articles have cropped up regarding only using bcrypt to hash passwords and I want to make sure my hashing mechanism is secure enough to avoid switching to another method. In my current…
buggedcom
  • 1,537
  • 2
  • 18
  • 34
15
votes
3 answers

Is there a SQL implementation of PBKDF2?

Does anyone know of a SQL implementation of PBKDF2? (I'd rather not use an external library like, for example, ChillKat's ActiveX component.)
ladenedge
  • 13,197
  • 11
  • 60
  • 117
15
votes
2 answers

PBKDF2 in Bouncy Castle C#

I've being messing around the C# Bouncy Castle API to find how to do a PBKDF2 key derivation. I am really clueless right now. I tried reading through the Pkcs5S2ParametersGenerator.cs and PBKDF2Params.cs files but i really cant figure out how to do…
Ranhiru Jude Cooray
  • 19,542
  • 20
  • 83
  • 128
14
votes
2 answers

PBKDF2 function in Android

Is there PBKDF2 implementation for Android. I am trying to derive a key using PBKDF2 function. I couldn't find an example to do so.
ssk
  • 9,045
  • 26
  • 96
  • 169
14
votes
3 answers

Is SHA1 still secure for use as hash function in PBKDF2?

As there have been significant advances in the cryptoanalysis of SHA1 it's supposed to be phased out in favor of SHA2 (wikipedia). For use as underlying hash function in PBKDF2, however, it's basically used as a PRNG. As such it should be still…
Christian Aichinger
  • 6,989
  • 4
  • 40
  • 60
14
votes
1 answer

Getting SlowAES and RijndaelManaged class in .NET to play together

I'm trying to setup AES encryption / decryption using the javascript library SlowAES and the RijndaelManaged class in .NET. I chose this method after reading this post, where Cheeso has managed to get these two encryption methods to play together …
Bob
1
2 3
28 29