Would merely repeating the same value 8 times be sufficient ? Or is there a more clever approach for doing this ? The 256 bit values would be generated from SHA256 of files.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Random numbers for cryptography are a tough subject because you need true random numbers and that is a difficult subject!
However, the method you are suggesting is not sufficient whatsoever for cryptographic purposes.
You should have a look at the NIST Recommendation for Random Number Generation Using Deterministic Random Bit Generators.
Also, you might want to have a look at the "Handbook of Applied Cryptography".
If this is for non-crypto purpose, you might want to use Keccak - SHA3 to extend the number of bits.