[openssl-users] conversion of RAND_bytes to rand in fips apporved way
sudarshan12s at gmail.com
Wed Jul 25 18:12:34 UTC 2018
Hi, we have linked FIPS compliant openssl version against our applications.
Now few applications are using libc rand function. For FIPS compliance,
to call approved SP 800-90A DRBG implementation. I was planning to replace
libc rand with RAND_bytes
for the same.
But rand() returns max value of 32767 . Is there a recomended way to
convert RAND_bytes to libc rand()
something like this?
unsigned char buf;
int *rndp = malloc(4);
return (unsigned) ((*rndp) % 32768)
Please suggest . Is there a way to give number of bits instead of bytes to
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openssl-users