| /freebsd-11-stable/tests/sys/acl/ |
| HD | aclfuzzer.sh | 45 rnd=`jot -r 1` 46 rnd=`expr $rnd % $max` 48 echo $rnd 53 rnd=`rnd_from_0_to 3` 54 case $rnd in 64 rnd=`rnd_from_0_to 4` 65 case $rnd in 75 rnd=`rnd_from_0_to 30` 76 if [ -n "$p" -a $rnd -ge 14 ]; then 80 case $rnd in [all …]
|
| /freebsd-11-stable/crypto/openssl/crypto/bn/ |
| HD | bn_prime.c | 134 static int probable_prime(BIGNUM *rnd, int bits); 135 static int probable_prime_dh(BIGNUM *rnd, int bits, 138 static int probable_prime_dh_safe(BIGNUM *rnd, int bits, const BIGNUM *add, 367 static int probable_prime(BIGNUM *rnd, int bits) in probable_prime() argument 374 if (!BN_rand(rnd, bits, 1, 1)) in probable_prime() 378 mods[i] = (prime_t) BN_mod_word(rnd, (BN_ULONG)primes[i]); in probable_prime() 393 if (!BN_add_word(rnd, delta)) in probable_prime() 395 bn_check_top(rnd); in probable_prime() 399 static int probable_prime_dh(BIGNUM *rnd, int bits, in probable_prime_dh() argument 410 if (!BN_rand(rnd, bits, 0, 1)) in probable_prime_dh() [all …]
|
| HD | bn_rand.c | 118 static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) in bnrand() argument 127 BN_zero(rnd); in bnrand() 187 if (!BN_bin2bn(buf, bytes, rnd)) in bnrand() 195 bn_check_top(rnd); in bnrand() 203 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_rand() argument 205 return bnrand(0, rnd, bits, top, bottom); in BN_rand() 208 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_pseudo_rand() argument 210 return bnrand(1, rnd, bits, top, bottom); in BN_pseudo_rand() 214 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_bntest_rand() argument 216 return bnrand(2, rnd, bits, top, bottom); in BN_bntest_rand()
|
| HD | bn_depr.c | 75 BIGNUM *rnd = NULL; in BN_generate_prime() local 81 if ((rnd = BN_new()) == NULL) in BN_generate_prime() 84 rnd = ret; in BN_generate_prime() 85 if (!BN_generate_prime_ex(rnd, bits, safe, add, rem, &cb)) in BN_generate_prime() 91 if (!found && (ret == NULL) && (rnd != NULL)) in BN_generate_prime() 92 BN_free(rnd); in BN_generate_prime() 93 return (found ? rnd : NULL); in BN_generate_prime()
|
| /freebsd-11-stable/contrib/netbsd-tests/lib/libc/gen/ |
| HD | t_fpsetround.c | 64 } rnd[] = { variable 93 for (size_t i = 0; i < __arraycount(rnd); i++) in getname() 94 if (rnd[i].rm == r) in getname() 95 return rnd[i].n; in getname() 113 fprintf(stderr, "%4.4s %-5.5s %6d %8d\n", rnd[r].n, in test() 135 for (size_t i = 0; i < __arraycount(rnd); i++) { in ATF_TC_BODY() 137 const int o = rnd[i].rm; in ATF_TC_BODY() 138 const int n = rnd[j].rm; in ATF_TC_BODY() 148 ATF_CHECK_EQ(r = FLT_ROUNDS, rnd[j].rf); in ATF_TC_BODY() 149 if (r != rnd[j].rf) in ATF_TC_BODY() [all …]
|
| /freebsd-11-stable/crypto/openssh/openbsd-compat/ |
| HD | arc4random.c | 109 u_char rnd[KEYSZ + IVSZ]; in _rs_stir() local 112 if (RAND_bytes(rnd, sizeof(rnd)) <= 0) in _rs_stir() 116 getrnd(rnd, sizeof(rnd)); in _rs_stir() 121 _rs_init(rnd, sizeof(rnd)); in _rs_stir() 123 _rs_rekey(rnd, sizeof(rnd)); in _rs_stir() 124 explicit_bzero(rnd, sizeof(rnd)); in _rs_stir()
|
| /freebsd-11-stable/contrib/unbound/compat/ |
| HD | arc4random.c | 181 u_char rnd[KEYSZ + IVSZ]; in _rs_stir() local 183 if (getentropy(rnd, sizeof rnd) == -1) { in _rs_stir() 185 fallback_getentropy_urandom(rnd, sizeof rnd) == -1) { in _rs_stir() 195 _rs_init(rnd, sizeof(rnd)); in _rs_stir() 197 _rs_rekey(rnd, sizeof(rnd)); in _rs_stir() 198 explicit_bzero(rnd, sizeof(rnd)); /* discard source seed */ in _rs_stir()
|
| /freebsd-11-stable/usr.bin/enigma/ |
| HD | enigma.c | 42 unsigned rnd; in setup() local 67 rnd = seed % 65521; in setup() 69 ic = (rnd&MASK)%(k+1); in setup() 70 rnd >>= 8; in setup() 75 ic = (rnd&MASK) % k; in setup() 146 unsigned rnd; in shuffle() local 151 rnd = seed % 65521; in shuffle() 153 ic = (rnd&MASK)%(k+1); in shuffle()
|
| /freebsd-11-stable/sys/mips/atheros/ |
| HD | ar71xx_macaddr.c | 98 uint32_t rnd; in ar71xx_mac_addr_random_init() local 100 rnd = arc4random(); in ar71xx_mac_addr_random_init() 105 dst[3] = (rnd >> 24) & 0xff; in ar71xx_mac_addr_random_init() 106 dst[4] = (rnd >> 16) & 0xff; in ar71xx_mac_addr_random_init() 107 dst[5] = (rnd >> 8) & 0xff; in ar71xx_mac_addr_random_init()
|
| /freebsd-11-stable/crypto/openssl/crypto/engine/ |
| HD | eng_rdrand.c | 66 size_t rnd; in get_random_bytes() local 69 if ((rnd = OPENSSL_ia32_rdrand()) == 0) in get_random_bytes() 72 *((size_t *)buf) = rnd; in get_random_bytes() 77 if ((rnd = OPENSSL_ia32_rdrand()) == 0) in get_random_bytes() 80 memcpy(buf, &rnd, num); in get_random_bytes()
|
| /freebsd-11-stable/contrib/lua/src/ |
| HD | ltablib.c | 262 unsigned int i, rnd = 0; in l_randomizePivot() local 266 rnd += buff[i]; in l_randomizePivot() 267 return rnd; in l_randomizePivot() 346 static IdxT choosePivot (IdxT lo, IdxT up, unsigned int rnd) { in choosePivot() argument 348 IdxT p = rnd % (r4 * 2) + (lo + r4); in choosePivot() 358 unsigned int rnd) { in auxsort() argument 371 if (up - lo < RANLIMIT || rnd == 0) /* small interval or no randomize? */ in auxsort() 374 p = choosePivot(lo, up, rnd); in auxsort() 396 auxsort(L, lo, p - 1, rnd); /* call recursively for lower interval */ in auxsort() 401 auxsort(L, p + 1, up, rnd); /* call recursively for upper interval */ in auxsort() [all …]
|
| /freebsd-11-stable/tests/sys/geom/class/eli/ |
| HD | onetime_test.sh | 15 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=${sectors} status=none 17 md_rnd=`dd if=rnd bs=${secsize} count=${sectors} status=none | md5` 44 dd if=/dev/random of=rnd bs=${MAX_SECSIZE} count=${sectors} status=none 63 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=${sectors} status=none 65 md_rnd=`dd if=rnd bs=${secsize} count=${sectors} status=none | md5` 87 atf_check dd if=/dev/random of=rnd bs=$MAX_SECSIZE count=$sectors \
|
| HD | integrity_test.sh | 17 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=1 status=none 30 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=2 status=none 61 dd if=/dev/random of=rnd bs=${MAX_SECSIZE} count=${sectors} status=none 84 atf_check dd if=rnd of=sector bs=1 count=8 seek=64 conv=notrunc status=none 107 dd if=/dev/random of=rnd bs=${MAX_SECSIZE} count=${sectors} status=none 128 atf_check dd if=rnd of=sector bs=1 count=16 conv=notrunc status=none 151 dd if=/dev/random of=rnd bs=${MAX_SECSIZE} count=${sectors} status=none
|
| HD | init_test.sh | 18 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=${sectors} \ 21 md_rnd=`dd if=rnd bs=${secsize} count=${sectors} status=none | md5` 49 atf_check dd if=/dev/random of=rnd bs=$MAX_SECSIZE count=${sectors} \ 242 atf_check dd if=rnd of=/dev/${md}.eli bs=${secsize} count=${sectors} status=none 244 md_rnd=`dd if=rnd bs=${secsize} count=${sectors} status=none | md5` 267 atf_check dd if=/dev/random of=rnd bs=$MAX_SECSIZE count=${sectors} \
|
| /freebsd-11-stable/crypto/openssl/doc/crypto/ |
| HD | BN_rand.pod | 11 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom); 13 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom); 15 int BN_rand_range(BIGNUM *rnd, BIGNUM *range); 17 int BN_pseudo_rand_range(BIGNUM *rnd, BIGNUM *range); 22 B<bits> in length and stores it in B<rnd>. 40 number B<rnd> in the range 0 E<lt>= B<rnd> E<lt> B<range>.
|
| /freebsd-11-stable/crypto/openssl/crypto/camellia/asm/ |
| HD | cmll-x86.pl | 471 my ($i0,$i1,$i2,$i3,$rot,$rnd,@T)=@_; 473 $rnd *= 2; 481 &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i0 eq @T[0]); 482 &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i1 eq @T[0]); 483 &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i2 eq @T[0]); 484 &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i3 eq @T[0]); 491 my ($i0,$i1,$i2,$i3,$rot,$rnd,@T)=@_; 493 $rnd *= 2; 503 &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i0 eq @T[0]); 509 &mov (&DWP(-128+4*$rnd++,$key),shift(@T)) if ($i1 eq @T[0]); [all …]
|
| HD | cmll-x86_64.pl | 339 my ($rnd,$key,@T)=@_; 344 mov @T[1],`$bias+$rnd*8+0`($key) 345 mov @T[0],`$bias+$rnd*8+4`($key) 346 mov @T[3],`$bias+$rnd*8+8`($key) 347 mov @T[2],`$bias+$rnd*8+12`($key) 350 $code.=" mov @T[0],`$bias+$rnd*8+0`($key)\n"; 351 $code.=" mov @T[1],`$bias+$rnd*8+8`($key)\n" if ($#T>=1); 356 my ($rnd,$key,@T)=@_; 359 $code.=" mov `$bias+$rnd*8+0`($key),@T[0]\n"; 360 $code.=" mov `$bias+$rnd*8+8`($key),@T[1]\n" if ($#T>=1);
|
| /freebsd-11-stable/contrib/openbsm/bin/auditdistd/ |
| HD | auditdistd.c | 227 unsigned char rnd[32], hash[32], resp[32]; in listen_accept() local 324 if (adist_random(rnd, sizeof(rnd)) == -1) { in listen_accept() 330 if (proto_send(conn, rnd, sizeof(rnd)) == -1) { in listen_accept() 345 (int)strlen(adhost->adh_password), rnd, (int)sizeof(rnd), hash, in listen_accept() 359 if (proto_recv(conn, rnd, sizeof(rnd)) == -1) { in listen_accept() 367 (int)strlen(adhost->adh_password), rnd, (int)sizeof(rnd), hash, in listen_accept()
|
| HD | sender.c | 136 unsigned char rnd[32], hash[32], resp[32]; in sender_connect() local 222 if (proto_recv(conn, rnd, sizeof(rnd)) == -1) { in sender_connect() 231 (int)strlen(adhost->adh_password), rnd, (int)sizeof(rnd), hash, in sender_connect() 247 if (adist_random(rnd, sizeof(rnd)) == -1) { in sender_connect() 254 if (proto_send(conn, rnd, sizeof(rnd)) == -1) { in sender_connect() 271 (int)strlen(adhost->adh_password), rnd, (int)sizeof(rnd), hash, in sender_connect()
|
| /freebsd-11-stable/crypto/openssl/doc/apps/ |
| HD | rand.pod | 21 line tools, PRNG seeding uses the file I<$HOME/>B<.rnd> or B<.rnd> 23 I<$HOME>/B<.rnd> or B<.rnd> file will be written back if enough
|
| /freebsd-11-stable/contrib/ntp/lib/isc/ |
| HD | random.c | 104 isc_uint32_t rnd; in isc_random_jitter() local 111 isc_random_get(&rnd); in isc_random_jitter() 112 return (max - rnd % jitter); in isc_random_jitter()
|
| /freebsd-11-stable/lib/libc/resolv/ |
| HD | res_init.c | 763 u_char *rnd = statp->_rnd == NULL ? srnd : statp->_rnd; in res_rndinit() local 767 memcpy(rnd, &u32, 4); in res_rndinit() 769 memcpy(rnd + 4, &u32, 4); in res_rndinit() 771 memcpy(rnd + 8, &u32, 4); in res_rndinit() 773 memcpy(rnd + 12, &u16, 2); in res_rndinit() 781 u_char *rnd = statp->_rnd == NULL ? srnd : statp->_rnd; in res_nrandomid() local 785 memcpy(rnd + 14, &u16, 2); in res_nrandomid() 788 MD5_Update(&ctx, rnd, 16); in res_nrandomid() 789 MD5_Final(rnd, &ctx); in res_nrandomid() 792 MD5Update(&ctx, rnd, 16); in res_nrandomid() [all …]
|
| /freebsd-11-stable/crypto/openssl/crypto/rand/ |
| HD | rand_unix.c | 228 u_int32_t rnd = 0, i; in RAND_poll() local 233 rnd = arc4random(); in RAND_poll() 234 buf[i] = rnd; in RAND_poll() 235 rnd >>= 8; in RAND_poll()
|
| /freebsd-11-stable/crypto/openssh/ |
| HD | ssh-keysign.c | 182 u_int32_t rnd[256]; in main() local 233 arc4random_buf(rnd, sizeof(rnd)); in main() 234 RAND_seed(rnd, sizeof(rnd)); in main()
|
| HD | sshd.c | 527 u_int32_t rnd[256]; in reseed_prngs() local 533 arc4random_buf(rnd, sizeof(rnd)); /* let arc4random notice PID change */ in reseed_prngs() 536 RAND_seed(rnd, sizeof(rnd)); in reseed_prngs() 538 if ((RAND_bytes((u_char *)rnd, 1)) != 1) in reseed_prngs() 542 explicit_bzero(rnd, sizeof(rnd)); in reseed_prngs() 1130 u_char rnd[256]; local 1321 arc4random_buf(rnd, sizeof(rnd)); 1323 RAND_seed(rnd, sizeof(rnd)); 1324 if ((RAND_bytes((u_char *)rnd, 1)) != 1) 1327 explicit_bzero(rnd, sizeof(rnd));
|