I'm using my own code to communicate with another party that's specified PKCS#1 V2.1 EME-OAEP encoding, with SHA-1 as the hash function.
There are two places where random data is used in encoding a message:
- A 20-byte seed which is passed to Mask Generation Function.
- A variable amount of random data which left-pads the message, when the message is shorter than the block.
For these uses, is it OK to use an operating system rand function, which is probably a weak LCG; or should I use a CSPRNG such as ISAAC (which will have been seeded from the weak LCG)?
/dev/urandom
? $\endgroup$