/hal_espressif-latest/components/wpa_supplicant/src/common/ |
D | sae.c | 26 struct sae_temporary_data *tmp; in sae_set_group() local 29 tmp = sae->tmp = os_zalloc(sizeof(*tmp)); in sae_set_group() 30 if (tmp == NULL) in sae_set_group() 34 tmp->ec = crypto_ec_init(group); in sae_set_group() 35 if (tmp->ec) { in sae_set_group() 39 tmp->prime_len = crypto_ec_prime_len(tmp->ec); in sae_set_group() 40 tmp->prime = crypto_ec_get_prime(tmp->ec); in sae_set_group() 41 tmp->order_len = crypto_ec_order_len(tmp->ec); in sae_set_group() 42 tmp->order = crypto_ec_get_order(tmp->ec); in sae_set_group() 47 tmp->dh = dh_groups_get(group); in sae_set_group() [all …]
|
D | sae_pk.c | 267 u8 dtable[256], *out, *pos, tmp; in sae_pk_base32_decode() local 306 tmp = dtable[val]; in sae_pk_base32_decode() 307 if (tmp == 0x80) { in sae_pk_base32_decode() 315 block |= tmp; in sae_pk_base32_decode() 383 struct sae_temporary_data *tmp = sae->tmp; in sae_pk_set_password() local 390 if (!tmp) { in sae_pk_set_password() 394 os_memset(tmp->fingerprint, 0, sizeof(tmp->fingerprint)); in sae_pk_set_password() 395 tmp->fingerprint_bytes = tmp->fingerprint_bits = 0; in sae_pk_set_password() 407 tmp->sec = (pw[0] & BIT(7)) ? 3 : 5; in sae_pk_set_password() 408 tmp->lambda = len - len / 5; in sae_pk_set_password() [all …]
|
D | dragonfly.c | 60 struct crypto_bignum *tmp; in dragonfly_get_random_qr_qnr() local 63 tmp = crypto_bignum_init(); in dragonfly_get_random_qr_qnr() 64 if (!tmp || crypto_bignum_rand(tmp, prime) < 0) { in dragonfly_get_random_qr_qnr() 65 crypto_bignum_deinit(tmp, 0); in dragonfly_get_random_qr_qnr() 69 res = crypto_bignum_legendre(tmp, prime); in dragonfly_get_random_qr_qnr() 71 *qr = tmp; in dragonfly_get_random_qr_qnr() 73 *qnr = tmp; in dragonfly_get_random_qr_qnr() 75 crypto_bignum_deinit(tmp, 0); in dragonfly_get_random_qr_qnr() 90 struct crypto_bignum *tmp, *pm1, *one; in dragonfly_get_rand_1_to_p_1() local 92 tmp = crypto_bignum_init(); in dragonfly_get_rand_1_to_p_1() [all …]
|
/hal_espressif-latest/components/bt/host/bluedroid/external/sbc/encoder/srce/ |
D | sbc_dct.c | 209 SINT32 tmp[8]; in SBC_FastIDCT4() local 213 SBC_IDCT_MULT((SBC_COS_PI_SUR_4 >> 1), temp , tmp[0]); in SBC_FastIDCT4() 214 tmp[1] = x2 - tmp[0]; in SBC_FastIDCT4() 215 tmp[0] += x2; in SBC_FastIDCT4() 217 SBC_IDCT_MULT((SBC_COS_3PI_SUR_8 >> 1), temp , tmp[3]); in SBC_FastIDCT4() 218 SBC_IDCT_MULT((SBC_COS_PI_SUR_8 >> 1), temp , tmp[2]); in SBC_FastIDCT4() 220 SBC_IDCT_MULT((SBC_COS_3PI_SUR_8 >> 1), temp , tmp[5]); in SBC_FastIDCT4() 221 SBC_IDCT_MULT((SBC_COS_PI_SUR_8 >> 1), temp , tmp[4]); in SBC_FastIDCT4() 222 tmp[6] = tmp[2] + tmp[5]; in SBC_FastIDCT4() 223 tmp[7] = tmp[3] - tmp[4]; in SBC_FastIDCT4() [all …]
|
/hal_espressif-latest/components/bt/porting/ext/tinycrypt/src/ |
D | ecc.c | 225 uECC_word_t tmp[NUM_ECC_WORDS]; in uECC_vli_cmp() local 226 uECC_word_t neg = !!uECC_vli_sub(tmp, left, right, num_words); in uECC_vli_cmp() 227 uECC_word_t equal = uECC_vli_isZero(tmp, num_words); in uECC_vli_cmp() 324 uECC_word_t tmp[2 * NUM_ECC_WORDS]; in uECC_vli_mmod() local 325 uECC_word_t *v[2] = {tmp, product}; in uECC_vli_mmod() 523 unsigned int tmp[NUM_ECC_WORDS]; in vli_mmod_fast_secp256r1() local 530 tmp[0] = tmp[1] = tmp[2] = 0; in vli_mmod_fast_secp256r1() 531 tmp[3] = product[11]; in vli_mmod_fast_secp256r1() 532 tmp[4] = product[12]; in vli_mmod_fast_secp256r1() 533 tmp[5] = product[13]; in vli_mmod_fast_secp256r1() [all …]
|
D | ecc_dsa.c | 104 uECC_word_t tmp[NUM_ECC_WORDS]; in uECC_sign_with_k() local 106 uECC_word_t *k2[2] = {tmp, s}; in uECC_sign_with_k() 119 carry = regularize_k(k, tmp, s, curve); in uECC_sign_with_k() 128 uECC_vli_clear(tmp, num_n_words); in uECC_sign_with_k() 129 tmp[0] = 1; in uECC_sign_with_k() 131 else if (!uECC_generate_random_int(tmp, curve->n, num_n_words)) { in uECC_sign_with_k() 137 uECC_vli_modMult(k, k, tmp, curve->n, num_n_words); /* k' = rand * k */ in uECC_sign_with_k() 139 uECC_vli_modMult(k, k, tmp, curve->n, num_n_words); /* k = 1 / k */ in uECC_sign_with_k() 144 uECC_vli_bytesToNative(tmp, private_key, BITS_TO_BYTES(curve->num_n_bits)); in uECC_sign_with_k() 148 uECC_vli_modMult(s, tmp, s, curve->n, num_n_words); /* s = r*d */ in uECC_sign_with_k() [all …]
|
D | ecc_dh.c | 151 uECC_word_t tmp[NUM_ECC_WORDS]; in uECC_shared_secret() local 152 uECC_word_t *p2[2] = {_private, tmp}; in uECC_shared_secret() 172 carry = regularize_k(_private, _private, tmp, curve); in uECC_shared_secret() 194 memset(tmp, 0, sizeof(tmp)); in uECC_shared_secret() 195 __asm__ __volatile__("" :: "g"(tmp) : "memory"); in uECC_shared_secret()
|
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_common/tinycrypt/src/ |
D | ecc.c | 225 uECC_word_t tmp[NUM_ECC_WORDS]; in uECC_vli_cmp() local 226 uECC_word_t neg = !!uECC_vli_sub(tmp, left, right, num_words); in uECC_vli_cmp() 227 uECC_word_t equal = uECC_vli_isZero(tmp, num_words); in uECC_vli_cmp() 324 uECC_word_t tmp[2 * NUM_ECC_WORDS]; in uECC_vli_mmod() local 325 uECC_word_t *v[2] = {tmp, product}; in uECC_vli_mmod() 523 unsigned int tmp[NUM_ECC_WORDS]; in vli_mmod_fast_secp256r1() local 530 tmp[0] = tmp[1] = tmp[2] = 0; in vli_mmod_fast_secp256r1() 531 tmp[3] = product[11]; in vli_mmod_fast_secp256r1() 532 tmp[4] = product[12]; in vli_mmod_fast_secp256r1() 533 tmp[5] = product[13]; in vli_mmod_fast_secp256r1() [all …]
|
D | ecc_dsa.c | 104 uECC_word_t tmp[NUM_ECC_WORDS]; in uECC_sign_with_k() local 106 uECC_word_t *k2[2] = {tmp, s}; in uECC_sign_with_k() 119 carry = regularize_k(k, tmp, s, curve); in uECC_sign_with_k() 128 uECC_vli_clear(tmp, num_n_words); in uECC_sign_with_k() 129 tmp[0] = 1; in uECC_sign_with_k() 130 } else if (!uECC_generate_random_int(tmp, curve->n, num_n_words)) { in uECC_sign_with_k() 136 uECC_vli_modMult(k, k, tmp, curve->n, num_n_words); /* k' = rand * k */ in uECC_sign_with_k() 138 uECC_vli_modMult(k, k, tmp, curve->n, num_n_words); /* k = 1 / k */ in uECC_sign_with_k() 143 uECC_vli_bytesToNative(tmp, private_key, BITS_TO_BYTES(curve->num_n_bits)); in uECC_sign_with_k() 147 uECC_vli_modMult(s, tmp, s, curve->n, num_n_words); /* s = r*d */ in uECC_sign_with_k() [all …]
|
D | ecc_dh.c | 152 uECC_word_t tmp[NUM_ECC_WORDS]; in uECC_shared_secret() local 153 uECC_word_t *p2[2] = {_private, tmp}; in uECC_shared_secret() 173 carry = regularize_k(_private, _private, tmp, curve); in uECC_shared_secret() 194 _set_secure(tmp, 0, sizeof(tmp)); in uECC_shared_secret()
|
/hal_espressif-latest/components/wpa_supplicant/src/tls/ |
D | rsa.c | 259 struct bignum *tmp, *a = NULL, *b = NULL; in crypto_rsa_exptmod() local 266 tmp = bignum_init(); in crypto_rsa_exptmod() 267 if (tmp == NULL) in crypto_rsa_exptmod() 270 if (bignum_set_unsigned_bin(tmp, in, inlen) < 0) in crypto_rsa_exptmod() 272 if (bignum_cmp(key->n, tmp) < 0) { in crypto_rsa_exptmod() 297 if (bignum_exptmod(tmp, key->dmp1, key->p, a) < 0) in crypto_rsa_exptmod() 301 if (bignum_exptmod(tmp, key->dmq1, key->q, b) < 0) in crypto_rsa_exptmod() 305 if (bignum_sub(a, b, tmp) < 0 || in crypto_rsa_exptmod() 306 bignum_mulmod(tmp, key->iqmp, key->p, tmp) < 0) in crypto_rsa_exptmod() 310 if (bignum_mul(tmp, key->q, tmp) < 0 || in crypto_rsa_exptmod() [all …]
|
D | asn1.c | 174 u8 tmp; in asn1_get_next() local 204 tmp = *pos++; in asn1_get_next() 206 "0x%02x", tmp); in asn1_get_next() 207 hdr->tag = (hdr->tag << 7) | (tmp & 0x7f); in asn1_get_next() 208 } while (tmp & 0x80); in asn1_get_next() 225 tmp = *pos++; in asn1_get_next() 226 if (tmp & 0x80) { in asn1_get_next() 227 if (tmp == 0xff) { in asn1_get_next() 232 tmp &= 0x7f; /* number of subsequent octets */ in asn1_get_next() 234 if (tmp == 0 || pos == end || *pos == 0) { in asn1_get_next() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/port/ |
D | eloop.c | 91 struct eloop_timeout *timeout, *tmp; in eloop_register_timeout_debug() local 127 dl_list_for_each(tmp, &eloop.timeout, struct eloop_timeout, list) { in eloop_register_timeout_debug() 128 if (os_reltime_before(&timeout->time, &tmp->time)) { in eloop_register_timeout_debug() 130 dl_list_add(tmp->list.prev, &timeout->list); in eloop_register_timeout_debug() 254 struct eloop_timeout *tmp; in eloop_is_timeout_registered() local 256 dl_list_for_each(tmp, &eloop.timeout, struct eloop_timeout, list) { in eloop_is_timeout_registered() 257 if (tmp->handler == handler && in eloop_is_timeout_registered() 258 tmp->eloop_data == eloop_data && in eloop_is_timeout_registered() 259 tmp->user_data == user_data) { in eloop_is_timeout_registered() 272 struct eloop_timeout *tmp; in eloop_deplete_timeout() local [all …]
|
/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/crypto/ |
D | crypto_mbedtls-bignum.c | 174 struct crypto_bignum *tmp = crypto_bignum_init(); in crypto_bignum_sqrmod() local 175 if (!tmp) { in crypto_bignum_sqrmod() 179 res = mbedtls_mpi_copy((mbedtls_mpi *) tmp,(const mbedtls_mpi *) a); in crypto_bignum_sqrmod() 180 res = crypto_bignum_mulmod(a,tmp,b,c); in crypto_bignum_sqrmod() 182 crypto_bignum_deinit(tmp, 0); in crypto_bignum_sqrmod() 240 mbedtls_mpi exp, tmp; in crypto_bignum_legendre() local 244 mbedtls_mpi_init(&tmp); in crypto_bignum_legendre() 249 …MBEDTLS_MPI_CHK(mbedtls_mpi_exp_mod(&tmp, (const mbedtls_mpi *) a, &exp, (const mbedtls_mpi *) p, … in crypto_bignum_legendre() 251 if (mbedtls_mpi_cmp_int(&tmp, 1) == 0) { in crypto_bignum_legendre() 253 } else if (mbedtls_mpi_cmp_int(&tmp, 0) == 0 in crypto_bignum_legendre() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/crypto/ |
D | aes-siv.c | 67 u8 tmp[AES_BLOCK_SIZE], tmp2[AES_BLOCK_SIZE]; in aes_s2v() local 75 os_memcpy(tmp, zero, sizeof(zero)); in aes_s2v() 76 tmp[AES_BLOCK_SIZE - 1] = 1; in aes_s2v() 77 data[0] = tmp; in aes_s2v() 78 data_len[0] = sizeof(tmp); in aes_s2v() 84 ret = omac1_aes_vector(key, key_len, 1, data, data_len, tmp); in aes_s2v() 94 dbl(tmp); in aes_s2v() 95 xor(tmp, tmp2); in aes_s2v() 102 xorend(buf, len[i], tmp, AES_BLOCK_SIZE); in aes_s2v() 109 dbl(tmp); in aes_s2v() [all …]
|
D | sha1-pbkdf2.c | 18 unsigned char tmp[SHA1_MAC_LEN], tmp2[SHA1_MAC_LEN]; in pbkdf2_sha1_f() local 41 tmp)) in pbkdf2_sha1_f() 43 os_memcpy(digest, tmp, SHA1_MAC_LEN); in pbkdf2_sha1_f() 46 if (hmac_sha1((u8 *) passphrase, passphrase_len, tmp, in pbkdf2_sha1_f() 49 os_memcpy(tmp, tmp2, SHA1_MAC_LEN); in pbkdf2_sha1_f()
|
D | aes-gcm.c | 107 u8 tmp[16]; in ghash() local 119 gf_mult(y, h, tmp); in ghash() 120 os_memcpy(y, tmp, 16); in ghash() 126 os_memcpy(tmp, xpos, last); in ghash() 127 os_memset(tmp + last, 0, sizeof(tmp) - last); in ghash() 130 xor_block(y, tmp); in ghash() 135 gf_mult(y, h, tmp); in ghash() 136 os_memcpy(y, tmp, 16); in ghash() 146 u8 cb[AES_BLOCK_SIZE], tmp[AES_BLOCK_SIZE]; in aes_gctr() local 168 aes_encrypt(aes, cb, tmp); in aes_gctr() [all …]
|
D | crypto_internal-modexp.c | 62 struct bignum *p, *q, *tmp; in crypto_dh_derive_secret() local 68 tmp = bignum_init(); in crypto_dh_derive_secret() 69 failed = !p || !q || !tmp || in crypto_dh_derive_secret() 72 bignum_exptmod(pub, q, p, tmp) < 0 || in crypto_dh_derive_secret() 73 bignum_cmp_d(tmp, 1) != 0; in crypto_dh_derive_secret() 76 bignum_deinit(tmp); in crypto_dh_derive_secret()
|
D | aes-cbc.c | 63 u8 cbc[AES_BLOCK_SIZE], tmp[AES_BLOCK_SIZE]; in aes_128_cbc_decrypt() local 77 os_memcpy(tmp, pos, AES_BLOCK_SIZE); in aes_128_cbc_decrypt() 81 os_memcpy(cbc, tmp, AES_BLOCK_SIZE); in aes_128_cbc_decrypt()
|
D | crypto_internal-cipher.c | 170 u8 tmp[32]; in crypto_cipher_decrypt() local 185 os_memcpy(tmp, crypt, AES_BLOCK_SIZE); in crypto_cipher_decrypt() 189 os_memcpy(ctx->u.aes.cbc, tmp, AES_BLOCK_SIZE); in crypto_cipher_decrypt() 199 os_memcpy(tmp, crypt, 8); in crypto_cipher_decrypt() 203 os_memcpy(ctx->u.des3.cbc, tmp, 8); in crypto_cipher_decrypt() 213 os_memcpy(tmp, crypt, 8); in crypto_cipher_decrypt() 217 os_memcpy(ctx->u.des.cbc, tmp, 8); in crypto_cipher_decrypt()
|
D | aes-ccm.c | 121 u8 tmp[AES_BLOCK_SIZE]; in aes_ccm_encr_auth() local 126 aes_encrypt(aes, a, tmp); in aes_ccm_encr_auth() 128 auth[i] = x[i] ^ tmp[i]; in aes_ccm_encr_auth() 136 u8 tmp[AES_BLOCK_SIZE]; in aes_ccm_decr_auth() local 141 aes_encrypt(aes, a, tmp); in aes_ccm_decr_auth() 143 t[i] = auth[i] ^ tmp[i]; in aes_ccm_decr_auth()
|
/hal_espressif-latest/components/mbedtls/port/aes/ |
D | esp_aes_xts.c | 194 unsigned char tmp[16]; in esp_aes_crypt_xts() local 227 tmp[i] = input[i] ^ tweak[i]; in esp_aes_crypt_xts() 230 ret = esp_aes_crypt_ecb( &ctx->crypt, mode, tmp, tmp ); in esp_aes_crypt_xts() 236 output[i] = tmp[i] ^ tweak[i]; in esp_aes_crypt_xts() 262 tmp[i] = input[i] ^ t[i]; in esp_aes_crypt_xts() 268 tmp[i] = prev_output[i] ^ t[i]; in esp_aes_crypt_xts() 271 ret = esp_aes_crypt_ecb( &ctx->crypt, mode, tmp, tmp ); in esp_aes_crypt_xts() 279 prev_output[i] = tmp[i] ^ t[i]; in esp_aes_crypt_xts()
|
/hal_espressif-latest/components/wpa_supplicant/src/ap/ |
D | sta_info.c | 55 struct sta_info *tmp; in ap_sta_list_del() local 62 tmp = hapd->sta_list; in ap_sta_list_del() 63 while (tmp != NULL && tmp->next != sta) in ap_sta_list_del() 64 tmp = tmp->next; in ap_sta_list_del() 65 if (tmp == NULL) { in ap_sta_list_del() 69 tmp->next = sta->next; in ap_sta_list_del()
|
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_core/ |
D | crypto.c | 130 uint8_t tmp[16] = {0}; in bt_mesh_k3() local 134 err = bt_mesh_s1("smk3", tmp); in bt_mesh_k3() 139 err = bt_mesh_aes_cmac_one(tmp, n, 16, t); in bt_mesh_k3() 144 err = bt_mesh_aes_cmac_one(t, id64, sizeof(id64), tmp); in bt_mesh_k3() 149 memcpy(out, tmp + 8, 8); in bt_mesh_k3() 157 uint8_t tmp[16] = {0}; in bt_mesh_k4() local 161 err = bt_mesh_s1("smk4", tmp); in bt_mesh_k4() 166 err = bt_mesh_aes_cmac_one(tmp, n, 16, t); in bt_mesh_k4() 171 err = bt_mesh_aes_cmac_one(t, id6, sizeof(id6), tmp); in bt_mesh_k4() 176 out[0] = tmp[15] & BIT_MASK(6); in bt_mesh_k4() [all …]
|
/hal_espressif-latest/components/wpa_supplicant/src/utils/ |
D | base64.c | 87 unsigned char dtable[256], *out, *pos, block[4], tmp; in base64_gen_decode() local 120 tmp = dtable[val]; in base64_gen_decode() 121 if (tmp == 0x80) in base64_gen_decode() 126 block[count] = tmp; in base64_gen_decode()
|