Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I use AES-128bit to encrypt files and I want to compute a HMAC for each one of the encrypted files to ensure their integrity.

Can I use directly the AES KEY to compute HMAC or should I used a derived form (eg. PBKDF2 sha256) ? In other words I wonder if the HMAC can facilitate the recovery of the AES key or not...

Thank you in advance. Best regards

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

In general, the advice is always to use two unique keys for two distinct functions. The main reason is for separation of responsibilities.

Consider that your senior executives may have a very sensitive file that talks about an upcoming business deal. It needs to be encrypted so that only the other executives can read it.

However, you may need to ask a system administrator, security reviewer, or arbitrator to periodically authenticate or monitor the integrity of the files. If they're both using the same key, you can't separate those duties.

share|improve this answer
    
Thanks for the advice! Simple yet effective. –  mad Nov 13 '13 at 21:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.