Questions tagged [kdf]
A key derivation function (KDF) is a function used to derive an encryption key from a password.
34
questions
0
votes
0
answers
66
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 + ...
0
votes
1
answer
52
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 ...
0
votes
1
answer
78
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 ...
1
vote
1
answer
90
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 ...
0
votes
1
answer
252
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 ...
0
votes
1
answer
154
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 ...
0
votes
0
answers
215
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 ...
0
votes
1
answer
221
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 ...
1
vote
1
answer
152
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............
2
votes
2
answers
257
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 ...
0
votes
0
answers
127
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 ...
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 ...
1
vote
2
answers
804
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 ...
1
vote
1
answer
234
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 ...
6
votes
5
answers
2k
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 ...
1
vote
2
answers
226
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 ...
3
votes
2
answers
499
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 ...
3
votes
1
answer
704
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?
1
vote
1
answer
236
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.
2
votes
1
answer
213
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?
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:
...
0
votes
0
answers
175
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 ...
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 ...
1
vote
1
answer
192
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 ...
7
votes
1
answer
5k
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 ...
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,...
5
votes
3
answers
357
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 ...
5
votes
1
answer
540
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 ...
1
vote
1
answer
90
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, ...
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.
...
1
vote
1
answer
505
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 ...
9
votes
2
answers
8k
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 ...
2
votes
2
answers
262
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 ...
0
votes
0
answers
410
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. ...