Home
last modified time | relevance | path

Searched refs:rnd (Results 1 – 25 of 60) sorted by relevance

123

/external/openssl/crypto/bn/
Dbn_prime.c131 static int probable_prime(BIGNUM *rnd, int bits);
132 static int probable_prime_dh(BIGNUM *rnd, int bits,
134 static int probable_prime_dh_safe(BIGNUM *rnd, int bits,
377 static int probable_prime(BIGNUM *rnd, int bits) in probable_prime() argument
384 if (!BN_rand(rnd,bits,1,1)) return(0); in probable_prime()
387 mods[i]=(prime_t)BN_mod_word(rnd,(BN_ULONG)primes[i]); in probable_prime()
401 if (!BN_add_word(rnd,delta)) return(0); in probable_prime()
402 bn_check_top(rnd); in probable_prime()
406 static int probable_prime_dh(BIGNUM *rnd, int bits, in probable_prime_dh() argument
415 if (!BN_rand(rnd,bits,0,1)) goto err; in probable_prime_dh()
[all …]
Dbn_rand.c118 static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) in bnrand() argument
126 BN_zero(rnd); in bnrand()
199 if (!BN_bin2bn(buf,bytes,rnd)) goto err; in bnrand()
207 bn_check_top(rnd); in bnrand()
211 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_rand() argument
213 return bnrand(0, rnd, bits, top, bottom); in BN_rand()
216 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_pseudo_rand() argument
218 return bnrand(1, rnd, bits, top, bottom); in BN_pseudo_rand()
222 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom) in BN_bntest_rand() argument
224 return bnrand(2, rnd, bits, top, bottom); in BN_bntest_rand()
Dbn_depr.c73 BIGNUM *rnd=NULL; in BN_generate_prime() local
80 if ((rnd=BN_new()) == NULL) goto err; in BN_generate_prime()
83 rnd=ret; in BN_generate_prime()
84 if(!BN_generate_prime_ex(rnd, bits, safe, add, rem, &cb)) in BN_generate_prime()
90 if (!found && (ret == NULL) && (rnd != NULL)) BN_free(rnd); in BN_generate_prime()
91 return(found ? rnd : NULL); in BN_generate_prime()
/external/apache-harmony/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/
DSortedMapTestBase.java46 Random rnd; field in SortedMapTestBase
49 rnd = new Random(-1); in setUp()
51 ref.put(rnd.nextInt(N) * 2, rnd.nextBoolean() ? null : rnd.nextInt(N) * 2); in setUp()
62 int key = rnd.nextInt(N); in testContainsKey()
70 int value = rnd.nextInt(N); in testContainsValue()
91 int key = rnd.nextInt(N); in testGet()
103 if (rnd.nextBoolean()) { in testKeySet()
113 int key = rnd.nextInt(N); in testPut()
114 int value = rnd.nextInt(N); in testPut()
125 int key = rnd.nextInt(N); in testPut0()
[all …]
/external/wpa_supplicant_6/wpa_supplicant/src/eap_common/
Deap_fast_common.c106 u8 *rnd = NULL, *out; in eap_fast_derive_key() local
126 rnd = os_malloc(keys.client_random_len + keys.server_random_len); in eap_fast_derive_key()
127 if (rnd == NULL) in eap_fast_derive_key()
130 os_memcpy(rnd, keys.server_random, keys.server_random_len); in eap_fast_derive_key()
131 os_memcpy(rnd + keys.server_random_len, keys.client_random, in eap_fast_derive_key()
137 label, rnd, keys.client_random_len + in eap_fast_derive_key()
140 os_free(rnd); in eap_fast_derive_key()
145 os_free(rnd); in eap_fast_derive_key()
/external/wpa_supplicant_8/src/eap_common/
Deap_fast_common.c100 u8 *rnd = NULL, *out; in eap_fast_derive_key() local
120 rnd = os_malloc(keys.client_random_len + keys.server_random_len); in eap_fast_derive_key()
121 if (rnd == NULL) in eap_fast_derive_key()
124 os_memcpy(rnd, keys.server_random, keys.server_random_len); in eap_fast_derive_key()
125 os_memcpy(rnd + keys.server_random_len, keys.client_random, in eap_fast_derive_key()
131 label, rnd, keys.client_random_len + in eap_fast_derive_key()
134 os_free(rnd); in eap_fast_derive_key()
139 os_free(rnd); in eap_fast_derive_key()
Deap_pwd_common.c87 BIGNUM *x_candidate = NULL, *rnd = NULL, *cofactor = NULL; in compute_password_element() local
122 if (((rnd = BN_new()) == NULL) || in compute_password_element()
178 BN_bin2bn(pwe_digest, SHA256_DIGEST_LENGTH, rnd); in compute_password_element()
208 if (BN_is_odd(rnd)) in compute_password_element()
265 BN_free(rnd); in compute_password_element()
/external/valgrind/main/coregrind/
Dvg_preloaded.c157 static int rnd = -1; in VG_REPLACE_FUNCTION_ZU() local
160 if (rnd < 0) rnd = open("/dev/random", O_RDONLY); in VG_REPLACE_FUNCTION_ZU()
162 read(rnd, &result, sizeof(result)); in VG_REPLACE_FUNCTION_ZU()
/external/wpa_supplicant_8/src/eap_server/
Deap_server_tls_common.c67 u8 *rnd = NULL, *out; in eap_server_tls_derive_key() local
84 rnd = os_malloc(keys.client_random_len + keys.server_random_len); in eap_server_tls_derive_key()
85 if (rnd == NULL) in eap_server_tls_derive_key()
87 os_memcpy(rnd, keys.client_random, keys.client_random_len); in eap_server_tls_derive_key()
88 os_memcpy(rnd + keys.client_random_len, keys.server_random, in eap_server_tls_derive_key()
92 label, rnd, keys.client_random_len + in eap_server_tls_derive_key()
96 os_free(rnd); in eap_server_tls_derive_key()
101 os_free(rnd); in eap_server_tls_derive_key()
/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/
DSession.java37 private final SecureRandom rnd; field in Session
39 protected Session(ChannelManager cm, SecureRandom rnd) throws IOException in Session() argument
43 this.rnd = rnd; in Session()
184 rnd.nextBytes(fakeCookie); in requestX11Forwarding()
/external/wpa_supplicant_6/wpa_supplicant/src/eap_server/
Deap_tls_common.c70 u8 *rnd = NULL, *out; in eap_server_tls_derive_key() local
87 rnd = os_malloc(keys.client_random_len + keys.server_random_len); in eap_server_tls_derive_key()
88 if (rnd == NULL) in eap_server_tls_derive_key()
90 os_memcpy(rnd, keys.client_random, keys.client_random_len); in eap_server_tls_derive_key()
91 os_memcpy(rnd + keys.client_random_len, keys.server_random, in eap_server_tls_derive_key()
95 label, rnd, keys.client_random_len + in eap_server_tls_derive_key()
99 os_free(rnd); in eap_server_tls_derive_key()
104 os_free(rnd); in eap_server_tls_derive_key()
Deap_ttls.c324 u8 *challenge, *rnd; in eap_ttls_implicit_challenge() local
341 rnd = os_malloc(keys.client_random_len + keys.server_random_len); in eap_ttls_implicit_challenge()
343 if (rnd == NULL || challenge == NULL) { in eap_ttls_implicit_challenge()
346 os_free(rnd); in eap_ttls_implicit_challenge()
350 os_memcpy(rnd, keys.server_random, keys.server_random_len); in eap_ttls_implicit_challenge()
351 os_memcpy(rnd + keys.server_random_len, keys.client_random, in eap_ttls_implicit_challenge()
355 "inner application challenge", rnd, in eap_ttls_implicit_challenge()
360 os_free(rnd); in eap_ttls_implicit_challenge()
365 os_free(rnd); in eap_ttls_implicit_challenge()
1375 u8 *rnd, *key; in eap_ttls_v1_derive_key() local
[all …]
/external/quake/quake/src/WinQuake/
Dcl_tent.cpp123 int rnd; in CL_ParseTEnt() local
158 rnd = rand() & 3; in CL_ParseTEnt()
159 if (rnd == 1) in CL_ParseTEnt()
161 else if (rnd == 2) in CL_ParseTEnt()
177 rnd = rand() & 3; in CL_ParseTEnt()
178 if (rnd == 1) in CL_ParseTEnt()
180 else if (rnd == 2) in CL_ParseTEnt()
/external/quake/quake/src/QW/client/
Dcl_tent.c169 int rnd; in CL_ParseTEnt() local
202 rnd = rand() & 3; in CL_ParseTEnt()
203 if (rnd == 1) in CL_ParseTEnt()
205 else if (rnd == 2) in CL_ParseTEnt()
221 rnd = rand() & 3; in CL_ParseTEnt()
222 if (rnd == 1) in CL_ParseTEnt()
224 else if (rnd == 2) in CL_ParseTEnt()
/external/stlport/test/eh/
Drandom_number.cpp32 static EH_STD::subtractive_rng rnd; in random_number()
34 return rnd(range); in random_number()
/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/transport/
DTransportConnection.java70 final SecureRandom rnd; field in TransportConnection
72 public TransportConnection(InputStream is, OutputStream os, SecureRandom rnd) in TransportConnection() argument
76 this.rnd = rnd; in TransportConnection()
156 int r = rnd.nextInt(); in sendMessage()
DKexManager.java69 final SecureRandom rnd; field in KexManager
72 ServerHostKeyVerifier keyVerifier, SecureRandom rnd) in KexManager() argument
81 this.rnd = rnd; in KexManager()
257 PacketKexInit kp = new PacketKexInit(nextKEXcryptoWishList, rnd); in initiateKEX()
415 kip = new PacketKexInit(nextKEXcryptoWishList, rnd); in handleMessage()
460 kxs.dhx.init(1, rnd); in handleMessage()
462 kxs.dhx.init(14, rnd); in handleMessage()
528 kxs.dhgx.init(rnd); in handleMessage()
/external/openssh/
Droaming_client.c147 u_int32_t rnd = 0; in roaming_resume() local
159 rnd = arc4random(); in roaming_resume()
160 packet_put_char(rnd & 0xff); in roaming_resume()
161 rnd >>= 8; in roaming_resume()
Dssh-keysign.c160 u_int32_t rnd[256]; in main() local
205 rnd[i] = arc4random(); in main()
206 RAND_seed(rnd, sizeof(rnd)); in main()
/external/openssl/crypto/rand/
Drand_unix.c222 u_int32_t rnd = 0, i; in RAND_poll() local
227 rnd = arc4random(); in RAND_poll()
228 buf[i] = rnd; in RAND_poll()
229 rnd >>= 8; in RAND_poll()
/external/dhcpcd/compat/
Darc4random.c104 unsigned int rnd[(128 - sizeof(struct timeval)) / in arc4_stir() member
112 n = read(fd, rdat.rnd, sizeof(rdat.rnd)); in arc4_stir()
/external/icu4c/test/perf/collperf/
Dcollperf.cpp390 DataIndex * rnd; member in CmdBinSearch
395 …CmdBinSearch(UErrorCode, UCollator * col,DWORD win_langid,int32_t count,DataIndex * rnd,DataIndex … in CmdBinSearch() argument
396 :col(col),win_langid(win_langid), count(count), rnd(rnd), ord(ord), fn(fn),exec_count(0){} in CmdBinSearch()
432 return ucol_strcoll(col, rnd[i].icu_data, -1, ord[j].icu_data,-1); in icu_strcoll_null()
436 …return ucol_strcoll(col, rnd[i].icu_data, rnd[i].icu_data_len, ord[j].icu_data, ord[j].icu_data_le… in icu_strcoll_len()
440 return strcmp( (char *) rnd[i].icu_key, (char *) ord[j].icu_key ); in icu_cmpkey()
444 int t = CompareStringW(win_langid, 0, rnd[i].win_data, -1, ord[j].win_data, -1); in win_cmp_null()
454 …int t = CompareStringW(win_langid, 0, rnd[i].win_data, rnd[i].win_data_len, ord[j].win_data, ord[j… in win_cmp_len()
465 return func(rnd[i].data, ord[j].data); \
/external/wpa_supplicant_8/src/eap_peer/
Deap_tls_common.c261 u8 *rnd = NULL, *out; in eap_peer_tls_derive_key() local
284 rnd = os_malloc(keys.client_random_len + keys.server_random_len); in eap_peer_tls_derive_key()
285 if (rnd == NULL) in eap_peer_tls_derive_key()
287 os_memcpy(rnd, keys.client_random, keys.client_random_len); in eap_peer_tls_derive_key()
288 os_memcpy(rnd + keys.client_random_len, keys.server_random, in eap_peer_tls_derive_key()
292 label, rnd, keys.client_random_len + in eap_peer_tls_derive_key()
296 os_free(rnd); in eap_peer_tls_derive_key()
301 os_free(rnd); in eap_peer_tls_derive_key()
/external/wpa_supplicant_6/wpa_supplicant/src/eap_peer/
Deap_ttls.c306 u8 *rnd; in eap_ttls_v1_derive_key() local
321 rnd = os_malloc(keys.client_random_len + keys.server_random_len); in eap_ttls_v1_derive_key()
323 if (rnd == NULL || data->key_data == NULL) { in eap_ttls_v1_derive_key()
325 os_free(rnd); in eap_ttls_v1_derive_key()
330 os_memcpy(rnd, keys.client_random, keys.client_random_len); in eap_ttls_v1_derive_key()
331 os_memcpy(rnd + keys.client_random_len, keys.server_random, in eap_ttls_v1_derive_key()
335 "ttls v1 keying material", rnd, keys.client_random_len + in eap_ttls_v1_derive_key()
338 os_free(rnd); in eap_ttls_v1_derive_key()
345 rnd, keys.client_random_len + keys.server_random_len); in eap_ttls_v1_derive_key()
349 os_free(rnd); in eap_ttls_v1_derive_key()
[all …]
/external/openssl/ssl/
Dtls_srp.c412 unsigned char rnd[SSL_MAX_MASTER_KEY_LENGTH]; in SRP_Calc_A_param() local
421 RAND_bytes(rnd, sizeof(rnd)); in SRP_Calc_A_param()
422 s->srp_ctx.a = BN_bin2bn(rnd, sizeof(rnd), s->srp_ctx.a); in SRP_Calc_A_param()
423 OPENSSL_cleanse(rnd, sizeof(rnd)); in SRP_Calc_A_param()

123