| /freebsd/share/man/man4/ | 
| H A D | random.4 | 28 .Nm random37 device returns an endless supply of random bytes when read.
 43 To provide prompt access to the random device at boot time,
 52 This saved entropy is sufficient to unblock the random device on devices with
 56 for re-seeding the random device on boot, or accept that the device
 76 .Dl "sysctl kern.random"
 80 kern.random.block_seeded_status: 0
 81 kern.random.fortuna.minpoolsize: 64
 82 kern.random.harvest.mask_symbolic: ENABLEDSOURCE,[DISABLEDSOURCE],...,CACHED
 83 kern.random.harvest.mask_bin: 00000010000000111011111
 [all …]
 
 | 
| /freebsd/share/man/man9/ | 
| H A D | random.9 | 35 .Nm random ,38 .Nd supply pseudo-random numbers
 58 .Fn random "void"
 64 functions will return very good quality random numbers, suited for
 70 returns a 32-bit random value, while
 76 bytes of random data.
 82 .Xr random 4
 113 (If random is seeded, it will not block.)
 120 .Pa /dev/random .
 123 argument points to a buffer where random data should be stored.
 [all …]
 
 | 
| /freebsd/crypto/heimdal/doc/doxyout/hcrypto/man/man3/ | 
| H A D | hcrypto_rand.3 | 48 See the \fBRAND - random number\fP for description and examples. 53 Seed that random number generator. Secret material can securely be feed into the function, they wil…
 67 Get a random block from the random generator, can be used for key material.
 71 \fIoutdata\fP random data
 73 \fIsize\fP length random data
 84 Reset and free memory used by the random generator.
 87 Return the default random state filename for a user to use for \fBRAND_load_file()\fP, and \fBRAND_…
 104 Get the default random method.
 119 Get a random block from the random generator, should NOT be used for key material.
 123 \fIoutdata\fP random data
 [all …]
 
 | 
| /freebsd/contrib/wpa/src/crypto/ | 
| H A D | random.c | 2  * Random number generator8  * This random number generator is used to provide additional entropy to the
 19  * drivers/char/random.c, but the implementation here is simpler and not as
 29 #include <sys/random.h>
 37 #include "random.h"
 148 	wpa_hexdump_key(MSG_EXCESSIVE, "random pool",  in random_add_randomness()
 152 	wpa_hexdump_key(MSG_EXCESSIVE, "random pool",  in random_add_randomness()
 170 	wpa_hexdump_key(MSG_EXCESSIVE, "random from os_get_random",  in random_get_bytes()
 179 		wpa_hexdump_key(MSG_EXCESSIVE, "random from internal pool",  in random_get_bytes()
 195 			wpa_printf(MSG_ERROR, "random: No entropy available "  in random_get_bytes()
 [all …]
 
 | 
| /freebsd/contrib/unbound/util/ | 
| H A D | random.h | 2  * util/random.h - thread safe random generator, which is reasonably secure.41  * Thread safe random functions. Similar to arc4random() with an explicit
 46  * random state structure.
 51  * Initialize a random generator state for use
 52  * @param from: if not NULL, the seed is taken from this random structure.
 53  * 	can be used to seed random states via a parent-random-state that
 60  * Generate next random number from the state passed along.
 61  * Thread safe, so random numbers are repeatable.
 63  * @return: random 31 bit value.
 68  * Generate random number between 0 and x-1.  No modulo bias.
 [all …]
 
 | 
| /freebsd/lib/libc/stdlib/ | 
| H A D | random.3 | 32 .Nm random ,43 .Fn random void
 55 Applications which require unpredictable random numbers should use
 61 .Fn random
 63 uses a non-linear additive feedback random number generator employing a
 64 default table of size 31 long integers to return successive pseudo-random
 68 The period of this random number generator is very large, approximately
 73 .Fn random
 77 .Fn random
 87 .Fn random
 [all …]
 
 | 
| H A D | rand.3 | 39 .Nd bad random number generator54 Applications which require unpredictable random numbers should use
 61 function computes a sequence of pseudo-random integers in the range
 86 .Xr random 3 .
 100 .Xr random 3 ,
 105 .Xr random 3 ,
 106 .Xr random 4
 138 .Xr random 3 ,
 145 .Xr random 3
 
 | 
| /freebsd/lib/libc/gen/ | 
| H A D | arc4random.3 | 40 .Nd random number generator55 .Xr random 3 ,
 59 Use of these functions is encouraged for almost all random number
 68 High quality 32-bit pseudo-random numbers are generated very quickly.
 69 On each call, a cryptographic pseudo-random number generator is used
 74 .Xr random 4
 85 function returns pseudo-random numbers in the range of 0 to
 91 .Xr random 3 .
 98 with random data.
 116 .Fn random
 [all …]
 
 | 
| /freebsd/crypto/openssl/test/ | 
| H A D | drbgtest.c | 70 /* size of random output generated in test_drbg_reseed() */160  * Generates random output using rand_bytes() and rand_priv_bytes()
 166  * |public_random|, |private_random|: generated random output
 208      * step 2: generate random output  in test_drbg_reseed()
 214     /* Generate random output from the public and private DRBG */  in test_drbg_reseed()
 282     unsigned char random[RANDOM_SIZE]; /* random output */  member
 293  * This simplifies finding duplicate random output and makes
 306         result = memcmp(l->random, r->random, RANDOM_SIZE);  in compare_drbg_fork_result()
 315  * Sort two-byte chunks of random data
 326  * in the child after forking the process. Collect the random
 [all …]
 
 | 
| /freebsd/crypto/libecc/src/nn/ | 
| H A D | nn_rand.c | 26  * The function initializes nn structure pointed by 'out' to a random value of27  * byte length 'len'. The resulting nn will have a uniformly random value in
 45  * The function initializes nn structure pointed by 'out' to a random value of
 46  * *random* byte length less than or equal to 'max_len'. Unlike the function
 47  * above (nn_get_random_len()), the resulting nn will have a uniformly random
 48  * value in in [0, 2^(8 * len)[ *with* length selected at random in
 52  * testing purposes. Its main goal is to generate nn with random length, not
 53  * random numbers. For instance, for a given value of max_len, the function
 75  * is initialized to an unbiased random value in ]0,q[. On error, the
 79  * Generating a random value in ]0,q[ is done by reducing a large random
 [all …]
 
 | 
| /freebsd/crypto/openssl/doc/man7/ | 
| H A D | RAND.pod | 6 - the OpenSSL random generator10 Random numbers are a vital part of cryptography, they are needed to provide
 13 can be used as a cryptographically-secure pseudo-random number generator
 20 the deterministic random bit generator (DRBG) model as described in
 21 [NIST SP 800-90A Rev. 1]. The default random generator will initialize
 24 It seeds and reseeds itself automatically using trusted random sources
 28 just use L<RAND_bytes(3)> to obtain random data.
 31 Although (re-)seeding is automatic, it can fail because no trusted random source
 33 random seed material.
 52 Changing the default random generator should be necessary
 [all …]
 
 | 
| /freebsd/contrib/llvm-project/clang/lib/Headers/ | 
| H A D | rdseedintrin.h | 20 /// Stores a hardware-generated 16-bit random value in the memory at \a __p.22 ///    The random number generator complies with NIST SP800-90B and SP800-90C.
 39 ///    Pointer to memory for storing the 16-bit random number.
 40 /// \returns 1 if a random number was generated, 0 if not.
 47 /// Stores a hardware-generated 32-bit random value in the memory at \a __p.
 49 ///    The random number generator complies with NIST SP800-90B and SP800-90C.
 66 ///    Pointer to memory for storing the 32-bit random number.
 67 /// \returns 1 if a random number was generated, 0 if not.
 75 /// Stores a hardware-generated 64-bit random value in the memory at \a __p.
 77 ///    The random number generator complies with NIST SP800-90B and SP800-90C.
 [all …]
 
 | 
| /freebsd/crypto/openssl/include/crypto/ | 
| H A D | rand.h | 40  * set this to a comma-separated list of 'random' device files to try out. By43 # define DEVRANDOM "/dev/urandom", "/dev/random", "/dev/hwrng", "/dev/srandom"
 46 #   define DEVRANDOM_WAIT   "/dev/random"
 49  * Linux kernels 4.8 and later changes how their random device works and there
 57  * Some operating systems do not permit select(2) on their random devices,
 59  * from /dev/random.
 87  * Initialise the random pool reseeding sources.
 94  * Finalise the random pool reseeding sources.
 99  * Control the random pool use of open file descriptors.
 109  * Get and cleanup random seed material.
 [all …]
 
 | 
| H A D | rand_pool.h | 27  * RAND_POOL can store a random input which has a lousy entropy rate of63  * The 'random pool' acts as a dumb container for collecting random
 65  * the random pool, 2) pass it to the polling callbacks, 3) seed the RNG, and
 66  * 4) cleanup the random pool again.
 68  * The random pool contains no locking mechanism because its scope and
 72     unsigned char *buffer;  /* points to the beginning of the random pool */
 73     size_t len; /* current number of random bytes contained in the pool */
 78     size_t min_len; /* minimum number of random bytes requested */
 79     size_t max_len; /* maximum number of random bytes (allocated buffer size) */
 
 | 
| /freebsd/crypto/openssl/test/recipes/30-test_evp_data/ | 
| H A D | evpciph_camellia_cts.txt | 30 # The random confounder is also prepended to the plaintext.35 # Random confounder: B69822A19A6B09C0EBC8557D1F1B6C0A
 46 # Random confounder: 6F2FC3C2A166FD8898967A83DE9596D9
 57 # Random confounder: A5B4A71E077AEEF93C8763C18FDB1F10
 68 # Random confounder: 19FEE40D810C524B5B22F01874C693DA
 79 # Random confounder: CA7A7AB4BE192DABD603506DB19C39E2
 90 # Random confounder: 3CBBD2B45917941067F96599BB98926C
 101 # Random confounder: DEF487FCEBE6DE6346D4DA4521BBA2D2
 112 # Random confounder: AD4FF904D34E555384B14100FC465F88
 123 # Random confounder: CF9BCA6DF1144E0C0AF9B8F34C90D514
 [all …]
 
 | 
| /freebsd/libexec/rc/rc.d/ | 
| H A D | random | 5 # PROVIDE: random12 name="random"
 13 desc="Harvest and save entropy for random device"
 26 		dd if=/dev/random of="$f" bs=4096 count=1 status=none &&
 38 			if dd if="$f" of=/dev/random bs=4096 2>/dev/null ; then
 51 		${SYSCTL} kern.random.harvest.mask=${harvest_mask} > /dev/null
 52 		${SYSCTL_N} kern.random.harvest.mask_symbolic
 57 	if [ ! -w /dev/random ] ; then
 58 		warn "/dev/random is not writeable"
 62 	# Reseed /dev/random with previously stored entropy.
 [all …]
 
 | 
| /freebsd/secure/lib/libcrypto/man/man7/ | 
| H A D | RAND.7 | 65 \&\- the OpenSSL random generator68 Random numbers are a vital part of cryptography, they are needed to provide
 71 can be used as a cryptographically-secure pseudo-random number generator
 78 the deterministic random bit generator (DRBG) model as described in
 79 [NIST SP 800\-90A Rev. 1]. The default random generator will initialize
 82 It seeds and reseeds itself automatically using trusted random sources
 86 just use \fBRAND_bytes\fR\|(3) to obtain random data.
 89 Although (re\-)seeding is automatic, it can fail because no trusted random source
 91 random seed material.
 110 Changing the default random generator should be necessary
 [all …]
 
 | 
| H A D | EVP_RAND.7 | 64 EVP_RAND \- the random bit generator77 application developers for obtaining random bytes, the EVP_RAND API
 79 systems's entropy sources and providing access to deterministic random
 81 A DRBG is a certain type of cryptographically-secure pseudo-random
 86 Unless you have very specific requirements for your random generator,
 88 The usual way to obtain random bytes is to use \fBRAND_bytes\fR\|(3) or
 162 will lock the <primary> DRBG automatically for obtaining random input.
 185 \&    | random generator |      | and private keys for certificates  |
 189 The usual way to obtain random bytes is to call RAND_bytes(...) or
 196 A DRBG instance seeds itself automatically, pulling random input from
 [all …]
 
 | 
| /freebsd/contrib/llvm-project/llvm/tools/llvm-stress/ | 
| H A D | llvm-stress.cpp | 1 //===- llvm-stress.cpp - Generate random LL files to stress-test LLVM -----===//9 // This program is a utility that generates random .ll files to stress-test
 82 /// A utility class to provide a pseudo-random number generator which is
 86 class Random {  class
 89   Random(unsigned _seed):Seed(_seed) {}  in Random()  function in llvm::__anone1ed83310111::Random
 91   /// Return a random integer, up to a
 96     // Only lowest 19 bits are random-ish.  in Rand()
 100   /// Return a random 64 bit integer.
 114   /// Make this like a C++11 random device
 122     assert(Val <= max() && "Random value out of range");  in operator ()()
 [all …]
 
 | 
| /freebsd/sys/dev/random/ | 
| H A D | randomdev.c | 42 #include <sys/random.h>53 #include <dev/random/hash.h>
 54 #include <dev/random/randomdev.h>
 55 #include <dev/random/random_harvestq.h>
 60  * In loadable random, the core randomdev.c / random(9) routines have static
 78 	.d_name = "random",
 104  * This is the read uio(9) interface for random(4).
 115  * If the random device is not seeded, blocks until it is seeded.
 117  * Returns zero when the random device is seeded.
 139 			printf("random: %s unblock wait\n", __func__);  in randomdev_wait_until_seeded()
 [all …]
 
 | 
| H A D | other_algorithm.c | 30  * containing an alternative entropy-processing algorithm for random(4).51 #include <sys/random.h>
 60 #include <dev/random/hash.h>
 61 #include <dev/random/randomdev.h>
 62 #include <dev/random/random_harvestq.h>
 63 #include <dev/random/uint128.h>
 64 #include <dev/random/other_algorithm.h>
 78 #include <dev/random/hash.h>
 79 #include <dev/random/randomdev.h>
 80 #include <dev/random/uint128.h>
 [all …]
 
 | 
| H A D | random_infra.c | 32 #include <sys/random.h>35 #include <dev/random/randomdev.h>
 38 SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
 39     "Cryptographically Secure Random Number Generator");
 52     0, "If set non-zero, bypass the random device in requests for random "
 53     "data when the random device is not yet seeded.  This is considered "
 54     "dangerous.  Ordinarily, the random device will block requests until "
 65     &read_random_bypassed_before_seeding, 0, "If non-zero, the random device "
 78     &arc4random_bypassed_before_seeding, 0, "If non-zero, the random device "
 
 | 
| /freebsd/crypto/openssl/doc/man3/ | 
| H A D | RAND_add.pod | 30 These functions can be used to seed the random generator and to check its32 In general, manual (re-)seeding of the default OpenSSL random generator
 38 RAND_status() indicates whether or not the random generator has been sufficiently
 41 RAND_poll() uses the system's capabilities to seed the random generator using
 42 random input obtained from polling various trusted entropy sources.
 47 of the random generator.
 54 The content of B<buf> cannot be recovered from subsequent random generator output.
 55 Applications that intend to save and restore random state in an external file
 58 NOTE: In FIPS mode, random data provided by the application is not considered to
 66 usage by the random seed sources. Some seed sources maintain open file
 [all …]
 
 | 
| /freebsd/secure/lib/libcrypto/man/man3/ | 
| H A D | RAND_add.3 | 91 These functions can be used to seed the random generator and to check its93 In general, manual (re\-)seeding of the default OpenSSL random generator
 99 \&\fBRAND_status()\fR indicates whether or not the random generator has been sufficiently
 102 \&\fBRAND_poll()\fR uses the system's capabilities to seed the random generator using
 103 random input obtained from polling various trusted entropy sources.
 108 of the random generator.
 115 The content of \fBbuf\fR cannot be recovered from subsequent random generator output.
 116 Applications that intend to save and restore random state in an external file
 119 NOTE: In FIPS mode, random data provided by the application is not considered to
 127 usage by the random seed sources. Some seed sources maintain open file
 [all …]
 
 | 
| /freebsd/lib/libsys/ | 
| H A D | getrandom.2 | 29 .Nd get random data42 bytes of random data.
 52 .Xr random 4
 60 .Pa /dev/random
 71 .Xr random 4
 93 .Xr random 4
 114 .Xr random 4
 130 .Xr random 4
 
 |