Lines Matching refs:random
76 /* size of random output generated in test_drbg_reseed() */
166 * Generates random output using rand_bytes() and rand_priv_bytes()
172 * |public_random|, |private_random|: generated random output
214 * step 2: generate random output
220 /* Generate random output from the public and private DRBG */
288 unsigned char random[RANDOM_SIZE]; /* random output */
299 * This simplifies finding duplicate random output and makes
312 result = memcmp(l->random, r->random, RANDOM_SIZE);
321 * Sort two-byte chunks of random data
332 * in the child after forking the process. Collect the random
344 unsigned char random[2 * RANDOM_SIZE];
358 /* wait for children to terminate and collect their random output */
361 && TEST_true(read(fd[0], &random[0], sizeof(random))
362 == sizeof(random))) {
364 /* random output of public drbg */
367 memcpy(result[0].random, &random[0], RANDOM_SIZE);
369 /* random output of private drbg */
372 memcpy(result[1].random, &random[RANDOM_SIZE], RANDOM_SIZE);
389 &random[0], &random[RANDOM_SIZE],
391 && TEST_true(write(fd[1], random, sizeof(random))
392 == sizeof(random))) {
414 unsigned char random[2 * RANDOM_SIZE];
429 /* collect the random output of the children */
439 /* collect the random output of the parent */
442 &random[0], &random[RANDOM_SIZE],
452 memcpy(result[0].random, &random[0], RANDOM_SIZE);
457 memcpy(result[1].random, &random[RANDOM_SIZE], RANDOM_SIZE);
459 /* collect all sampled random data in a single buffer */
461 memcpy(psample, &result[i].random[0], RANDOM_SIZE);
471 if (result[i].random[0] == result[i-1].random[0]) {
479 TEST_note("ERROR: %d duplicate prefixes in public random output", duplicate[0]);
485 TEST_note("ERROR: %d duplicate prefixes in private random output", duplicate[1]);
502 TEST_note("ERROR: %d duplicate chunks in random output", duplicate[0]);
509 char *rand_hex = OPENSSL_buf2hexstr(result[i].random, RANDOM_SIZE);
511 TEST_note(" random: %s, pid: %d (%s, %s)",
528 unsigned char random[1];
542 if (!TEST_int_gt(RAND_bytes(random, 1), 0) || !TEST_int_gt(RAND_priv_bytes(random, 1), 0))