Home
last modified time | relevance | path

Searched refs:pk (Results 1 – 22 of 22) sorted by relevance

/hal_espressif-latest/components/bootloader_support/src/secure_boot_v2/
Dsecure_boot_rsa_signature.c26 mbedtls_rsa_context pk; in verify_rsa_signature_block() local
56 mbedtls_rsa_init(&pk); in verify_rsa_signature_block()
57 mbedtls_rsa_set_padding(&pk,MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA256); in verify_rsa_signature_block()
58 ret = mbedtls_rsa_import(&pk, &N, NULL, NULL, NULL, &e); in verify_rsa_signature_block()
64 ret = mbedtls_rsa_complete(&pk); in verify_rsa_signature_block()
70 ret = mbedtls_rsa_check_pubkey(&pk); in verify_rsa_signature_block()
81 ret = mbedtls_rsa_public( &pk, sig_be, buf); in verify_rsa_signature_block()
87 …ret = mbedtls_rsa_rsassa_pss_verify( &pk, MBEDTLS_MD_SHA256, ESP_SECURE_BOOT_DIGEST_LEN, image_dig… in verify_rsa_signature_block()
94 mbedtls_rsa_free(&pk); in verify_rsa_signature_block()
/hal_espressif-latest/components/bt/host/bluedroid/stack/avrc/include/
Davrc_int.h92 #define AVRC_CTRL_PKT_LEN(pf, pk) {pf = (UINT8 *)((pk) + 1) + (pk)->offset + 2;} argument
/hal_espressif-latest/components/wpa_supplicant/src/tls/
Dtlsv1_common.c163 int tls_parse_cert(const u8 *buf, size_t len, struct crypto_public_key **pk) in tls_parse_cert() argument
170 *pk = crypto_public_key_from_cert(buf, len); in tls_parse_cert()
171 if (*pk) in tls_parse_cert()
193 *pk = crypto_public_key_import(cert->public_key, cert->public_key_len); in tls_parse_cert()
196 if (*pk == NULL) { in tls_parse_cert()
416 int tls_verify_signature(u16 tls_version, struct crypto_public_key *pk, in tls_verify_signature() argument
443 if (pk == NULL) { in tls_verify_signature()
455 if (crypto_public_key_decrypt_pkcs1(pk, pos, end - pos, buf, &buflen) < in tls_verify_signature()
Dpkcs1.h24 int pkcs1_v15_sig_ver(struct crypto_public_key *pk,
Dtlsv1_common.h253 int tls_parse_cert(const u8 *buf, size_t len, struct crypto_public_key **pk);
271 int tls_verify_signature(u16 tls_version, struct crypto_public_key *pk,
Dpkcs1.c200 int pkcs1_v15_sig_ver(struct crypto_public_key *pk, in pkcs1_v15_sig_ver() argument
216 res = crypto_public_key_decrypt_pkcs1(pk, s, s_len, decrypted, in pkcs1_v15_sig_ver()
Dx509v3.c1846 struct crypto_public_key *pk; in x509_check_signature() local
1865 pk = crypto_public_key_import(issuer->public_key, in x509_check_signature()
1867 if (pk == NULL) in x509_check_signature()
1873 crypto_public_key_free(pk); in x509_check_signature()
1877 if (crypto_public_key_decrypt_pkcs1(pk, sign_value, in x509_check_signature()
1881 crypto_public_key_free(pk); in x509_check_signature()
1885 crypto_public_key_free(pk); in x509_check_signature()
/hal_espressif-latest/components/wpa_supplicant/src/common/
Dsae.h122 unsigned int pk:1; member
134 int *rejected_groups, const struct sae_pk *pk);
170 void sae_deinit_pk(struct sae_pk *pk);
Ddpp.c599 const char *chan_list = NULL, *mac = NULL, *info = NULL, *pk = NULL; in dpp_parse_uri() local
628 else if (pos[0] == 'K' && pos[1] == ':' && !pk) in dpp_parse_uri()
629 pk = pos + 2; in dpp_parse_uri()
637 if (!pk) { in dpp_parse_uri()
650 dpp_parse_uri_pk(bi, pk) < 0) { in dpp_parse_uri()
1477 char *pk = NULL; in dpp_autogen_bootstrap_key() local
1487 pk = dpp_keygen(bi, auth->peer_bi->curve->name, NULL, 0); in dpp_autogen_bootstrap_key()
1488 if (!pk) in dpp_autogen_bootstrap_key()
1492 len += 4 + os_strlen(pk); in dpp_autogen_bootstrap_key()
1496 os_snprintf(bi->uri, len + 1, "DPP:K:%s;;", pk); in dpp_autogen_bootstrap_key()
[all …]
Dsae.c1312 sae->pk = 0; in sae_prepare_commit()
1319 int *rejected_groups, const struct sae_pk *pk) in sae_prepare_commit_pt() argument
1337 sae->tmp->ap_pk = pk; in sae_prepare_commit_pt()
1551 if (sae->pk) { in sae_derive_keys()
1577 if (sae->pk) { in sae_derive_keys()
Dsae_pk.c627 if (!sae->pk || tmp->ap_pk) { in sae_check_confirm_pk()
/hal_espressif-latest/components/mbedtls/esp_crt_bundle/
Desp_crt_bundle.c44 if ( (ret = mbedtls_pk_parse_public_key(&parent.pk, pub_key_buf, pub_key_len) ) != 0) { in esp_crt_check_signature()
51 if (!mbedtls_pk_can_do(&parent.pk, child->MBEDTLS_PRIVATE(sig_pk))) { in esp_crt_check_signature()
63 …bedtls_pk_verify_ext( child->MBEDTLS_PRIVATE(sig_pk), child->MBEDTLS_PRIVATE(sig_opts), &parent.pk, in esp_crt_check_signature()
/hal_espressif-latest/components/bt/controller/esp32c2/
Dbt.c1300 uint8_t pk[64]; in ble_sm_alg_gen_dhkey() local
1304 swap_buf(pk, peer_pub_key_x, 32); in ble_sm_alg_gen_dhkey()
1305 swap_buf(&pk[32], peer_pub_key_y, 32); in ble_sm_alg_gen_dhkey()
1317 memcpy(&pub[1], pk, 64); in ble_sm_alg_gen_dhkey()
1377 if (uECC_valid_public_key(pk, &curve_secp256r1) < 0) { in ble_sm_alg_gen_dhkey()
1381 rc = uECC_shared_secret(pk, priv, dh, &curve_secp256r1); in ble_sm_alg_gen_dhkey()
1449 uint8_t pk[64]; in ble_sm_alg_gen_key_pair()
1453 if (mbedtls_gen_keypair(pk, priv) != 0) { in ble_sm_alg_gen_key_pair()
1457 if (uECC_make_key(pk, priv, &curve_secp256r1) != TC_CRYPTO_SUCCESS) { in ble_sm_alg_gen_key_pair()
1464 swap_buf(pub, pk, 32); in ble_sm_alg_gen_key_pair()
[all …]
/hal_espressif-latest/components/bt/controller/esp32c6/
Dbt.c1395 uint8_t pk[64]; in ble_sm_alg_gen_dhkey() local
1399 swap_buf(pk, peer_pub_key_x, 32); in ble_sm_alg_gen_dhkey()
1400 swap_buf(&pk[32], peer_pub_key_y, 32); in ble_sm_alg_gen_dhkey()
1412 memcpy(&pub[1], pk, 64); in ble_sm_alg_gen_dhkey()
1472 if (uECC_valid_public_key(pk, &curve_secp256r1) < 0) { in ble_sm_alg_gen_dhkey()
1476 rc = uECC_shared_secret(pk, priv, dh, &curve_secp256r1); in ble_sm_alg_gen_dhkey()
1544 uint8_t pk[64]; in ble_sm_alg_gen_key_pair()
1548 if (mbedtls_gen_keypair(pk, priv) != 0) { in ble_sm_alg_gen_key_pair()
1552 if (uECC_make_key(pk, priv, &curve_secp256r1) != TC_CRYPTO_SUCCESS) { in ble_sm_alg_gen_key_pair()
1559 swap_buf(pub, pk, 32); in ble_sm_alg_gen_key_pair()
[all …]
/hal_espressif-latest/components/bt/controller/esp32h2/
Dbt.c1372 uint8_t pk[64]; in ble_sm_alg_gen_dhkey() local
1376 swap_buf(pk, peer_pub_key_x, 32); in ble_sm_alg_gen_dhkey()
1377 swap_buf(&pk[32], peer_pub_key_y, 32); in ble_sm_alg_gen_dhkey()
1389 memcpy(&pub[1], pk, 64); in ble_sm_alg_gen_dhkey()
1449 if (uECC_valid_public_key(pk, &curve_secp256r1) < 0) { in ble_sm_alg_gen_dhkey()
1453 rc = uECC_shared_secret(pk, priv, dh, &curve_secp256r1); in ble_sm_alg_gen_dhkey()
1521 uint8_t pk[64]; in ble_sm_alg_gen_key_pair()
1525 if (mbedtls_gen_keypair(pk, priv) != 0) { in ble_sm_alg_gen_key_pair()
1529 if (uECC_make_key(pk, priv, &curve_secp256r1) != TC_CRYPTO_SUCCESS) { in ble_sm_alg_gen_key_pair()
1536 swap_buf(pub, pk, 32); in ble_sm_alg_gen_key_pair()
[all …]
/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/crypto/
Dcrypto_mbedtls-rsa.c161 if(mbedtls_pk_setup(kctx, mbedtls_pk_info_from_type(mbedtls_pk_get_type(&cert->pk))) != 0) { in crypto_public_key_from_cert()
165 ret = mbedtls_rsa_copy(mbedtls_pk_rsa(*kctx), mbedtls_pk_rsa(cert->pk)); in crypto_public_key_from_cert()
Dtls_mbedtls.c481 (tls->cacert_ptr && mbedtls_pk_get_bitlen(&tls->cacert_ptr->pk) > 2048)) { in tls_set_ciphersuite()
/hal_espressif-latest/components/wpa_supplicant/src/wps/
Dwps_enrollee.c569 static int wps_process_pubkey(struct wps_data *wps, const u8 *pk, in wps_process_pubkey() argument
572 if (pk == NULL || pk_len == 0) { in wps_process_pubkey()
579 sha256_vector(1, &pk, &pk_len, hash); in wps_process_pubkey()
584 pk, pk_len); in wps_process_pubkey()
596 wps->dh_pubkey_r = wpabuf_alloc_copy(pk, pk_len); in wps_process_pubkey()
Dwps_registrar.c2415 static int wps_process_pubkey(struct wps_data *wps, const u8 *pk, in wps_process_pubkey() argument
2418 if (pk == NULL || pk_len == 0) { in wps_process_pubkey()
2424 wps->dh_pubkey_e = wpabuf_alloc_copy(pk, pk_len); in wps_process_pubkey()
/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/
Desp_wpa3.c134 g_sae_data.pk = 1; in wpa3_build_sae_commit()
/hal_espressif-latest/tools/esptool_py/espsecure/
D__init__.py562 for sig, pk in zip(signature, pub_key):
564 public_key = _get_sbv2_pub_key(pk)
/hal_espressif-latest/components/mbedtls/port/mbedtls_rom/
Dmbedtls_rom_osi.h263 …mbedtls_pk_parse_subpubkey)( unsigned char **p, const unsigned char *end, mbedtls_pk_context *pk );
347 unsigned char (*_rom_mbedtls_ssl_sig_from_pk)( mbedtls_pk_context *pk );