Questions tagged [kdf]

A key derivation function (KDF) is a function used to derive an encryption key from a password.

Filter by
Sorted by
Tagged with
0 votes
0 answers
168 views

KDF vs hash function in loop for hashing password

I'm trying to grasp which benefit can KDF like PBKDF2, scrypt and bcrypt (I know that bcrypt is technically not KDF) may bring over hashing in loop like sha256sum(sha256sum(sha256sum.....(salt + ...
Ghost Rider's user avatar
0 votes
1 answer
89 views

Key derivation for password manager backup?

Backing up your password manager is a good idea in case your house burns down, but where do you store the password to the off-site backup? Remembering the master password is easy, but re-using the ...
Fax's user avatar
  • 185
0 votes
1 answer
114 views

Verify password before decrypting data

I need to verify a password before decrypting the data. My encrypted data is too big and waiting to see if the authentication tag is correct is out of the question. I’m using Argon2id as my KDF. My ...
Bernardo1r's user avatar
1 vote
1 answer
238 views

SCrypt's goal and the role its salt plays

Am I right in stating that SCrypt as an algorithm is useful where many passwords are stored in a database, but not against one specific encryption key derived from one password of one user? For ...
Neev Penkar's user avatar
0 votes
1 answer
418 views

Use PBKDF2 for both authentication and decryption on NodeJS

I am using PBKDF2 on NodeJS to authenticate a user who submits username & password. To do this, when the user first registers, I generate a salt, I use 200000 iterations, I specify a key length of ...
vrtjason's user avatar
  • 1,125
0 votes
1 answer
218 views

TLS 1.3 HKDF-Expand references to Hello messages

I am looking into TLS 1.3 implementations and am a little confused about what is being referenced in the HKDF functions. Specifically the last argument in the Dervice_Secret wrapper function. From RFC ...
Liam Kelly's user avatar
0 votes
0 answers
320 views

Parameters for HSM based symmetric Key Derivation Function (KDF)

I have a quick question regarding parameters for HSM based symmetric Key Derivation. My situation is that I have to implement HSM based symmetric key derivation for encryption of sensitive data to be ...
Nezhull's user avatar
0 votes
1 answer
292 views

Can a salt be a random ASCII string or be derived from one?

I'm using a KDF (PBKDF2HMAC) to generate a Fernet key from a given password, but to do so I also need to generate and store a salt. import base64 import os from cryptography.fernet import ...
villasv's user avatar
  • 135
1 vote
1 answer
183 views

Argon2id key derivation rate calculation question

Just wanted to know if this was an accurate way of determining how long it would take someone with an 8GB GPU to derive 1 million keys using some assumed parameters below: Time per derivation............
Guy Bartkus's user avatar
2 votes
2 answers
294 views

File encryption allowing changing password

My app needs to work with encrypted user files on their devices. It should keep the data secret when someone gets hold of the device. For this, I'm thinking about the following schema (which may be ...
maaartinus's user avatar
0 votes
0 answers
172 views

Password authentication using a master key and KDF without storing password

I want to make a service stateless(has no data to store or mantain). But the service shoule be able to authenticate user. What I'm considering is using key derivation function with a shared master ...
user2828102's user avatar
7 votes
3 answers
2k views

Why are KDFs slow? Is using a KDF more secure than using the original secret?

According to the Wikipedia page for key derivation functions, a KDF's purpose is to derive a secret key for cryptography: In cryptography, a key derivation function (KDF) derives one or more secret ...
user avatar
1 vote
2 answers
1k views

Most secure algorithms for KDF and Public Key Encryption [duplicate]

I'm developing an application which will need to derive a private/public key pair from a user provided password, and then use the public key to encrypt some text (up to 1000 characters in length) such ...
vikarjramun's user avatar
1 vote
1 answer
276 views

How to encrypt user data in app using Google Sign-In

I am currently writing an application which needs to store user data encrypted in the database. One of the requirements is that some of the data stored in the database needs to be encrypted in a way ...
vikarjramun's user avatar
6 votes
5 answers
3k views

AES256 with 128 bit key

A popular zero-knowledge file sharing site uses a 128-bit master key for encryption. However, they claim to be using AES256. When questioned, they explained the master key is widened using PBKDF2 ...
Larry's user avatar
  • 161
1 vote
2 answers
287 views

Deriving 2 keys from user password - one for login - one for encryption? [duplicate]

Context We have a browser-based client-server application. The client registers with email and password. The password is enforced to some guidelines. Problem The User needs an encrypted vault on ...
Dachstein's user avatar
  • 111
3 votes
2 answers
605 views

How to choose between password derivation or encryption?

Suppose you use a password manager having all possible features of modern password managers: encryption with a key derived from your master password, auto-filling, cloud or local storage, browser ...
CidTori's user avatar
  • 183
3 votes
1 answer
1k views

When would one use a password hash instead of a KDF?

From what I'm reading, for storing passwords it is recommended to use a KDF (like Bcrypt). If it is more secure to use a KDF for handling passwords, when would you use a password hash instead?
VortixDev's user avatar
  • 435
1 vote
1 answer
278 views

How to find default S2K parameters in GPG

How can I find the default string-to-key parameters in GPG? I am using it in Tails.
Yang88's user avatar
  • 23
2 votes
1 answer
292 views

How can I find the default KDF for my version of GPG?

I am trying to find the default KDF for my version of gpg: gpg (GnuPG) 2.2.6 libgcrypt 1.8.2 Does anyone know how?
Patriot's user avatar
  • 297
7 votes
1 answer
2k views

Why brute-force the password instead of the key directly?

This answer on another question on security stackexchange by a very reputed user explains why he prefers GnuPG over OpenSSL for file encryption. From what I understand, it can be summarized as this: ...
Gradient's user avatar
  • 225
0 votes
0 answers
200 views

How to tune a KDF algorithm to protect a private key?

I need to protect a private key RSA-4096 with a key derived by a KDF algorithm. Instead of hiding any aspect of the algorithm I would like to tune it such that the key derivation is a proof of work ...
vidi's user avatar
  • 287
3 votes
1 answer
3k views

ECDH vs DH secret key size

In the past couple of weeks I have been reading about DH and ECDH which are key exchanging algorithm to compute a shared secret key. According to advices, it is better to use DH with key size 2048 ...
Hadi's user avatar
  • 133
1 vote
1 answer
211 views

Encryption for a system supporting only basic cryptographic functions [closed]

I am working on an encryption method between a server and multiple clients. The client hardware only supports basic encryption algorithms (Currently Aes 128-bits and HmacSha1). The hardware is too ...
david's user avatar
  • 11
7 votes
1 answer
6k views

Differences between LUKS and Veracrypt

These two FDE solutions are similar, but I noticed different executions speed: specially mounting a device it seems that Veracrypt takes more time decrypting it. So I would like to compare it with ...
refex's user avatar
  • 401
4 votes
0 answers
55 views

Password manager that uses a mix of long and short key derivation functions [duplicate]

I was reading "A Convenient Method for Securely Managing Passwords, Halderman et al., 2005". In short, the authors say to do the following: cache = very_long_key_derivation_function(salt,...
gw653's user avatar
  • 41
5 votes
3 answers
404 views

Encrypt Items With Single Key or Use KDF+Salt To Encrypt Each Item?

I'm currently planning the development of a system where extremely sensitive information for individual users would be stored. There are currently two approaches being discussed. In order to make it ...
Eric Scrivner's user avatar
5 votes
1 answer
621 views

Why is the Key Derivation Function important?

Let's consider this openssl command : openssl enc -aes-256-cbc -pass pass:PASSWORD Why is it important to have a good Key Derivation Function? This answer to another question suggest that GnuPG is ...
Gradient's user avatar
  • 225
1 vote
1 answer
109 views

One Input Two Hashes

Suppose I have some password x, and two different hash functions h1 and h2. I can then compute the hash y1 = h1(x) and y2 = h2(x). Is there any sort of vulnerability in this case? More specifically, ...
nehcsivart's user avatar
14 votes
2 answers
4k views

Is KeePass's method for key derivation secure?

I'm familiar with how key derivation functions can be used to slow down brute force attacks against passwords by requiring significant computational and/or memory resources to compute the final key. ...
Ajedi32's user avatar
  • 4,763
1 vote
1 answer
618 views

Is there any problem using empty salts with PBDKF for this purpose?

The aim is to generate a secure key for symmetric encryption. I have a master password, from which I want to generate the key for symmetric encryption, in order to encrypt other passwords. The idea ...
Julen's user avatar
  • 351
13 votes
2 answers
9k views

What is the difference between Key Derivation Function and (salted) Hash?

I see in this post that the main difference is that KDF outputs have "certain randomness properties", and I don't understand what does it mean. Suposing that that "certain randomness properties" are ...
Julen's user avatar
  • 351
2 votes
2 answers
278 views

Is it okay if passphrases to KDFs are "predictable"

I'm looking to do file encryption for small amounts of text (8-100 characters for each item being encrypted). Here's what I have: A secret passphrase and a salt. I Use Rijndael to generate a key and ...
ashic's user avatar
  • 135
0 votes
0 answers
488 views

Understanding the application of hashes, HMACs, and KDFs

I think that I understand the right application cases for the following crypto functions, but I'd like to confirm my understanding and also propagate the safe use of crypto throughout the intertubes. ...
Naftuli Kay's user avatar
  • 6,763