Angel Martinez Gonzalez wrote:

Hello:

Thanks for your help, but I don“t know what "buffer" and "num" I must use.
Buffer is a memory pointer. Usually something you allocated (in C by calling malloc) and filled with Data. If you don't know how to do that I'd urgently advise a basic course in C programming (or C++ or Pascal or Visual Basic or whatever). "num" is the number of bytes contained in that Buffer. You could also use RAND_load_file (http://www.openssl.org/docs/crypto/RAND_load_file.html) to load the data from a file.

How I can generate this buffer of random data?. And, "num" is the entropy,
but, what is it?. How I obtain this entropy?.
That's the question which is considerably more tricky. Possible sources are timers (GetTickCount()) or user interaction. But it is really hard to get significant amounts of entropy without operating system support.

I use Windows.
There is a long way between Windows 2.0 and Windows Server 2003... ;)
If you are using reasonable current versions of Windows (like 2000 or XP) the PRNG should be seeded automatically using MS Crypto API. You could check if the PRNG is seeded sufficiently by calling RAND_status.

I once again recommend thorough reading of http://www.openssl.org/docs/crypto/RAND_add.html.

Thanks. Ragards.
Ted
BTW, do you know the acronym RTFM? ;)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to