Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rand_bytes(3ssl) [plan9 man page]

RAND_bytes(3SSL)						      OpenSSL							  RAND_bytes(3SSL)

NAME
RAND_bytes, RAND_pseudo_bytes - generate random data SYNOPSIS
#include <openssl/rand.h> int RAND_bytes(unsigned char *buf, int num); int RAND_pseudo_bytes(unsigned char *buf, int num); DESCRIPTION
RAND_bytes() puts num cryptographically strong pseudo-random bytes into buf. An error occurs if the PRNG has not been seeded with enough randomness to ensure an unpredictable byte sequence. RAND_pseudo_bytes() puts num pseudo-random bytes into buf. Pseudo-random byte sequences generated by RAND_pseudo_bytes() will be unique if they are of sufficient length, but are not necessarily unpredictable. They can be used for non-cryptographic purposes and for certain purposes in cryptographic protocols, but usually not for key generation etc. The contents of buf is mixed into the entropy pool before retrieving the new pseudo-random bytes unless disabled at compile time (see FAQ). RETURN VALUES
RAND_bytes() returns 1 on success, 0 otherwise. The error code can be obtained by ERR_get_error(3). RAND_pseudo_bytes() returns 1 if the bytes generated are cryptographically strong, 0 otherwise. Both functions return -1 if they are not supported by the current RAND method. SEE ALSO
rand(3), ERR_get_error(3), RAND_add(3) HISTORY
RAND_bytes() is available in all versions of SSLeay and OpenSSL. It has a return value since OpenSSL 0.9.5. RAND_pseudo_bytes() was added in OpenSSL 0.9.5. 1.0.1e 2013-02-11 RAND_bytes(3SSL)

Check Out this Related Man Page

RAND_bytes(3SSL)						      OpenSSL							  RAND_bytes(3SSL)

NAME
RAND_bytes, RAND_pseudo_bytes - generate random data SYNOPSIS
#include <openssl/rand.h> int RAND_bytes(unsigned char *buf, int num); int RAND_pseudo_bytes(unsigned char *buf, int num); DESCRIPTION
RAND_bytes() puts num cryptographically strong pseudo-random bytes into buf. An error occurs if the PRNG has not been seeded with enough randomness to ensure an unpredictable byte sequence. RAND_pseudo_bytes() puts num pseudo-random bytes into buf. Pseudo-random byte sequences generated by RAND_pseudo_bytes() will be unique if they are of sufficient length, but are not necessarily unpredictable. They can be used for non-cryptographic purposes and for certain purposes in cryptographic protocols, but usually not for key generation etc. The contents of buf is mixed into the entropy pool before retrieving the new pseudo-random bytes unless disabled at compile time (see FAQ). RETURN VALUES
RAND_bytes() returns 1 on success, 0 otherwise. The error code can be obtained by ERR_get_error(3). RAND_pseudo_bytes() returns 1 if the bytes generated are cryptographically strong, 0 otherwise. Both functions return -1 if they are not supported by the current RAND method. SEE ALSO
rand(3), ERR_get_error(3), RAND_add(3) HISTORY
RAND_bytes() is available in all versions of SSLeay and OpenSSL. It has a return value since OpenSSL 0.9.5. RAND_pseudo_bytes() was added in OpenSSL 0.9.5. 1.0.1e 2013-02-11 RAND_bytes(3SSL)
Man Page

3 More Discussions You Might Find Interesting

1. AIX

OPENSSH and PRNGD with AIX 4.3.3

I am running openssl-0.9.6g-3 and prngd-0.9.23-3 on AIX 4.3.3. When I tried to initiate a SSH session, it hang at the "ssh-rand-helper" command. I then get a source copy of ssh-rand-helper.c from openssh-3.8p1 to debug it and found that it hung during the function call "RAND_bytes(seed,... (3 Replies)
Discussion started by: flockofseagull
3 Replies

2. HP-UX

OpenSSH install

I'm trying to install OpenSSH on HP-UX 11.11, so, first of all, I was going to install OpenSSL, but I get an error message during "make test"... 23324:error:24064064:random number generator:SSLEAY_RAND_BYTES:PRNG not seeded:md_rand.c:503:You need to read the OpenSSL FAQ,... (8 Replies)
Discussion started by: untamed
8 Replies

3. UNIX for Beginners Questions & Answers

NTP synchronised problem in our Centos 7.6 node

Someone, please help on this issue:- Note : for security reason i didn't mention hostnames and ips. ============================================================================== # ntpstat unsynchronised polling server every 1024 s Ntpstat showing unsynchronised. ... (29 Replies)
Discussion started by: shanmugaraj
29 Replies