I'm trying to generate a bunch of pseudo-random keys for AES using PBKDF2, where the AES ciphers will be used in CTR mode as pseudo-random number generators. My goal is to create a 2-dimensional array, where each entry is a pseudo-random sequence generated by a separate PRNG. The reason for using separate PRNGs is simply because I want each cell to have equal cost to calculate (due to the PBKDF).
So I have two random strings,
r2 (user provided), and I'm generating the AES key for cell
PBKDF2(i || r1, r2 || j), where
j are single characters bijectively mapped to
y respectively, and
|| denotes concatenation. I'm using HMAC-SHA256 for the PRF, and nominally 1000 iterations of the PBKDF2. Currently r1 and r2 are 16 bytes each, but I can make them basically any size.
So my questions are:
- Is there any weakness in using such closely related inputs to PBKDF2, in particular when used as AES keys for CTR more?
- Is there any shortcut for calculating the result of the PBKDF2 for different cells that is any faster than having to calculate it from scratch for each cell?