Questions tagged [pbkdf-2]

The Password-Based Key Derivation Function 2 (PBKDF2) is a method of securely deriving encryption keys from a passphrase entered by a user. It features an iteration count that can be deliberately adjusted (key stretching) to slow down brute force password guessing attacks.

Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

Can we have an asymmetric key in AES? Clarification about PBKDF2 and AES-GCM in WebCrypto

Can we have an asymmetric key in AES? Clarification about PBKDF2 and AES-GCM in WebCrypto According to wikipedia AES page, AES is a symmetric-key algorithm. The algorithm described by AES is a ...
borracciaBlu's user avatar
1 vote
0 answers
72 views

Is it better to use PBKDF2 with SHA-512 and 1e6 iterations or SHA-256 and 6e6 iterations?

I'm implementing encryption in my browser extension that will allow users to encrypt their data and then share them with others. And since shared links can be leaked, I want to protect the data as ...
icl7126's user avatar
  • 111
0 votes
0 answers
29 views

Generic encryption & decryption module - question regarding password stretching & salt

We want to implement an encryption / decryption module that we want to provide to different internal components of our system (internal library for internal components). The component will provide (...
TrinityTonic's user avatar
1 vote
1 answer
171 views

symmetric key generation - random number vs pbkdf2

I am working on improving my grasp on applied cryptography. Following question is just for learning/understanding purposes.. Lets say I want to generate a 16 byte key that I want to use for some ...
Manohar's user avatar
  • 155
0 votes
1 answer
129 views

When trying to break a PBKDF2 SHA512 hash, how fast is an RTX 4090 or similar GPU with the given parameters

I'm writing a paper for uni about password security, specifically about cracking passwords in the context of a password manager. I've coded a password encryption scheme which uses PBKDF2(SHA512) to ...
Luka Gecko's user avatar
3 votes
1 answer
139 views

Does PBKDF2 HMAC 512 really only produce a maximum of ~128 bits of entropy? Regardless of input?

Andreas Antonopoulos effectively states: an input of 256bits of entropy into PBKDF2-HMAC-SHA512 will ONLY output a 64 byte hash containing ~128 bits of entropy. He states the algorithm essentially ...
George's user avatar
  • 33
1 vote
1 answer
83 views

AES CBC with random IV but key from PBKDF2 with same salt

TL;DR: Is encrypting data with AES CBC with random IV + PBKDF2 key using the username as salt safe? I have searched the internet, but I could not find a proper answer that encompasses the "AES ...
Daniel Aguiar's user avatar
2 votes
1 answer
104 views

AES encryption IV that won't need to be stored

I'm trying to implement an IV that won't need to be stored on it's own. I'm considering 3 options: Since I'm using PBKDF to generate a key I could use some bytes from the generated hash I could use ...
snow's user avatar
  • 23
-1 votes
1 answer
88 views

Can I use many iterations of HMAC function instead of PBKDF2?

I know, that PBKDF2 uses HMAC with SHA2 function as PRF. But.. can I use many iterations of HMAC with SHA2 directly? Is this effective and securely? P.S I need the best function, but I can’t use ...
Murrchalkina's user avatar
1 vote
0 answers
156 views

Is my TypeScript scrypt implementation using Web Crypto API safe and correct? (Open Source)

I want to use TweetNaCl.js for encrypting user data that is stored in LocalStorage. Therefore, I want to prompt the user to provide a PIN/password that shall be ...
kyr0's user avatar
  • 111
0 votes
0 answers
175 views

Old openssl version does not support -iter or -pbkdf2, how does it derive the encryption key for AES?

When using openssl or libressl to encrypt or decrypt data with AES, I typically specify ...
RocketNuts's user avatar
  • 1,397
4 votes
2 answers
485 views

Does combining multiple PBKDF2 keys result higher iteration count when using same password but different salts?

I did some experimenting with web subtle crypto. I derived a key using PBKDF2 with SHA-512 and 100 000 iterations and timed it. Doing same with 200 000 rounds doubled the time as expected. Then I did ...
Puruporo's user avatar
2 votes
1 answer
582 views

Lastpass PBKDF2 and salt

In light of the LastPass hack their use of PBKDF2 had me wondering a few things. If PBKDF2 with a salt and the Master password is used to generate a vault password every time you type in your master ...
Gunna's user avatar
  • 21
1 vote
2 answers
173 views

Hashes to passwords with PBKDF2

If an attacker wants to hack the passwords of $2^{10}$ users. And all of these users generate a password from the space of $2^{50}$ passwords** and each password is hashed with PBKDF2 with $2^{10}$ ...
CryptoGuru's user avatar
1 vote
2 answers
194 views

How much computation it takes to crack a PBKDF2's secret salt when the passphrase meterial has been leaked

Given the following code, extracted from a Bip39 implementation for Android by Zcash ...
zjmo's user avatar
  • 123
1 vote
1 answer
841 views

Best hash for PBKDF2?

I have a my own PBKDF2 automated implementation that automatically salts the hash. The output looks like this: ...
Engo's user avatar
  • 11
1 vote
1 answer
1k views

How long does it take to decrypt AES encrypted message with salt(for pbkdf2 key) and iv known

I'm new to crypto! The situation is, Aes-256-cbc encrypted message(including not encrypted iv & salt) is revealed. We also know pbkdf2 function uses 10000 rounds with sha256. All we need to ...
Hyunhum's user avatar
  • 11
1 vote
1 answer
67 views

Question about PBKDF salts and cryptographically secure randomness

I have seen a few answers here and elsewhere that say a salt doesn't need to be cryptographically secure randomness but rather just unique since they are stored in the open anyway. I am working on an ...
mirkaim's user avatar
  • 39
-1 votes
2 answers
681 views

Can I 100% trust the PBKDF2(HMAC-SHA256) AES-256 CBC encryption algorithm for file encryption purposes or not, and why? (Winrar) [closed]

I am not an expert in cryptography and therefore I would like to address this problem to people who have been working on this topic for a long time and thus verify the facts from several sources. I ...
Hasbo's user avatar
  • 13
1 vote
0 answers
85 views

Using a signature as key material

I am designing my first web3 app and I would like to use MetaMask as an identity and crypto provider. My web3 app will encrypt user data with AES-GCM, but I do not want to generate and store an ...
pinebitter's user avatar
2 votes
1 answer
419 views

Is there a test that put into numbers how secure a password hashing is?

As the question puts it: is there a test that can be done or a software that can be used, that is able to provide numbers/data to prove how secure a password hashing is? Say for example that I want to ...
Learning Bakpao's user avatar
0 votes
2 answers
91 views

Is a randomly generated long password more secure than a higher number of rounds in a PBKDF?

Usually the requirements for passwords are that they should be salted and use a high number of rounds. My understanding is: Salting a password is only used to prevent rainbow attacks Using a high ...
Kernel James's user avatar
1 vote
1 answer
1k views

Is AES GCM with PBKDF2 100k iterations still ok as of 2022?

Is using AES GCM with PBKDF2 and 100 000 iterations still considered secure as of 2022? In our threat model, if we ignore the risks linked to quantum computing, is this secure? Here is an example ...
Basj's user avatar
  • 543
1 vote
1 answer
618 views

Salt value in scrypt algorithm

I see there are a lot of questions relating to handling of a salt value but nothing I have seen so far has cleared the following question. When using a KDF such a scrypt, I believe the value of the ...
cjd's user avatar
  • 55
1 vote
2 answers
81 views

Is it reasonable to use DRBG and PBKDF together?

I want to generate a random number using DRBG with below follow: Entropy source -> DRBG -> PBKDF adding PBKDF is redundant ?
Andy's user avatar
  • 61
0 votes
1 answer
277 views

Selecting parameters for PBKDF2 using SHA3

I'm using PBKDF2 to generate an ED448 signing key, and I'm trying to figure out the optimal salt size for SHA-3. I recall reading a recommendation to use a salt size equal to the PRF's internal-state ...
user98919's user avatar
1 vote
1 answer
563 views

Where to store salt for PBKDF2 and initialization vector for AES via WebCrypto

I would like to build secure notes via javascript and webcrypto. I have found the possibilities to generate strong key via PBKDF2 and encrypt data via ...
Jenan's user avatar
  • 143
1 vote
1 answer
567 views

Which passphrase length is good so it's hard to break bitcoin's PBKDF2 key?

According to https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki#From_mnemonic_to_seed To create a binary seed from the mnemonic, we use the PBKDF2 function with a mnemonic sentence (in ...
Guerlando OCs's user avatar
1 vote
1 answer
318 views

To what degree does a high PKBDF-HMAC-SHA1 iteration count compensate for a weak passphrase entropy?

Lost a LUKS-encrypted laptop at the end of 2019 and now trying to figure out the odds of a very sophisticated attacker being able to break in. The LUKS container was created mid-2017 with LUKS1 ...
Peter_Python's user avatar
1 vote
1 answer
701 views

How to reverse engineer Salt from password, iterations, and key?

Let's say that a random key is derived using the following function (PBKDF2). key = fn(password, salt, iterations) Q1: How can I reverse engineer the salt from the ...
Sayan Pal's user avatar
  • 113
7 votes
2 answers
1k views

Do I need to sanitize user input to scrypt, or to PBKDF's in general?

I'd like to allow the user to supply a password as input to some PBKDF, which I will use to construct a key for file encryption (currently using aes-256-ctr. It may change as I learn more). I am ...
phoenixdown's user avatar
0 votes
0 answers
121 views

Managing master keys used in PBKDF2 and HMAC (store, rotate)

My use case: I have few master keys, I use each for a specific operation (e.g. one for encrypting user's data and another for creating JWT signatures etc...). I use these master keys in two specific ...
Mohammed Rady's user avatar
0 votes
1 answer
969 views

How secure is AES 256bitkey generated from PBKDF2

I am using CryptoJS AES 256 encryption: CryptoJS.AES.encrypt(realData, generateKey(passphrase), {iv: iv}); The secret is generated through: ...
Kim Mỹ's user avatar
  • 155
0 votes
1 answer
270 views

How to securly save ED25519 private key on hard drive

I am developing an application which stores user's private Identity key (ed 25519) on user's hard drive without any security. What are the best practices / standards to save private key on hard drive, ...
Eirtaza's user avatar
0 votes
0 answers
82 views

PBKDF2 Rounds Implementation Question?

Currently I am working on a implementation of PBKDF2 for an embedded microcontroller. My question is that my psuedo-random function is fixed (SHA-512 HMAC) how do perform 'rounds' of encryption? I am ...
Russeree's user avatar
1 vote
0 answers
319 views

E2E Encryption w/ PBKDF2 + AES-GCM

I'm currently developing a product that requires user data to be encrypted on the client side. The product is a web app + a browser extension, so the focus is encrypting user data with Javascript. The ...
diogominhava's user avatar
1 vote
1 answer
432 views

Best practise for encryption in a password manager

I'm trying to make a password manager for Windows installed computers, and after researching the best ways to encrypt the passwords in the database (I'm new to cryptography) I think I've come up with ...
user86121's user avatar
1 vote
2 answers
302 views

Static salt for PBKDF2, but unique salt for HKDF?

Hypothetical. Lets say you have an application where you generate a master key from a user password using PBKDF2 (static salt) and then use the master key to derive two passwords keys for an encrypt-...
Chris_F's user avatar
  • 179
3 votes
1 answer
341 views

Is PBKDF2 with 1 iteration acceptable for a simple random key expansion?

I have a 128 bit randomly generated key. I need to expand this key to 512 bits to use with an existing encryption library that does AES-256 encryption in CBC mode with HMAC-SHA256 authentication. The ...
izzle's user avatar
  • 581
2 votes
1 answer
258 views

PBKDF2-HMAC Collisions

Trying to understand the well known property of these collisions when used with SHA1, SHA256, etc. where a given key is larger than the block size of the digest function. In these cases the smaller of ...
liam's user avatar
  • 21
2 votes
1 answer
457 views

Random salt and PBKDF2 key

Suppose I wrote a function $$(salt,IV ) = \text{keyIVGenerator}(passwd)$$ which generates a random salt of size 32-bytes and a random Initialisation Vector (IV) of size 16-bytes. Then, use a Key ...
bro's user avatar
  • 23
3 votes
1 answer
185 views

Why does PBKDF2 use HMAC?

When I learn PBKDF2, I found out most of the articles say that the PBKDF2 use HMAC as PRF. Why is HMAC? Can I use other pseudorandom functions? Is HMAC safer than any other functions for PBKDF2?
user83796's user avatar
1 vote
1 answer
63 views

Issue with decrypting self-coded AES

Summary: As a trainee, I got the task to extract encrypted passwords of our external password manager (Zoho Vault) and decrypt them. The documentation regarding how to decrpyt them is...none. I ask ...
Merz's user avatar
  • 11
0 votes
0 answers
115 views

Client-Side Encryption for a small app

I'm designing a small personal journal web application for my wife. I'm a crypto newb, but I want her to feel secure knowing only she will have access to her journal entries. I am thinking of the ...
Wolt's user avatar
  • 1
2 votes
1 answer
136 views

Generate AES key from weak string

I'm trying to generate AES256 key from user input password. The size of the password can be anything from 4 bytes long to 32 bytes long but let's assume it is the smaller one. My API support either : ...
user81531's user avatar
2 votes
1 answer
61 views

What are the randomness requirements for inputs to PBKDF2?

I need to generate one 160-bit HMAC-SHA1 key for each user in my system. Can I use the username as the input to PBKDF2 function to generate the key? Is it safe to use known values like username as ...
Lone Learner's user avatar
2 votes
0 answers
112 views

Content Key Encryption for Multi-User data access

I recently worked out a concept for a use-case, but I'm not sure if my approach is good enough. So I would appreciate feedback and things to look out for, as I'm fairly new to this field. A User can ...
MultiUserDude's user avatar
-1 votes
1 answer
116 views

Are there issues in how cryptography is used in this short code sample?

I want to encrypt some small text files so I can put them online, in non-restricted access (not the best idea, but it's cheap and simple). I know I should use something like Truecrypt instead of this, ...
jokoon's user avatar
  • 703
1 vote
0 answers
38 views

AES implementation for non-password multi-document decryption usecase

I am trying to encrypt/decrypt multiple user documents (consider text) in an application. Unlike the use case of passwords where decryption happens once during an API call, in this application during ...
Shubham Chaudhary's user avatar
6 votes
1 answer
846 views

Is it necessary to stretch/derive an AES key when I already have enough bytes from a 'cryptographically secure RNG'?

I'm using AES-CBC-256 with PKCS#7 compatible padding. I already have 32 bytes that come from a 'cryptographically secure random number generator'. In this scenario, does it make sense to use PBKDF2 to ...
wujek's user avatar
  • 175

1
2 3 4 5 6