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
1 answer
49 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 ...
user avatar
  • 175
0 votes
1 answer
75 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 ...
user avatar
0 votes
1 answer
42 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 ...
user avatar
0 votes
1 answer
179 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 ...
user avatar
  • 990
0 votes
1 answer
119 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 ...
user avatar
0 votes
0 answers
169 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 ...
user avatar
0 votes
1 answer
179 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 ...
user avatar
  • 135
1 vote
1 answer
140 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............
user avatar
2 votes
2 answers
256 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 ...
user avatar
0 votes
0 answers
122 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 ...
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
641 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 ...
user avatar
1 vote
1 answer
191 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 ...
user avatar
6 votes
5 answers
1k 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 ...
user avatar
  • 161
1 vote
2 answers
205 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 ...
user avatar
  • 111
3 votes
2 answers
459 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 ...
user avatar
  • 173
1 vote
1 answer
598 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?
user avatar
  • 405
1 vote
1 answer
203 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.
user avatar
  • 23
1 vote
1 answer
163 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?
user avatar
  • 267
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: ...
user avatar
  • 225
0 votes
0 answers
168 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 ...
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 ...
user avatar
  • 133
1 vote
1 answer
191 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 ...
user avatar
  • 11
7 votes
1 answer
3k 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 ...
user avatar
  • 361
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,...
user avatar
  • 41
5 votes
3 answers
336 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 ...
user avatar
5 votes
1 answer
508 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 ...
user avatar
  • 225
1 vote
1 answer
88 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, ...
user avatar
14 votes
2 answers
3k 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. ...
user avatar
  • 4,602
1 vote
1 answer
442 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 ...
user avatar
  • 301
8 votes
2 answers
7k 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 ...
user avatar
  • 301
2 votes
2 answers
259 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 ...
user avatar
  • 135
0 votes
0 answers
372 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. ...
user avatar
  • 6,695