Lines Matching refs:rng

106 static void wc_rng_deinit(WC_RNG *rng)  in wc_rng_deinit()  argument
109 wc_FreeRng(rng); in wc_rng_deinit()
110 os_free(rng); in wc_rng_deinit()
112 wc_rng_free(rng); in wc_rng_deinit()
932 WC_RNG rng; in dh5_init() local
948 if (wc_InitRng(&rng) != 0) { in dh5_init()
964 if (wc_DhGenerateKeyPair(dh, &rng, wpabuf_mhead(privkey), &priv_sz, in dh5_init()
984 wc_FreeRng(&rng); in dh5_init()
1077 WC_RNG rng; in crypto_dh_init() local
1089 if (wc_InitRng(&rng) != 0) { in crypto_dh_init()
1098 if (wc_DhGenerateKeyPair(dh, &rng, privkey, &priv_sz, pubkey, &pub_sz) in crypto_dh_init()
1119 wc_FreeRng(&rng); in crypto_dh_init()
1159 WC_RNG rng; in crypto_get_random() local
1161 if (wc_InitRng(&rng) != 0) in crypto_get_random()
1163 if (wc_RNG_GenerateBlock(&rng, buf, len) != 0) in crypto_get_random()
1165 wc_FreeRng(&rng); in crypto_get_random()
1403 WC_RNG rng; in crypto_bignum_rand() local
1409 if (wc_InitRng(&rng) != 0) in crypto_bignum_rand()
1413 if (!buf || wc_RNG_GenerateBlock(&rng, buf, len) != 0 || in crypto_bignum_rand()
1417 wc_FreeRng(&rng); in crypto_bignum_rand()
2079 WC_RNG *rng; /* Needs to be initialized before use. member
2086 WC_RNG *rng; member
2102 ecdh->rng = wc_rng_init(); in _crypto_ecdh_init()
2103 if (!ecdh->rng) { in _crypto_ecdh_init()
2115 ret = wc_ecc_set_rng(ecdh->ec->key, ecdh->rng); in _crypto_ecdh_init()
2141 err = wc_ecc_make_key_ex(ret->rng, 0, ret->ec->key, in crypto_ecdh_init()
2170 if (!ret->ec->key->rng) { in crypto_ecdh_init2()
2171 int err = wc_ecc_set_rng(ret->ec->key, ret->rng); in crypto_ecdh_init2()
2189 ecdh->ec->key->rng == ecdh->rng) in crypto_ecdh_deinit()
2193 wc_rng_deinit(ecdh->rng); in crypto_ecdh_deinit()
2319 wc_rng_deinit(key->rng); in crypto_ec_key_deinit()
2327 if (!key->rng) { in crypto_ec_key_init_rng()
2329 key->rng = wc_rng_init(); in crypto_ec_key_init_rng()
2330 if (!key->rng) in crypto_ec_key_init_rng()
2333 return key->rng; in crypto_ec_key_init_rng()
2414 err = wc_ecc_make_pub_ex(key->eckey, NULL, key->rng); in crypto_ec_key_gen_public_key()
2547 key->rng, key->eckey); in crypto_ec_key_sign()
2869 err = wc_ecc_make_key_ex(ret->rng, 0, ret->eckey, curve_id); in crypto_ec_key_gen()
3034 err = wc_ecc_sign_hash_ex(data, len, key->rng, key->eckey, &r, &s); in crypto_ec_key_sign_r_s()
3504 key->eckey, key->rng); in crypto_csr_sign()