The Password-Based Key Derivation Function 2 (PBKDF2) is a method of securely deriving encryption keys from a passphrase entered by a user. It features an iteration count that can be deliberately adjusted (key stretching) to slow down brute force password guessing attacks.
0
votes
1answer
28 views
PKCS#11: Which CKK_types are supported by CKM_PKCS5_PBKD2?
On Solaris there's a function pkcs11_PasswdToKey() which is a wrapper of C_GenerateKey(). I made a simple test and it turned out ...
4
votes
1answer
105 views
Injecting salt into PyCrypto KDF - useful?
I have noted some sources indicate that when using a KDF like PBKDF2 (alternatively) some advocate injecting the salt at the time of execution - like this:
...
2
votes
2answers
148 views
How to derive two keys from one password
What is the best way to generate two independent symmetric keys from one user-entered password or passphrase?
Would using both scrypt and pbkdf2 achieve this?
4
votes
2answers
160 views
what is the difference between Scrypt and PBKDF2
After reading these two resources I am wondering am I getting all the differences between Scrypt and PBKDF2 or am I missing something?
As far as I understood, the similarity is:
both are using ...
0
votes
1answer
40 views
PBKDF2 when dkLen and hLen have the same size
I was reading RFC 2898 and something is not clear to me. When I use PBKDF2 with SHA-256 and I want a derived key with length 32 bytes (the same length as my hash function output), your derived key ...
8
votes
3answers
251 views
PBKDF2 for key diversification
I am looking for a secure key diversification function to create individual AES keys for a local smart card deployment. The keys need to be derived from a secret master key and the smart card serial ...
3
votes
1answer
247 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 ...
5
votes
2answers
268 views
Should I salt an AES password at each encryption?
I saw a sample code where the same password is salted with a different value (using PBKDF2) for each encryption. That means that the salt must be stored for each encrypted message.
I don't understand ...
5
votes
2answers
150 views
AES encrypting multiple files
So if I want to encrypt all the files in a folder with AES (same password) I take each file and generate the key schedule using PBKDF2. As the PBKDF2 algorithm takes in a salt then this salt should ...
2
votes
1answer
129 views
Can I use my random IV (for AES) as a salt for PBKDF2?
Also, where do I store my salt (can I just store it at the beginning of the encrypted file)?
9
votes
2answers
277 views
Why is the salt used only once in PBKDF2, while the password is used often?
The purpose of PBKDF2 is to create a derived key (DK) from a master password (PW) and a salt, often using a function like HMAC-SHA256. I have read that the salt should be as random as possible. But ...
4
votes
3answers
265 views
Can I use PBKDF2 for authentication and decryption?
I want to store a hash for authenticating a password. I also want to use the same password for decryption. Can I use PBKDF2 for both? (I plan to use different salts for the authentication and the ...
2
votes
1answer
1k views
How do I store encrypted files on a web server and decrypt them locally?
I want to store files (images) on a public webserver and let users see them if they know a password. The server shouldn't have the unecrypted files and the server can only serve files, not perform ...
3
votes
4answers
1k views
PBKDF2 and salt
I want to ask some questions about the PBKDF2 function and generally about the password-based derivation functions.
Actually we use the derivation function together with the salt to provide ...
5
votes
2answers
188 views
Can I use a key-derivation-function as the hash function H in SRP?
In the Secure Remote Password Protocol, the verifier must be stored on the server. In the case of a server compromise, an attacker could obtain these verifiers. If nobody reused passwords, this ...
1
vote
2answers
85 views
KDF with low-entropy salts
I need to derive a key from a username and a password. These are the only two things I have access to. What I thought is using PBKDF2 with username as the salt and password as the master password.
...
2
votes
3answers
453 views
Hash function in PBKDF2
From this excellent answer I learned (correct me if I am wrong) that when writing a block cipher with say key size 128 bit, one has to pad the password given (variable size) so that it becomes exactly ...
0
votes
3answers
264 views
Can PBKDF2 be used to create an OTP to encrypt random plaintext?
I want to encrypt a truly random plaintext (a key file) based on a user password. I'll use PBKDF2-HMAC-SHA256 to generate an encryption key from the password, but I'm wondering if I even need to both ...
2
votes
1answer
170 views
Is there a known vulnerability when using identical key and salt with PBKDF2?
For optimum security, a random salt should be chosen for PBKDF2.
I came across a scenario where I produce a hash of a random file that serves as the "password". Due to the nature of files, this has ...
5
votes
1answer
1k views
How do I correctly derive a Key and IV?
Mainly I'm trying to understand how to correctly create the Key and IV for use with the .NET Implementation of AES (AesManaged class).
This encryption code will be used in conjunction with existing ...
4
votes
4answers
2k views
How can one securely generate an asymmetric key pair from a short passphrase?
Background info:
I am planning on making a filehost with which one can encrypt and upload files. To protect the data against any form of hacking, I'd like not to know the encryption key ($K$) used for ...