Questions tagged [pbkdf]

A PBKDF is a Password Based Key Derivation Function, which can be used to derive key data or derive a "password hash" from a salt and password.

Filter by
Sorted by
Tagged with
1 vote
1 answer
64 views

Question about PBKDF salts and cryptographically secure randomness

I have seen a few answers here and elsewhere that say a salt doesn't need to be cryptographically secure randomness but rather just unique since they are stored in the open anyway. I am working on an ...
mirkaim's user avatar
  • 39
2 votes
1 answer
151 views

Is iterative sha256 adequate for local password manager?

I'm fairly entry-level crypto; not a cryptographer by any stretch... I am at the level of ability to implement most of the traditional packages in python; the hashlib hashes and EAS, ECDSA ...
litepresence's user avatar
1 vote
1 answer
159 views

Is using HMAC signature as a long-term password secure?

I'm considering implementing an authentication service without storing users' passwords/hash. I want to use a key derivation function with a corresponding username...
user2828102's user avatar
8 votes
2 answers
712 views

Key derivation on Arduino

The ATmega2560 is slow - it's a single core, 16MHz 8-bit AVR. Despite that, I need to use some encryption on it, and since it is limited to a few blocks, AES-256 can be used. However, the key ...
Dash's user avatar
  • 85
0 votes
1 answer
119 views

Multiplication instead of Key Derivation Function?

context In a one message communication. We are right after 2 DHKE (instead of one). Both users then have 2 secret numbers, J and K. question Is it a risk to replace the use of a Key Derivation ...
Kroma's user avatar
  • 235
5 votes
0 answers
135 views

Upgrading key derivation by adding an XOR with a known value

In general, keys for password-based key derivation are derived from a password hash such as the old PBKDF2 function or Argon2, possibly followed by another derivation function to derive data and ...
Maarten Bodewes's user avatar
  • 90.2k
4 votes
1 answer
130 views

PBKDF security if all but one keys are exposed

I'm trying to understand the security of KDF but stuck with PBKDF case (case 3). Suppose, we have the following settings: $KDF(SK,salt_1) \rightarrow k_1$ $KDF(SK,salt_2) \rightarrow k_2$ The ...
pintor's user avatar
  • 528
0 votes
1 answer
115 views

Is clientside encryption to hide data from server safe when using SSL?

I want to clarify right off that bat that I am using the SSL/TLS protocol on top of this, so I am NOT trying to implement my own protocol to send data securely. I simply want the server to be unable ...
Nathan Yan's user avatar
18 votes
2 answers
2k views

Password hash that can be upgraded without plaintext password

Most password hashes have a cost parameter that indicates how long the algorithm should take. Is there an algorithm where you can increase that cost for a particular hash, without access to the ...
Sjoerd's user avatar
  • 596
1 vote
2 answers
245 views

Is there an advantage to "weak" hashing and stretching over strong hashing?

Is there any sort of practical advantage to using a stretching algorithm such as PBKDF2 on say SHA256 over a straight SHA512 hash? If the purpose of key stretching is to increase the length and ...
Ambluj's user avatar
  • 25
1 vote
1 answer
1k views

Key Derivation Function (KDF) usage for password storage

Is it safe to use a KDF implementation in order to store passwords? More broadly, is this standard? Do IT-companies really use KDF? Or do they usually rely on other algorithms? If you have any ...
Tiency's user avatar
  • 31
1 vote
1 answer
1k views

HMAC vs PKDBF2 as the first step towards HKDF

I'm implementing an application that from a password has to derive two keys, one for authentication with the server, one for encryption. I'm using Java, with JCA and Bouncy Castle. So far, to ...
pupeno's user avatar
  • 125
2 votes
1 answer
317 views

Is there a security risk associated with using a PBKDF for an AES encryption key and Sha256 for a hash using the same password text?

I am writing an encryption program using C#. My goal is to secure files even if the computer is stolen and somehow logged into. Assumptions The code used to write the program is visible to a ...
Tyler Pantuso's user avatar
8 votes
1 answer
2k views

Why does LastPass hash their passwords with PBKDF2 this way?

LastPass is a password manager that I am sure many of you are familiar with. I have been studying LastPass's source code a bit. From their FAQs and what I can gather from their source code, the way ...
izzle's user avatar
  • 571
5 votes
3 answers
2k 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 ...
Sam Smith's user avatar
2 votes
1 answer
431 views

Is there any use for PBKDF with empty password?

As the name suggests, password based key derivation functions are used for deriving a cryptographic key from, well, a password. Is there any use for PBKDFs with empty password? Does it give any ...
buc's user avatar
  • 123
1 vote
3 answers
275 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 ...
user avatar
2 votes
1 answer
3k 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 ...
maowtm's user avatar
  • 123
4 votes
1 answer
266 views

Encrypt a small amount of data with a password derived from PBKDF2

I have a small amount of data (about 128 bits) to secured with a strong password. I plan to run PBKDF2-SHA2-256 on the password and a 128 bit random salt to generate a 256 bit derived key. Then with ...
Con Suj's user avatar
  • 41
3 votes
1 answer
2k views

PBKDF2 without salt on 16 digit password

How secure would be to use PBKDF2 without salt (or with the same salt for all) with a 16 digits passwords that are unique and randomly generated (there can't be two identical)? Assuming an adversary ...
user1563721's user avatar
0 votes
1 answer
332 views

PBKDF2 with the same salt for all IDs

I have a unique identifiers that I would like to keep secure and provide information about it through tokens. These tokens should be verifiable after using the same algorithm on other end system with ...
user1563721's user avatar
6 votes
2 answers
604 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 ...
Ilmari Karonen's user avatar
8 votes
2 answers
11k 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 ...
A gee's user avatar
  • 83
1 vote
1 answer
64 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 ...
Melab's user avatar
  • 3,487
-1 votes
1 answer
2k views

Need CryptDeriveKey AES implementation in C#

I am integrating with 3rd party software that uses AES 128 encryption. I know this is not ideal, but the choice of encryption is up to the 3rd party software. I am using C#. My problem is in deriving ...
spectacularbob's user avatar
1 vote
1 answer
193 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 ...
Iam Nick's user avatar
  • 540
53 votes
1 answer
41k views

Password hashing security of argon2 versus bcrypt/PBKDF2?

I wonder if it can be approximated how much of a security margin the new argon2 hash, winner of the password hashing competition, can give over bcrypt or PBKDF2, for an attacker using large GPU ...
azren's user avatar
  • 741
2 votes
2 answers
275 views

How to generate backup key for PBKD functions?

I would like to encrypt some files using AES, Ill derive key from password using some standard PBKD function and use that as AES encryption key. My question is, if user forgets the main password, ...
michnovka's user avatar
  • 346
5 votes
2 answers
873 views

Memory-hard password-based key derivation functions?

How are memory hard functions designed for the purpose of password based key derivation? To protect against a brute force attack from a parallel machine. What design could work well with Skein? The ...
Brennan.Tobias's user avatar
3 votes
1 answer
315 views

Software interface for KDF and PBKDF?

I'm working on an implementation of Krawczyk and Eronen HKDF from RFC 5869. From Krawczyk's original paper, he identifies four inputs to a KDF in Cryptographic Extraction and Key Derivation: The HKDF ...
user avatar
5 votes
1 answer
507 views

Is there a tangible benefit in keeping the number of PBKDF iterations secret and not storing them with the ciphertext?

Suppose I have a local file and it is encrypted with a symmetric key derived from a strong passphrase, unique salt and $x$ number of PBKDF (e.g. Scrypt) iterations. I am interested in keeping this ...
itercryp's user avatar
1 vote
0 answers
70 views

Security of simple Skein PBKDF mentioned in the paper

From the Skein 1.3 paper section 4.8, Skein as a Password-Based Key Derivation Function (PBKDF), it mentions the following as a simple PBKDF (S = seed and P = password): An even simpler PBKDF is to ...
504811E's user avatar
  • 41
3 votes
2 answers
1k views

Replacing the PRF in PBKDF2 with Keccak

I am unable to find a reliable, tested library for a decent password based key derivation function e.g. Scrypt in the programming language I am using, but I have a reliable library for PBKDF2 (which ...
504811E's user avatar
  • 41
3 votes
1 answer
585 views

How does ccrypt work?

On many Linux/GNU distributions CCrypt (ccrypt) by Peter Selinger is available as a command line utility to encrypt files. How does the protocol work and is it ...
Maarten Bodewes's user avatar
  • 90.2k
10 votes
1 answer
5k views

What is the algorithm behind PasswordDeriveBytes?

Microsoft has created an implementation of PBKDF1 in the PasswordDeriveBytes class. It can however generate more bytes than PBKDF1, which is limited to the number ...
Maarten Bodewes's user avatar
  • 90.2k
11 votes
1 answer
5k views

PBKDF vs HKDF for pretty long key

I'm developing a messenger application with encrypted chats. In the first version of the app I've used PBKDF2 (10000 iterations, SHA1, random salt) to extend a short user password and generate keys ...
alexeylang's user avatar
3 votes
2 answers
173 views

Is this a plausible PBKDF?

Background: Hello, I'm working on a hobby project in which I might want to implement a key derivation function within a somewhat resource limited embedded system. For standard crypto functions, I ...
katrik's user avatar
  • 35
2 votes
1 answer
919 views

Is this key management scheme secure?

I'm designing a scheme for management of a small number of cryptographic keys (< 100 at any given time) and I had an idea: rather than storing all the keys, could I just store one master key and ...
pg1989's user avatar
  • 4,616
4 votes
4 answers
2k views

Efficient random number generator to produce the salt for PBKDF2

I have been looking for an algorithm that generates random numbers and this algorithm has to be secure. I am going to use this algorithm to generate a salt that will be used in PBKDF2. Through my ...
MR.NASS's user avatar
  • 241