Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [key-derivation]

In cryptography, a key derivation function (or KDF) derives one or more secret keys from a secret value such as a master key or other known information such as a password or passphrase using a pseudo-random function. Keyed cryptographic hash functions are popular examples of pseudo-random functions used for key derivation.

0
votes
0answers
49 views

Per-account iteration count for key derivation functions?

I'm working on an open protocol for the standardization of notes at my website “standardnotes.org”. Notes should be encrypted on the client device based on a key derived from the user's password. ...
9
votes
1answer
455 views

Can someone clarify two things about the HKDF by Krawczyk?

I got a question about the HKDF Scheme by Hugo Krawczyk. On the following link you can find a small explanation of the HKDF-Scheme and some short informations. The HKDF specification itself has been ...
1
vote
1answer
65 views

Special equivalent key in symmetric encryption

Let $k$ and $k'$ be two keys of symmetric encryption such that for some $m$ we have $ Enc_k(m)=Enc_{k'}(m)$. Is it possible to exist a plain text $m'$ such that $Enc_k(m') \neq Enc_{k'}(m')$. In fact,...
2
votes
1answer
273 views

How to securely combine multiple sources of entropy?

Suppose that I have $n$ secure 32-bit keys that were generated separately using methods that are known to be secure. For example, one of them might have been generated by using a proven CSPRNG. ...
5
votes
3answers
940 views

Derive a key from a password and another key?

I would like to encrypt some data using a password. I want to use a function like PBKDF2 to turn my password into a key. However, I would like to also require a keyfile, for added security. My data ...
-3
votes
2answers
285 views

Very simple, very memory-hard (?) password-based key derivation

I know the problem of memory-hard password-based key derivation functions is better left to the likes of scrypt, argon2, etc... But validated implementations of those algorithims are not always ...
4
votes
1answer
136 views

Cryptsetup | Given Enough Passphrase Entropy, Is It Necessary To Use a High Iteration Count?

Let's assume that, for creating a LUKS volume, I generate a random, 40 character passphrase that includes numbers, symbols, and upper and lower case letters, using the ...
13
votes
1answer
6k views

Is there any benefit from using SHA-512 over SHA-256 when AES just truncates it anyway?

I am still not very clear on how AES-256-CBC can use SHA-512 bit keys, but I assume that it just truncates the 512bit hash down to 256bit. In software like GnuPG and OpenPGP, is there any real benefit ...
6
votes
1answer
914 views

Is deriving the IV from the password secure?

I came across an encryption scheme to encrypt files with AES-256. You can see the initialization of the decryption routine below: ...
4
votes
1answer
824 views

Difference between RFC-5869 (HKDF) and SP800-108 (Nist's HMAC-based KDF spec)?

I'm trying to find the difference between the two aforementioned algorithms. It seems that one is either a subset of the other. Could someone explain the similarities/differences?
0
votes
0answers
75 views

How are round keys scheduled and generated in Crypto.Cipher.AES which is in Pycrypto library?

I'm just starting to learn to use PyCrypto. It would be really helpful for me to know how the round keys are scheduled and generated in the Crypto.Cipher.AES (in PyCrypto). Do they use any specific ...
1
vote
1answer
162 views

What are the typical input lengths for KDFs?

I am looking for typical input lengths for key derivation functions like the HKDF. I know the parameters of HKDF, but can not find any information about typical input sizes to HKDF or any of the other ...
4
votes
1answer
480 views

What is the difference between KDFs for key derivation vs password stretching?

This was mentioned in the comments to another question: To clarify: This is about key-stretching KDFs. Not the kind for diversifying keys (eg. HKDF) and There are two kinds of KDF, the slow, ...
0
votes
1answer
59 views

Key Prefix KDF with Counter

I don't want to discuss the security problem with MD-based hashfunctions when using them as KDF. Since the existence of SHA3 or Skein hashfunction it is possible to use them as key prefix KDF. What I ...
4
votes
1answer
53 views

Desirable Property of Block Sub-Keys

What is the more desirable for a block cipher's sub-keys ? Given two blocks ciphers, letting all other properties be equal (they have the same strength), the only difference between them is that: ...
2
votes
1answer
92 views

Is there an algorithm to derive a 1-of-N shared secret from a set of N private keys?

This is different from Shamir's Secret Sharing in that we are starting with the keys and deriving a shared secret, rather than the other way around. Let me be more precise: We are given keys $k_1, \...
8
votes
2answers
9k views

Key derivation functions (KDF): What are? Main purposes? How can they be used?

What are KDFs? What are their main purposes? How they can be used, in other words, what's their drill in a cryptography scheme?
14
votes
3answers
616 views

Is it better to maximize memory usage or number of passes with Argon2i 1.3?

I wrote a small application that uses Argon2i for deriving symmetric keys for encryption of local files and secret Curve25519 keys. Argon2i v1.3 is susceptible to TMTO attacks if the number of passes ...
1
vote
1answer
177 views

PKCS12 key derivation

In older versions of PKCS#12 there was a key derivation function that, near as I can tell, isn't used anywhere outside of that standard: https://tools.ietf.org/html/rfc7292#appendix-B That discusses ...
1
vote
0answers
1k views

What is the use of key iterations?

I read about PBKDF2 on Wikipedia and seen few apps. having option to manually enter number of iterations. I am still not clear on this. (1) With what I understood, key iterations can be used only ...
1
vote
0answers
41 views

Using multiple iterations of Argon2i

Consider Argon2i used as a key derivation function (implemented by the libsodium crypto library) to derive an encryption key from a password. Additionally, when entering the password a second time, ...
8
votes
3answers
4k views

How many KDF rounds for an SSH key?

What is the best practice on choosing how many key derivation function (KDF) rounds/iterations when generating an SSH key pair? Am I correct in saying that it is unnecessary if the passphrase is ...
2
votes
1answer
88 views

Using only pseudorandom function to drive many deterministic keys

My question is related to: Can Pseudorandom values be used as secure keys? But here I'm only using pseudorandom function. Assume we have a pseudorandom function, $PRF$. We have a truly random ...
6
votes
1answer
361 views

Ephemeral Encryption Keys

My understanding is, ignoring implementation details, iOS disk encryption works like this: On boot (and/or every time you unlock your phone) an ephemeral session key is created that can decrypt ...
1
vote
3answers
128 views

Function to derive an integer from a given password

I need to get an int, derived by a given password, to feed it to a deterministic PRNG as a seed. The derived int should not give away any clues about the password. How can I achieve this without ...
2
votes
1answer
448 views

AES vs AES-CMAC for session key derivation

Assume two parties have exchanged a secret 128-bit Master Key, MK. When the two parties want to communicate, one of them generates a random 128-bit value, R, which is then sent in plaintext to the ...
2
votes
1answer
2k views

Generating passwords using Password-Based Key Derivation Function

I was thinking of using different and independent password for different websites, but not storing them in some password manager so I don't need to backup the passwords. I thought I could use some ...
1
vote
2answers
630 views

security of using digital signature as key derivation material

I want all keys in my iOS application to rely on the Secure Enclave for security as the iOS keychain becomes insecure on jailbroken devices. Currently, the Secure Enclave currently only supports ...
8
votes
2answers
520 views

Are there key-derivation functions that are safe to use in parallel on the same secret?

I'm considering using a key-derivation scheme for generating multiple keys from the same user secret. It is important that given all but one of these derived keys, it is not feasible to calculate the ...
12
votes
2answers
1k views

Can any MAC be used as a KDF?

First, let me clarify what I mean with a Key Derivation Function (KDF). I'm interested in KDFs that take an $n$-bit symmetric master key and some diversification data of arbitrary length as input and ...
1
vote
0answers
56 views

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

I was reading "A Convenient Method for Securely Managing Passwords, Halderman et al., 2005". In short, the authors say to do the following: ...
6
votes
2answers
268 views

Are there any high level memory-hard PBKDF constructions?

The PBKDF2 construction from PKCS #5 v2 has the convenient feature that it can be implemented using only standard interchangeable cryptographic primitives. Specifically, it only requires the ...
2
votes
1answer
45 views

Older key as PGP subkey?

Currently I have a 2048-bit PGP key. Suppose I create a new 4096-bit key. Can I add that old key as a subkey of this new one?
7
votes
2answers
5k views

What are KDF parameters in OpenSSL command-line utility for `enc`?

I refer to https://www.openssl.org/docs/manmaster/apps/enc.html and see that the only parameter for key derivation which I can set explicitly (not considering the obvious ...
4
votes
1answer
273 views

Key derivation with Curve25519 for data encryption

I'm new when it comes to cryptography so this question might be a little bit stupid: Can I derive a key with Curve25519 from a (let's say) root key and encrypt the file with a secret key algorithm? ...
3
votes
1answer
102 views

Master keys' strengh

If I am going to use a master key to generate a session key, why the master key must be "stronger" than the session key? Like should not be distributing 128-bit AES keys derived from a 56-bit DES key....
1
vote
1answer
64 views

How do two parties put together the AUTH data in the SKEME protocol?

SKEME is a Key Exchange protocol used in the Internet Key Exchange (IKE). It contains three phases: SHARE, EXCH, and ...
1
vote
1answer
514 views

AES GCM encryption, authentication and PBKDF2

I'm developing a kind of secret vault server application. The basic principle is similar to DPAPI where each secret will have its own unique random KEY/IV pair and and that KEY/IV pair will be ...
5
votes
2answers
674 views

Can CMAC be used as a 128bit Key Derivation Function?

I want to derive a key a number of times for a deterministic scenario, where I can get n keys from a single one. The logic looks something like this: ...
1
vote
1answer
124 views

Is it safe to use fast/small hash for key identity?

I have to roll database access keys often, but it's important to know which key each system is using in order to avoid unavailability. I want the systems to report that without exposing the key itself,...
5
votes
0answers
82 views

Is correlation in vector distributions “dangerous”?

Consider the two vector distributions $\xi,\chi$ described below, each one outputting integer vectors of length $n$ with coefficients in $\{0,\dots,n\}$. Distribution $\xi$ samples each coefficient $...
2
votes
2answers
122 views

Key management and derivation - Allow changing of the passphrase

I'm working on a program, which allows encrypting files before storing it on a cloud service. Currently I'm trying to figure out how to derive and store the keys. First, I wanted to use a simple ...
2
votes
1answer
444 views

SHA256(RsaPrivateKey) == AES key?

I have an RSA private key (more specifically, an SSH key in Putty format, 4096bit) and want to use its SHA256 hash as an AES256 key, instead of using an independent newly generated AES key. Are ...
1
vote
2answers
391 views

What is transaction capacity of a POS using 3DES DUKPT?

I am looking for the transaction capacity of a Point-Of-Sale device using 3DES DUKPT. Once all keys derived from the future key set are exhausted (1M or 500K?), how will the POS be reloaded with a new ...
1
vote
1answer
697 views

Can I always derive a key pair from password+salt with libsodium?

I'm using libsodium to create public/secret key pairs from a password and salt combination by using crypto_pwhash_scryptsalsa208sha256 to generate a seed and ...
3
votes
1answer
962 views

Deriving AES key and HMAC key from shorter master key

I am working in .NET and as far as I can tell the only choice for key derivation is PBKDF2-HMAC-SHA1. SHA1's output size is only 160 bits. But I am implementing authenticated encryption and thus ...
0
votes
0answers
136 views

key hierarchy management and master key

I have this equation, $E_{K_{as}}(E_{K_{bs}}(K_{ab}))$ which means $K_{ab}$ is encrypted by $K_{bs}$ then whole packet is encrypted by $K_{as}$. I think the key structure is $K_{as}$ is the master ...
1
vote
1answer
364 views

Key Hierarchy and key Encryption

If i have two 56-bit DES keys, and I use these two key to encrypt a 256-bit AES key. Like this $K_{AT}$ encrypts $K_{BT}$ and $K_{BT}$ encrypts $K$ What is the effective security of key $K$? Is it $...
3
votes
1answer
100 views

Security implication of deriving key with fixed salt for files authentication

Context: I need to calculate MAC for a collection of files just for future integrity and authentication verification. This is the conceptual order of steps: Derive a 64 bytes key from user input ...
1
vote
1answer
56 views

Encryption strength when using a PBKDF

Suppose: $m$ is a positive integer. $n=2 \times m$. $H: \{0,1\}^{*} \rightarrow \{0,1\}^n$. $p$ is a password. $s$ is a salt. $K=\{0,1\}^n$ is the derived key. $PBKDF(p,s)$ derives a key from $p$ and ...