Yes, you could use PBKDF2 for this.
You can use an iteration count of 1 as the master key will already contain 256 bits of entropy: that's plenty, you don't need any strengthening for that.
So you should try and configure PBKDF2 using HMAC-SHA256 or HMAC-SHA512 as PRF. Note that the standard indicates SHA-1 as default, so that's probably what is used if you don't configure it with a different secure hash or HMAC. It seems however impossible to configure Rfc2898DeriveBytes
with SHA-256. That means that the key strength may be diminished somewhat as SHA-1 is configured to provide no more than 160 bits of security.
Note that normally you should not use more output from PBKDF2 than the hash size as it provides an advantage to an attacker. This is however inconsequential because the high amount of entropy in the master key puts the attacker at a pretty strong disadvantage in the first place.
Input:
P
: the masterkey in bytes (instead of the password)S
: the derivation data, possibly prefixed by a salt (included with the ciphertext, one salt should suffice per set of keys)c
: the iteration count, set to 1dkLen
: 32 (the size of the derived key or secret in octets)
You could for instance use an 8 byte salt, followed by the encoding of the ASCII encoded strings "EncKey" and "AuthKey". You may also want to include some ID, especially if you want to establish keys between two parties (for two way communication).
The salt isn't really necessary, it's optional for HKDF as well.
Implementing HKDF is indeed not that hard, but be sure to test it plenty if you decide to go that routeroute; in the end this is your choice.
One advantage of choosing HKDF is that[EDIT: removed HMAC expects a key instead of a password. So you probably could use ausing key container withfor HKDF, IKM is put in HMAC while that wouldas message, not be possible for PBKDF2.
Your choice.as key]