Home
last modified time | relevance | path

Searched refs:bn_modulus (Results 1 – 8 of 8) sorted by relevance

/third_party/wpa_supplicant/wpa_supplicant-2.9/src/crypto/
Dcrypto_internal-modexp.c94 struct bignum *bn_base, *bn_exp, *bn_modulus, *bn_result; in crypto_mod_exp() local
99 bn_modulus = bignum_init(); in crypto_mod_exp()
102 if (bn_base == NULL || bn_exp == NULL || bn_modulus == NULL || in crypto_mod_exp()
108 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0) in crypto_mod_exp()
111 if (bignum_exptmod(bn_base, bn_exp, bn_modulus, bn_result) < 0) in crypto_mod_exp()
119 bignum_deinit(bn_modulus); in crypto_mod_exp()
Dcrypto_nettle.c380 mpz_t bn_base, bn_exp, bn_modulus, bn_result; in crypto_mod_exp() local
384 mpz_inits(bn_base, bn_exp, bn_modulus, bn_result, NULL); in crypto_mod_exp()
387 mpz_import(bn_modulus, modulus_len, 1, 1, 1, 0, modulus); in crypto_mod_exp()
389 mpz_powm(bn_result, bn_base, bn_exp, bn_modulus); in crypto_mod_exp()
398 mpz_clears(bn_base, bn_exp, bn_modulus, bn_result, NULL); in crypto_mod_exp()
Dcrypto_gnutls.c366 gcry_mpi_t bn_base = NULL, bn_exp = NULL, bn_modulus = NULL, in crypto_mod_exp() local
374 gcry_mpi_scan(&bn_modulus, GCRYMPI_FMT_USG, modulus, modulus_len, in crypto_mod_exp()
379 gcry_mpi_powm(bn_result, bn_base, bn_exp, bn_modulus); in crypto_mod_exp()
390 gcry_mpi_release(bn_modulus); in crypto_mod_exp()
Dcrypto_openssl.c594 BIGNUM *bn_base, *bn_exp, *bn_modulus, *bn_result; in crypto_mod_exp() local
604 bn_modulus = BN_bin2bn(modulus, modulus_len, NULL); in crypto_mod_exp()
607 if (bn_base == NULL || bn_exp == NULL || bn_modulus == NULL || in crypto_mod_exp()
611 if (BN_mod_exp_mont_consttime(bn_result, bn_base, bn_exp, bn_modulus, in crypto_mod_exp()
621 BN_clear_free(bn_modulus); in crypto_mod_exp()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/crypto/
Dcrypto_internal-modexp.c94 struct bignum *bn_base, *bn_exp, *bn_modulus, *bn_result; in crypto_mod_exp() local
99 bn_modulus = bignum_init(); in crypto_mod_exp()
102 if (bn_base == NULL || bn_exp == NULL || bn_modulus == NULL || in crypto_mod_exp()
108 bignum_set_unsigned_bin(bn_modulus, modulus, modulus_len) < 0) in crypto_mod_exp()
111 if (bignum_exptmod(bn_base, bn_exp, bn_modulus, bn_result) < 0) in crypto_mod_exp()
119 bignum_deinit(bn_modulus); in crypto_mod_exp()
Dcrypto_nettle.c380 mpz_t bn_base, bn_exp, bn_modulus, bn_result; in crypto_mod_exp() local
384 mpz_inits(bn_base, bn_exp, bn_modulus, bn_result, NULL); in crypto_mod_exp()
387 mpz_import(bn_modulus, modulus_len, 1, 1, 1, 0, modulus); in crypto_mod_exp()
389 mpz_powm(bn_result, bn_base, bn_exp, bn_modulus); in crypto_mod_exp()
398 mpz_clears(bn_base, bn_exp, bn_modulus, bn_result, NULL); in crypto_mod_exp()
Dcrypto_gnutls.c366 gcry_mpi_t bn_base = NULL, bn_exp = NULL, bn_modulus = NULL, in crypto_mod_exp() local
374 gcry_mpi_scan(&bn_modulus, GCRYMPI_FMT_USG, modulus, modulus_len, in crypto_mod_exp()
379 gcry_mpi_powm(bn_result, bn_base, bn_exp, bn_modulus); in crypto_mod_exp()
390 gcry_mpi_release(bn_modulus); in crypto_mod_exp()
Dcrypto_openssl.c667 BIGNUM *bn_base, *bn_exp, *bn_modulus, *bn_result; in crypto_mod_exp() local
677 bn_modulus = BN_bin2bn(modulus, modulus_len, NULL); in crypto_mod_exp()
680 if (bn_base == NULL || bn_exp == NULL || bn_modulus == NULL || in crypto_mod_exp()
684 if (BN_mod_exp_mont_consttime(bn_result, bn_base, bn_exp, bn_modulus, in crypto_mod_exp()
694 BN_clear_free(bn_modulus); in crypto_mod_exp()