PBKDF2 (Password-Based Key Derivation Function 2) is a key derivation function that is part of RSA Laboratories' Public-Key Cryptography Standards (PKCS) series.
Questions tagged [pbkdf2]
432 questions
0
votes
1 answer
Is the same key derived providing the same salt and password using Rfc2898DeriveBytes
I read this tutorial about encryption in .NET
it uses Rfc2898DeriveBytes to create a random key to be used by symmetric algorithm . but it doesn't save the key . and later in decryption method it supplies the same password and salt and decrypts the…

mohsen dorparasti
- 8,107
- 7
- 41
- 61
-1
votes
1 answer
Proper/Secure encryption of data using AES and a password
Right now, this is what I am doing:
1. SHA-1 a password like "pass123", use the first 32 characters of the hexadecimal decoding for the key
2. Encrypt with AES-256 with just whatever the default parameters are
^Is that secure enough?
I need my…
-1
votes
1 answer
pbkdf2 generates wrong key and iv in python for AES-256-CBC decryption
I want to reimplement data decryption which is currently running in a batch script into python.
openssl enc -d -aes-256-cbc -md sha256 -salt -pbkdf2 -in input.tgz.enc -out output.tgz -pass file:symetric_key
This is working. I am new to the topic and…

Doma96
- 1
- 2
-1
votes
2 answers
When I am trying to use cryptography PBKDF2 hash in python but when I enter a wrong password it throws error
backend = default_backend()
salt = b'2444'
kdf = PBKDF2HMAC(
algorithm=hashes.SHA256(),
length=32,
salt=salt,
iterations=100000,
backend=backend
)
This is the kdf setup.
def getMasterPassword():
…

Jaivardhan Bhola
- 7
- 4
-1
votes
1 answer
Decrypt AES-256-CBC with PBKDF2 from OpenSSL in C#
I need to decrypt a string that was encrypted with OpenSSL as following:
openssl rand -out secret.key -hex 192
openssl aes-256-cbc -pbkdf2 -in file_to_encrypt -out encrypted_file -pass file:secret.key
And i can't get it to work in C#
public void…

philipk
- 31
- 6
-1
votes
2 answers
PHP equivalent passwords hashing of the following .NET code
I don't really want to dump some code and expect answers but this is a pretty lengthy function that hashes a password in order to later compare it to the database-stored value.
I have seen posts where people wasted time trying to recreate what they…

Anaconda
- 93
- 1
- 11
-1
votes
2 answers
PBKDF2 - What happens when generating 1024 bits key length with SHA512?
I have this code snippet to generate key with PBKDF2.
SecretKeyFactory skf = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA512");
PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt.getBytes(), iterations, length);
…

jnemecz
- 3,171
- 8
- 41
- 77
-1
votes
1 answer
Cisco IOS password types - relative security
Cisco has finally gotten around to offering two relatively modern ways to store passwords in configuration files:
PBKDF2-HMAC-SHA256 with 20,000 iterations
Scrypt with N=16384, r=1, p=1
My question for the security gods is, given the two…

Nathan Spitzer
- 1
- 1
-1
votes
1 answer
How can i use the hash_pbkdf2()
I just installed php 5.5 and do not know if I forgot to configure something to make the hash_pbkdf2 function working, which I have to do so that I can be using it?
edit: for the people who can not understand my problem, and avoid negative votes…

Deharlan
- 32
- 2
- 11
-2
votes
1 answer
C# Rfc2898DeriveBytes to PHP
I'm trying to adapt the following function from C# to PHP and I can't get it to work. I've already searched other threads, but couldn't find the right answer to solve my problem.
public static string Decrypt(string EncryptedText)
{
byte[] bytes…

nurtext
- 1
- 3
-3
votes
1 answer
pbkdf2 Who is right?
I try to use PBKDF2 but each way I get a different result. Can you tell me what the problem is?
Node.js
"use strict";
const pbkdf2 = require("pbkdf2"); // npm i pbkdf2
const sha1 = require("sha1"); // npm i sha1
const y =…

user3515941
- 141
- 1
- 8
-4
votes
1 answer
Can't Turn Hashed Password Byte Array Back Into String
I'm writing an authentication system with sign-up and all. The passwords are hashed with a salt. I've run into a problem where the implementation I'm using operates with the salt and the final hash being byte arrays. I cannot turn this back into…
user4158347