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
1answer
64 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 ...
0
votes
1answer
58 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
2answers
203 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
0answers
61 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
3answers
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
2answers
167 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 ...
0
votes
1answer
63 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 ...
5
votes
5answers
573 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
2answers
135 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
2answers
277 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 ...
0
votes
1answer
333 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
1answer
109 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.
1
vote
1answer
81 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?
6
votes
1answer
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
0answers
130 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
1answer
1k 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
1answer
157 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 ...
6
votes
1answer
1k 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
0answers
54 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
3answers
250 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
1answer
403 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
1answer
53 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, ...
13
votes
2answers
2k 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
1answer
245 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 ...
3
votes
1answer
4k 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
2answers
220 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
0answers
268 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. ...