/src/lib/libc/stdlib/ |
rand_r.c | 46 rand_r(unsigned int *seed) 48 _DIAGASSERT(seed != NULL); 50 return ((*seed = *seed * 1103515245 + 12345) & RAND_MAX);
|
srand48.c | 29 srand48(long seed) 32 __rand48_seed[1] = (unsigned short) seed; 33 __rand48_seed[2] = (unsigned short) ((unsigned long)seed >> 16);
|
rand.c | 54 srand(u_int seed) 56 next = seed;
|
/src/lib/libc/compat/stdlib/ |
compat_random.c | 59 initstate(unsigned long seed, char * buf, size_t len) { 60 return __initstate60((unsigned int)seed, buf, len); 64 srandom(unsigned long seed) { 65 __srandom60((unsigned int)seed);
|
/src/sys/external/isc/libsodium/dist/src/libsodium/crypto_sign/ed25519/ref10/ |
keypair.c | 14 const unsigned char *seed) 19 memmove(sk, seed, 32); 21 crypto_hash_sha512(sk, seed, 32); 30 memmove(sk, seed, 32); 39 unsigned char seed[32]; local in function:crypto_sign_ed25519_keypair 42 randombytes_buf(seed, sizeof seed); 43 ret = crypto_sign_ed25519_seed_keypair(pk, sk, seed); 44 sodium_memzero(seed, sizeof seed); [all...] |
/src/games/ching/castching/ |
castching.c | 65 static unsigned seed; /* seed for random number generator */ variable in typeref:typename:unsigned 85 seed = (int)now + getquest() + getgid() + getuid() + getpid(); 134 return(seed = (seed*13077) + 6925);
|
/src/sys/kern/ |
sys_getrandom.c | 61 uint8_t seed[NIST_HASH_DRBG_SEEDLEN_BYTES] = {0}; local in function:dogetrandom 88 * Try to get a seed from the entropy pool. Fail if we would 98 error = entropy_extract(seed, sizeof seed, extractflags); 103 if (nist_hash_drbg_instantiate(&drbg, seed, sizeof seed, NULL, 0, 107 /* Promptly zero the seed. */ 108 explicit_memset(seed, 0, sizeof seed); 117 * seed size. Programs can't rely on long reads [all...] |
subr_cprng.c | 224 * seed on multiple CPUs, we would still get independent output 238 * Initialize the DRBG with no seed. We do this in order to 272 uint8_t seed[NIST_HASH_DRBG_SEEDLEN_BYTES]; local in function:cprng_strong_reseed 275 * Drop everything to extract a fresh seed from the entropy 286 entropy_extract(seed, sizeof seed, 0); 292 seed, sizeof seed, NULL, 0))) 294 explicit_memset(seed, 0, sizeof seed); [all...] |
/src/sys/crypto/cprng_fast/ |
cprng_fast.c | 88 uint8_t seed[CPRNG_FAST_SEED_BYTES]; 91 cprng_strong(kern_cprng, seed, sizeof seed, 0); 92 cprng_fast_seed(cprng, seed); 93 (void)explicit_memset(seed, 0, sizeof seed); 139 uint8_t seed[CPRNG_FAST_SEED_BYTES]; 142 cprng_strong(kern_cprng, seed, sizeof(seed), 0); 146 cprng_fast_seed(cprng, seed); 87 uint8_t seed[CPRNG_FAST_SEED_BYTES]; local in function:cprng_fast_init_cpu 137 uint8_t seed[CPRNG_FAST_SEED_BYTES]; local in function:cprng_fast_intr 207 uint8_t seed[CHACHA_STREAM_KEYBYTES]; local in function:cprng_fast_buf_long [all...] |
/src/sys/external/bsd/compiler_rt/dist/lib/fuzzer/ |
FuzzerRandom.h | 20 Random(unsigned int seed) : std::mt19937(seed) {}
|
/src/sys/external/isc/libsodium/dist/test/quirks/ |
quirks.h | 41 srandom(unsigned seed) 43 srand(seed);
|
/src/usr.bin/skeyinit/ |
skeyinit.c | 14 * S/KEY initialization and seed update 53 char seed[SKEY_MAX_PW_LEN+2], key[SKEY_BINKEY_SIZE], defaultseed[SKEY_MAX_SEED_LEN+1]; local in function:main 81 * Copy the hostname into the default seed, eliminating any 181 printf("Old key: [%s] %s\n", skey_get_algorithm(), skey.seed); 184 * lets be nice if they have a skey.seed that 187 l = strlen(skey.seed); 189 lastc = skey.seed[l - 1]; 191 (void)strlcpy(defaultseed, skey.seed, 197 (void)strlcpy(defaultseed, skey.seed, 239 printf("Enter new seed [default %s]: ", defaultseed) [all...] |
/src/usr.bin/skey/ |
skey.c | 14 * Takes the iteration count and seed as command line args, prompts 45 char buf[33], *seed, *slash, *t; local in function:main 77 /* could be in the form <number>/<seed> */ 86 seed = slash; 104 seed = argv[++optind]; 107 for(t = seed; *t; t++) { 109 errx(1, "seed must be alphanumeric"); 112 if(!*seed || strlen(seed) > SKEY_MAX_SEED_LEN) 113 errx(1, "seed must be between 1 and %d long", SKEY_MAX_SEED_LEN) [all...] |
/src/sys/external/isc/libsodium/dist/test/default/ |
box_seed.c | 5 static unsigned char seed[32] = { 0x77, 0x07, 0x6d, 0x0a, 0x73, 0x18, 0xa5, variable in typeref:typename:unsigned char[32] 18 crypto_box_seed_keypair(pk, sk, seed);
|
kx.c | 14 unsigned char *seed; local in function:tv_kx 22 seed = (unsigned char *) sodium_malloc(crypto_kx_SEEDBYTES); 24 seed[i] = (unsigned char) i; 28 crypto_kx_seed_keypair(client_pk, client_sk, seed); 85 crypto_kx_seed_keypair(client_pk, client_sk, seed); 86 sodium_increment(seed, crypto_kx_SEEDBYTES); 87 crypto_kx_seed_keypair(server_pk, server_sk, seed); 132 sodium_free(seed);
|
/src/usr.bin/nbperf/ |
nbperf.h | 55 uint32_t seed[1]; member in struct:nbperf
|
/src/lib/libskey/ |
skeysubr.c | 77 * concatenate the (lower cased) seed and the password, run through 82 const char *seed, /* Seed, any length */ 85 return(skey_algorithm_table[skey_hash_type].keycrunch(result, seed, passwd)); 88 static char *mkSeedPassword(const char *seed, const char *passwd, 93 *buflen = strlen(seed) + strlen(passwd); 96 strcpy(buf, seed); 105 const char *seed, /* Seed, any length */ 113 if ((buf = mkSeedPassword(seed, passwd, &buflen)) == NULL [all...] |
skey.h | 26 char *seed; member in struct:skey 53 /* Max length of an S/Key seed (rfc2289) */ 58 /* Max length of S/Key challenge (otp-???? 9999 seed) */
|
/src/sys/external/isc/libsodium/dist/src/libsodium/crypto_box/ |
crypto_box.c | 66 const unsigned char *seed) 68 return crypto_box_curve25519xsalsa20poly1305_seed_keypair(pk, sk, seed);
|
/src/sys/external/isc/libsodium/dist/src/libsodium/crypto_sign/ |
crypto_sign.c | 48 const unsigned char *seed) 50 return crypto_sign_ed25519_seed_keypair(pk, sk, seed);
|
/src/sys/external/isc/libsodium/dist/src/libsodium/crypto_sign/ed25519/ |
sign_ed25519.c | 45 crypto_sign_ed25519_sk_to_seed(unsigned char *seed, const unsigned char *sk) 47 memmove(seed, sk, crypto_sign_ed25519_SEEDBYTES);
|
/src/sys/external/isc/libsodium/dist/src/libsodium/include/sodium/ |
crypto_sign_ed25519.h | 72 const unsigned char *seed); 84 int crypto_sign_ed25519_sk_to_seed(unsigned char *seed,
|
/src/tests/lib/libskey/ |
t_algorithms.c | 44 h_check(const char *pass, const char *seed, 54 keycrunch(data, seed, pass);
|
/src/common/lib/libc/hash/murmurhash/ |
murmurhash.c | 43 murmurhash2(const void *key, size_t len, uint32_t seed) 54 uint32_t h = seed ^ (uint32_t)len;
|
/src/sys/net/ |
toeplitz.c | 112 * The Toeplitz matrix obtained from a seed is invertible if and only if the 113 * parity of the seed is 1. Generate such a seed uniformly at random. 118 stoeplitz_key seed; local in function:stoeplitz_random_seed 120 seed = cprng_strong32() & UINT16_MAX; 121 if (parity(seed) == 0) 122 seed ^= 1; 124 return (seed);
|