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

PBKDF2 function in PostgreSQL

How can the PBKDF2 function be done in PostgreSQL? There does not appear to be a native implementation.
ktekinay
  • 426
  • 4
  • 7
8
votes
1 answer

Nodejs crypto.pbkdf2 result is different from CryptoJS.PBKDF2

I'm working with PBKDF2 on frontend (CryptoJS) and backend (Node.js), both the derived key must be equal so, I use the same salt, same algo, same number of iteration, same password, but the derived key is different. This is the Browser/cryptoJS…
TheZero
  • 105
  • 1
  • 5
8
votes
0 answers

CAPI does not support Password Based Encryption (PBE) encryption?

I am trying to port a UNIX code using OpenSSL (PKCS#5 & PKCS#7) to windows. In the case of OpenSSL, all the encoding/decoding (certificates or passwords) is done transparently to the caller in the function CMS_Encrypt, as it should be. CAPI does the…
malat
  • 12,152
  • 13
  • 89
  • 158
7
votes
3 answers

C# PasswordDeriveBytes Confusion

I have following code in C# PasswordDeriveBytes DerivedPassword = new PasswordDeriveBytes(Password, SaltValueBytes, HashAlgorithm, PasswordIterations); byte[] KeyBytes = DerivedPassword.GetBytes(32); I am using "SHA1" hashing algorithm. According…
Siddiqui
  • 7,662
  • 17
  • 81
  • 129
7
votes
1 answer

Salt in PBKDF2 - Python

I'm just learning about securing password while developing using MySQL and Python, following this tutorial. It's my understanding that the userpassword is stored at the database hashed, and the salt is stored along side unencrypted, so that we can…
hiperbolt
  • 184
  • 2
  • 3
  • 11
7
votes
2 answers

Can I improve the security of MD5 hashed passwords by salting the existing MD5 hash and hash the result using Scrypt or PBKDF2 HMACSHA256?

I have a database of legacy passwords that were salted and hashed using MD5. I would like to update the system so that the data is more secure. The first option is to transition the users to a new hashing scheme (Salt + Scrypt or PBKDF2 HMACSHA256)…
jpshook
  • 4,834
  • 6
  • 36
  • 45
7
votes
2 answers

why is my pbkdf2 implementation so slow (vs. SQLCipher)?

I have written a simple Android App on my Xoom tablet, which simply stores some string notes in a SQLCipher database. The user is prompted to type in a passphrase which will be used for the database by the SQLCipher lib. This works fine so far and…
Gannic
  • 263
  • 1
  • 3
  • 10
7
votes
3 answers

Using MD5 to generate an encryption key from password?

I'm writing a simple program for file encryption. Mostly as an academic exercise but possibly for future serious use. All of the heavy lifting is done with third-party libraries, but putting the pieces together in a secure manner is still quite a…
Charles
  • 320
  • 3
  • 6
7
votes
2 answers

PBKDF2 with SHA256 on android

I want to generate a derived hash of a password using PBKDF2 with SHA256. with this SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1") this work but it use SHA1. With SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256") (or…
Kowlown
  • 920
  • 10
  • 26
6
votes
1 answer

HEX representation of byte array

I feel pretty stupid asking this, but as I don't know the answer, I'm going ahead anyway. I"m trying out some authentication code and want to know why the byte array I get from Rfc2898DeriveBytes needs to be converted to HEX and back to a byte array…
Mr Moose
  • 5,946
  • 7
  • 34
  • 69
6
votes
1 answer

What default parameters uses OpenSSL -pbkdf2?

I encrypted a file with this command: openssl enc -aes-192-cbc -e -pbkdf2 -in -out -pass pass: Now I'm trying to do decrypt it in c and to take advantage of pbkdf2 I'm using the function: int PKCS5_PBKDF2_HMAC (const…
Valerio Coretti
  • 147
  • 2
  • 8
6
votes
1 answer

OpenSSL & C - Hash Passwords w/ SHA256 or SHA512

I've tried my best reading over the docs but they seem very sparing in information (maybe I'm looking in the wrong place?) I'm trying to create a password hasher in C using OpenSSL lib in which the program can be called and passed arguments such as…
user4158347
6
votes
1 answer

implementing PBEKeySpec encryption into IOS

This is my java code. Now I want to implement same functionality in Objective-C. int dkLen = 16; int rounds = 1000; PBEKeySpec keySpec = new PBEKeySpec(hashKey.toCharArray(),salt.getBytes(), rounds, dkLen * 8); SecretKeyFactory factory =…
Askarc Ali
  • 318
  • 4
  • 21
6
votes
1 answer

Crypto++ pbkdf2 output is different than Rfc2898DeriveBytes (C#) and crypto.pbkdf2 (JavaScript)

So I'm trying to use PBKDF2 to derive a key given a base64 string of 256bits. I am able to use C#'s Rfc2898DeriveBytes and node-crypto's pbkdf2 to derive the same key, however, I can't say the same for C++. I'm not sure if I'm doing wrong…
Chebn
  • 63
  • 1
  • 5
6
votes
1 answer

PBKDF2WithHmacSHA1 key generation Takes too long on Android

I want to generate key using PBKDF2WithHmacSHA1, but it takes too long to calculate on android. I am using same number of iteration on iOS with common crypto and it takes approximately 6 seconds where as on android it takes 100 seconds. Here is the…
Nauman Afzaal
  • 1,046
  • 12
  • 20
1 2
3
28 29