Hello everyone,

 

I’ve recently installed OpenSSL on windows 2000 advanced server platform, I’m using MS VC++ as a compiler.

I’m currently working on a project where I must implement Needham-Schroeder symmetric key security protocol. During the first message exchanged from client A to the CA server, the client must send a nonce identifier. This nonce must be a random number. I got lost trying to figure out the best way to generate a random number using OpenSSL.

I found the following segment:

 

#include <openssl/rand.h>
 // ...
unsigned char rnd[2500];
RAND_pseudo_bytes(rnd,sizeof(rnd)); 

When I ran this code and attempted to see the contents of rnd I got a non-comprehensible output, is that the way it’s supposed to be? Ciphered?  Or is something wrong?

 

On the other hand, according to the “Network Security with OpenSSL” book I must use PRNG which requires EGADS as a third party package to provide a seed to PRNG. Must I really use PRNG or is it designed for more sophisticated purposes rather than generating a nonce?

 

I’m seeking your guidance as I don’t want to end up reinventing the wheel or getting stuck in a mess that I don’t even need, to get the job done.

You’re help is highly appreciated, Thank you.

Layla.


Do you Yahoo!?
vote.yahoo.com - Register online to vote today!

Reply via email to