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 ...

learn more… | top users | synonyms (1)

3
votes
1answer
39 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 ...
1
vote
1answer
19 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 ...
0
votes
1answer
53 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 ...
0
votes
1answer
45 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 ...
1
vote
1answer
47 views

Does a key derivation function always generate an even distribution of bits in the resulting key?

I am a student of crypto. During our study course, we went into the AES-128 algorithm. All the examples given used an initial key k, 128 bits and we only briefly touched on the key derivation of ...
3
votes
2answers
71 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
39 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 ...
4
votes
0answers
72 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 ...
0
votes
1answer
61 views

Key derivation using the main AES encryption key and some plain text

I am using AES 128 bit encryption in java. I have an encryption key and 10 digit plain text. I want to derive a key for HMAC using the AES encryption key and the 10 digit plain text. This plain text ...
1
vote
2answers
47 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 ...
0
votes
0answers
26 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 ...
5
votes
2answers
8k views

AES encryption using a Diffie-Hellman key exchange

I have two systems which need to encrypt their communication by AES-128. The key for the AES encryption should be exchanged with the Diffie-Hellman (DH) algorithm. Now, I've read about DH and got a ...
1
vote
1answer
67 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
1answer
50 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 ...
0
votes
0answers
25 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 ...
3
votes
1answer
74 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 ...
1
vote
1answer
42 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
30 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$ ...
5
votes
0answers
39 views

What's the reasoning behind the design of the TLS 1.2 PRF?

TLS 1.2 defines a PRF-like construction $P_{hash} : \{0,1\}^* \times \{0,1\}^* \rightarrow \{0,1\}^l$ for key derivation, etc. To quote the spec: We define a data expansion function, ...
58
votes
4answers
11k views

Why does the FBI ask Apple for help to decrypt an iPhone?

The current debate of the FBI trying to get Apple to assist in decrypting an iPhone made me wonder: Normally, upon turning on an iPhone, everything is decrypted using a 4-digit pin (or actually, a ...
6
votes
1answer
113 views

Big block cipher as memory-hard function

I'm wondering, if something like block cipher with big block size is a good memory-hard function? All memory-hard key derivation functions I've seen look more complex than that, which made me ...
3
votes
1answer
69 views

Single public key for NaCL signing and encryption?

Bob wants to use NaCL (specifically the Python NaCL library) to both a) sign some publically available plaintext for anybody to authenticate as being written by Bob and b) encrypt some other secret ...
4
votes
1answer
472 views

Why is it a bad idea to use a UTF-8 derived symmetric key?

Given a cryptographically secure series of octets, it is often useful to display this information or store it in a database in a textual format such as hexadecimal. Why would it be incorrect to take ...
2
votes
0answers
64 views

Bitwise method of generating r for RSA-KEM

It seems that RSA-KEM has a very troublesome method of generating the secret $r$. It seems that the random value needs to be in the range $0 \le r \le {n - 1}$. Now most cryptographic environments ...
0
votes
0answers
59 views

Why is it so hard to make a good KDF?

Why are we stuck with only 2-3 KDF functions since KDFs don't imply mathematically conceiving a cryptographic primitive like the inner workings of AES or SHA but instead build a system out of existing ...
0
votes
0answers
35 views

Key diversification is a good alternative?

This is just a concept question that I need to clarify, I know that you can use key diversification as an alternative to store different symmetric keys in a database. Key diversification uses a ...
4
votes
1answer
153 views

Yubico's take on U2F key wrapping

I've been reading up on Yubico's implementation of U2F. What I understand so far is that two things are calculated. So upon registration first you calculate a private key by $PrivateKey = ...
7
votes
1answer
1k views

How to salt PBKDF2, when generating both an AES key and a HMAC key for Encrypt then MAC?

When using Encrypt-then-MAC with AES and HMAC by password, and given 128 bits of payload with the ciphertext to store a random salt, which would be more secure: Using PBKDF2 with then entire 128 bit ...
1
vote
1answer
32 views

Building multiple keys from the same input using a KDF [duplicate]

Let's say I have a single secret with high entropy, S, for the entire application. I want to generate keys K1, K2 for 2 ...
4
votes
1answer
194 views

Is it safe to derive a password from a signature provided by ssh-agent?

I'd like to use a password-based system on a remote host (accessed via SSH) without having to copy-and-paste the password and without storing it on disk. Using the system with some other form of ...
-1
votes
1answer
38 views

Can shuffling plaintext produce a useable key?

If I 'shuffle' the characters in a long text, is there some number of shuffles that will produce apparent randomness approaching a cryptographically secure random number generator? A chapter in a ...
1
vote
1answer
48 views

Could a key derivation function be used to encrypt data with a weaker key?

To allow the key to be more easily remembered. Example: To encrypt a hard drive without having a remember a key with 128 bits of entropy. From what I find they seem mostly used to hash passwords so ...
1
vote
2answers
156 views

PHP AES 256 CBC faster than AES 128 CBC? Or am I doing something wrong?

for last couple of days I'm learning a bit about encrypting data in PHP, as I need a good encryption/decryption function for storing user's passwords in DB. I use ...
0
votes
0answers
23 views

NIST SP800-108 KDF modes comparison

According to NIST SP800-108, there are three modes that can build KDF from PRF: counter mode, feedback mode and double-pipeline iteration mode. Assume that the same PRF and input distribution are ...
2
votes
1answer
176 views

Mathematical formula for switching the key for OTP?

Instead of generating the random key for the one time pad cipher over and over again, is there a mathematical formula that allows you to switch the key to a new key? The new key must be as random and ...
6
votes
1answer
251 views

Is it OK to use a data-encryption key for key wrapping, too?

Our industry (area of cheap networked devices) has a standard that defines the usage of keys for both authentication and encryption using EAX mode of AES. This standard does not define key management, ...
5
votes
4answers
350 views

Get permutations from password

Are there any "good" ways to get a permutation from a password/pass-phrase? If one, for example, wanted to get a permutation of letters from a password, how might one do that in a smart way? I would ...
1
vote
0answers
41 views

Need help with PKCS#12 3 key triple des key expansion

I am trying to decrypt PKCS8-Shrouded Key Bag inside a PKCS#12 pfx file. The oid for the encrypted data is PbeWithSHAAnd3-KeyTripleDES CBC. Iteration count and salt has been provided within the pfx ...
2
votes
1answer
2k views

DES Key Schedule Algorithm

Reading through the DES Specification it says that the keys are permuted with PC-1 initially and then shifted left both $C$ and $D$. However, before it gets ...
1
vote
1answer
87 views

Cycling hashing in PBKDF's and their limitations in strength?

I hope this question isn't too similar to one that's already been asked. I also want to point out I know part the answer already, AFAIK: I just want some expert input on this. Let's model a hash that ...
3
votes
1answer
63 views

Faster alternative to HKDF

HKDF is used in one of my projects to derive separate keys from a common master key. But profiling has shown it to be the performance bottleneck under certain circumstances. Is there any faster ...
4
votes
1answer
137 views

Private and Public Keys

I have a very basic understanding of encryption and the encapsulation process, but for the life of me I can't grasp how public keys and private keys work, how they're made, and how they're exchanged. ...
1
vote
1answer
94 views

Would it be better to use HKDF or SCrypt for deriving a child key?

Okay so I'm trying to derive a child public key from an EC public key. I've come up with a couple ideas and now I'd like to know which is more secure. Mp: The master key pair, this includes a ...
6
votes
2answers
724 views

On AES, is a true random string enough for a key?

The string (32 ASCII characters) is entered by a human, and considered truly random. Should a key derive from this string, or it is secure to use this string as a key directly? In other words, does ...
2
votes
1answer
58 views

NMaster key from n secret key

I have to derive master key from N secret key. With the help of master key, i can collect all the secret keys which is used to derive master key. key1, key2,..keyN ==> single master key and single ...
0
votes
0answers
23 views

Symmetrical Block Encryption with Synchronised Remote Key Change

I'm considering a theoretical design of a walkie talkie, with strong encryption. My current idea is to use symmetrical block encryption, but with the key changing at regular time intervals without a ...
3
votes
1answer
66 views

Memory hardness of key derivation function through XOR-ring multiple matrix values

For theoretical purposes in order to enhance my own understanding, and NOT in order to create my own cryptography, I am asking a question about the memory-hardness of a key derivation function ...
2
votes
3answers
149 views

Memory hard key derivation (password hash) using AES encryption

I am restricted on a certain environment involving PHP and am currently unable to implement new memory hard hashes such as scrypt (and I am not trying to compete with the likes of scrypt). My ...
3
votes
1answer
97 views

Can Pseudorandom values be used as secure keys?

I want to derive $n$ keys from a master key. I pick a master key $mk$ and use pseudo-random function (PRF) to generate $n$ pseudo-random values, $v_i=PRF(mk,i)$ where $1\leq i \leq n$. Next, I use ...
2
votes
1answer
111 views

Key Derivation Function (KDF): Can a key derived from KDF be considered as a secure key?

Consider a case where we have a master key MS that is used in pseudo-random function to generate a set of pseudo-random values. Then we use key derivation function to derive a key from each of ...