When doing password-based encryption, is it OK to create one instance of PBKDF2 from the password, and then use it to create both the AES key and the MAC key? (Or should a new instance of PBKDF2 be created using a different salt or iteration count, for each?)
This answer seems to say this isn't a good idea. While this one seems to say it is. Am I misunderstanding one of them? (Or both.)
(And by the way, the first is marked as a duplicate of a question which deals with an initially strong key, while it itself deals with a simple passphrase.)
PBKDF2 supports the generation of arbitrary amounts of key data
. (I'm using Rfc2898DeriveBytes if it matters.) – ispiro Jan 29 '14 at 20:38well designed password based key derivation functions
)? – ispiro Jan 29 '14 at 21:02PRK
,info
andL
as input and check ifOKM
matches. But extract is a one liner, simply callHMAC(salt, ikm)
. – CodesInChaos Jan 30 '14 at 15:07info
string is nice. – CodesInChaos Mar 03 '14 at 09:03