I am currently playing around with some cryptography (RSA Public Key, in this case) and in order to generate a random key I need a random input. I figured the microphone would be a good source for relatively unreplicatable data. Is there any way to read the raw data out of a microphone in a way that can be used as to seed srand? Is there a better way to get a purely random seed and if so how would I do it?
I am running Windows 8 on a laptop with a built in mic and I am using the g++ compiler.
srand
you mean the c standard library function, then don't use it. c'srand
sucks even when you only need statistically good random numbers, not to speak of security. – Neutralization