Lines Matching +full:three +full:- +full:state

2  * Copyright 2011-2022 The OpenSSL Project Authors. All Rights Reserved.
54 if (meth->bytes != NULL) in gen_bytes()
55 return meth->bytes(buf, num); in gen_bytes()
56 return -1; in gen_bytes()
82 static int state(EVP_RAND_CTX *drbg) in state() function
107 return (PROV_DRBG *)drbg->algctx; in DRBG_UINT()
114 p->reseed_counter = n; in set_reseed_counter()
167 * and checks whether the three shared DRBGs were reseeded as
171 * |primary|, |public|, |private|: pointers to the three shared DRBGs
176 * -1: don't check whether the specified DRBG was reseeded or not
235 if (!TEST_int_eq(state(primary), expected_state) in test_drbg_reseed()
236 || !TEST_int_eq(state(public), expected_state) in test_drbg_reseed()
237 || !TEST_int_eq(state(private), expected_state)) in test_drbg_reseed()
309 result = l->private - r->private; in compare_drbg_fork_result()
312 result = memcmp(l->random, r->random, RANDOM_SIZE); in compare_drbg_fork_result()
315 result = l->pindex - r->pindex; in compare_drbg_fork_result()
321 * Sort two-byte chunks of random data
323 * Used for finding collisions in two-byte chunks
387 /* check whether all three DRBGs reseed and send output to parent */ in test_drbg_reseed_in_child()
471 if (result[i].random[0] == result[i-1].random[0]) { in test_rand_reseed_on_fork()
477 if (duplicate[0] >= DRBG_FORK_COUNT - 1) { in test_rand_reseed_on_fork()
483 if (duplicate[1] >= DRBG_FORK_COUNT - 1) { in test_rand_reseed_on_fork()
491 /* sort the two-byte chunks... */ in test_rand_reseed_on_fork()
496 if (compare_rand_chunk(psample - 2, psample) == 0) in test_rand_reseed_on_fork()
500 if (duplicate[0] >= DRBG_FORK_COUNT - 1) { in test_rand_reseed_on_fork()
531 /* All three DRBGs should be non-null */ in test_rand_fork_safety()
570 /* All three DRBGs should be non-null */ in test_rand_reseed()
576 /* There should be three distinct DRBGs, two of them chained to primary */ in test_rand_reseed()
580 || !TEST_ptr_eq(prov_rand(public)->parent, prov_rand(primary)) in test_rand_reseed()
581 || !TEST_ptr_eq(prov_rand(private)->parent, prov_rand(primary))) in test_rand_reseed()
588 /* uninstantiate the three global DRBGs */ in test_rand_reseed()
603 * Test initial state of shared DRBGs in test_rand_reseed()
650 * Test whether all three DRBGs are reseeded by RAND_add(). in test_rand_reseed()
706 while (time(NULL) - start < 5); in run_multi_thread_test()
795 "AES-256-CTR", 0); in new_drbg()
798 if (!TEST_ptr(rand = EVP_RAND_fetch(NULL, "CTR-DRBG", NULL)) in new_drbg()
817 /* Initialise a three long DRBG chain */ in test_rand_prediction_resistance()