Home
last modified time | relevance | path

Searched refs:plen (Results 1 – 25 of 29) sorted by relevance

12

/hal_espressif-latest/components/bt/porting/ext/tinycrypt/src/
Dccm_mode.c140 unsigned int plen, TCCcmMode_t c) in tc_ccm_generation_encryption() argument
146 ((plen > 0) && (payload == (uint8_t *) 0)) || in tc_ccm_generation_encryption()
149 (plen >= TC_CCM_PAYLOAD_MAX_BYTES) || /* payload size unsupported */ in tc_ccm_generation_encryption()
150 (olen < (plen + c->mlen))) { /* invalid output buffer size */ in tc_ccm_generation_encryption()
165 b[14] = (uint8_t)(plen >> 8); in tc_ccm_generation_encryption()
166 b[15] = (uint8_t)(plen); in tc_ccm_generation_encryption()
173 if (plen > 0) { in tc_ccm_generation_encryption()
174 ccm_cbc_mac(tag, payload, plen, 0, c->sched); in tc_ccm_generation_encryption()
184 ccm_ctr_mode(out, plen, payload, plen, b, c->sched); in tc_ccm_generation_encryption()
190 out += plen; in tc_ccm_generation_encryption()
[all …]
Dhmac_prng.c114 unsigned int plen) in tc_hmac_prng_init() argument
120 plen > MAX_PLEN) { in tc_hmac_prng_init()
130 update(prng, personalization, plen); in tc_hmac_prng_init()
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_common/tinycrypt/src/
Dccm_mode.c140 unsigned int plen, TCCcmMode_t c) in tc_ccm_generation_encryption() argument
146 ((plen > 0) && (payload == (uint8_t *) 0)) || in tc_ccm_generation_encryption()
149 (plen >= TC_CCM_PAYLOAD_MAX_BYTES) || /* payload size unsupported */ in tc_ccm_generation_encryption()
150 (olen < (plen + c->mlen))) { /* invalid output buffer size */ in tc_ccm_generation_encryption()
165 b[14] = (uint8_t)(plen >> 8); in tc_ccm_generation_encryption()
166 b[15] = (uint8_t)(plen); in tc_ccm_generation_encryption()
173 if (plen > 0) { in tc_ccm_generation_encryption()
174 ccm_cbc_mac(tag, payload, plen, 0, c->sched); in tc_ccm_generation_encryption()
184 ccm_ctr_mode(out, plen, payload, plen, b, c->sched); in tc_ccm_generation_encryption()
190 out += plen; in tc_ccm_generation_encryption()
[all …]
Dhmac_prng.c136 unsigned int plen) in tc_hmac_prng_init() argument
142 plen > MAX_PLEN) { in tc_hmac_prng_init()
150 update(prng, personalization, plen, 0, 0); in tc_hmac_prng_init()
/hal_espressif-latest/components/wpa_supplicant/src/tls/
Dtlsv1_record.c356 size_t plen; in tlsv1_record_receive() local
362 plen = in_len; in tlsv1_record_receive()
364 "data", out_data, plen); in tlsv1_record_receive()
380 if (plen < rl->iv_size) { in tlsv1_record_receive()
387 plen - rl->iv_size); in tlsv1_record_receive()
388 plen -= rl->iv_size; in tlsv1_record_receive()
392 if (plen == 0) { in tlsv1_record_receive()
398 padlen = out_data[plen - 1]; in tlsv1_record_receive()
399 if (padlen >= plen) { in tlsv1_record_receive()
403 padlen, (unsigned long) plen); in tlsv1_record_receive()
[all …]
Dtlsv1_cred.c92 size_t i, plen; in search_tag() local
94 plen = os_strlen(tag); in search_tag()
95 if (len < plen) in search_tag()
98 for (i = 0; i < len - plen; i++) { in search_tag()
99 if (os_memcmp(buf + i, tag, plen) == 0) in search_tag()
/hal_espressif-latest/components/wpa_supplicant/src/crypto/
Dccmp.c195 size_t aad_len, plen; in ccmp_encrypt() local
201 plen = len - hdrlen; in ccmp_encrypt()
203 crypt = os_malloc(hdrlen + 8 + plen + 8 + AES_BLOCK_SIZE); in ccmp_encrypt()
225 if (aes_ccm_ae(tk, 16, nonce, 8, frame + hdrlen + 8, plen, aad, aad_len, in ccmp_encrypt()
226 pos, pos + plen) < 0) { in ccmp_encrypt()
232 wpa_hexdump(MSG_MSGDUMP, "CCMP encrypted", crypt + hdrlen + 8, plen); in ccmp_encrypt()
234 *encrypted_len = hdrlen + 8 + plen + 8; in ccmp_encrypt()
246 size_t aad_len, plen; in ccmp_encrypt_pv1() local
252 plen = len - hdrlen; in ccmp_encrypt_pv1()
254 crypt = os_malloc(hdrlen + plen + 8 + AES_BLOCK_SIZE); in ccmp_encrypt_pv1()
[all …]
Dsha1-pbkdf2.c77 size_t left = buflen, plen; in pbkdf2_sha1() local
85 plen = left > SHA1_MAC_LEN ? SHA1_MAC_LEN : left; in pbkdf2_sha1()
86 os_memcpy(pos, digest, plen); in pbkdf2_sha1()
87 pos += plen; in pbkdf2_sha1()
88 left -= plen; in pbkdf2_sha1()
Dsha256-prf.c59 size_t pos, plen; in sha256_prf_bits() local
78 plen = buf_len - pos; in sha256_prf_bits()
80 if (plen >= SHA256_MAC_LEN) { in sha256_prf_bits()
89 os_memcpy(&buf[pos], hash, plen); in sha256_prf_bits()
90 pos += plen; in sha256_prf_bits()
Dsha384-prf.c59 size_t pos, plen; in sha384_prf_bits() local
78 plen = buf_len - pos; in sha384_prf_bits()
80 if (plen >= SHA384_MAC_LEN) { in sha384_prf_bits()
89 os_memcpy(&buf[pos], hash, plen); in sha384_prf_bits()
90 pos += plen; in sha384_prf_bits()
Dsha1-prf.c34 size_t pos, plen; in sha1_prf() local
49 plen = buf_len - pos; in sha1_prf()
50 if (plen >= SHA1_MAC_LEN) { in sha1_prf()
59 os_memcpy(&buf[pos], hash, plen); in sha1_prf()
Dsha1-tprf.c33 size_t pos, plen; in sha1_t_prf() local
56 plen = buf_len - pos; in sha1_t_prf()
59 if (plen >= SHA1_MAC_LEN) { in sha1_t_prf()
63 os_memcpy(&buf[pos], hash, plen); in sha1_t_prf()
/hal_espressif-latest/components/bootloader_support/src/secure_boot_v2/
Dsecure_boot_ecdsa_signature.c83 size_t plen = mbedtls_mpi_size(&ecdsa_context.MBEDTLS_PRIVATE(grp).P); in verify_ecdsa_signature_block() local
85 for (int i = 0; i < plen; i++) { in verify_ecdsa_signature_block()
86 x_point[i] = trusted_block->ecdsa.key.point[plen - 1 - i]; in verify_ecdsa_signature_block()
87 y_point[i] = trusted_block->ecdsa.key.point[2 * plen - 1 - i]; in verify_ecdsa_signature_block()
91 …_CHK(mbedtls_mpi_read_binary(&ecdsa_context.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(X), x_point, plen)); in verify_ecdsa_signature_block()
92 …_CHK(mbedtls_mpi_read_binary(&ecdsa_context.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(Y), y_point, plen)); in verify_ecdsa_signature_block()
/hal_espressif-latest/components/wpa_supplicant/src/eap_peer/
Deap_peap_common.c23 size_t pos, plen; in peap_prfplus() local
74 plen = buf_len - pos; in peap_prfplus()
77 if (plen >= SHA1_MAC_LEN) { in peap_prfplus()
81 os_memcpy(&buf[pos], hash, plen); in peap_prfplus()
Deap_common.c67 const struct wpabuf *msg, size_t *plen) in eap_hdr_validate() argument
99 *plen = len - sizeof(*hdr) - 8; in eap_hdr_validate()
106 *plen = len - sizeof(*hdr) - 1; in eap_hdr_validate()
Deap_common.h16 const struct wpabuf *msg, size_t *plen);
/hal_espressif-latest/components/bootloader_support/src/secure_boot_v1/
Dsecure_boot_signatures_app.c106 size_t plen = mbedtls_mpi_size(&ecdsa_context.MBEDTLS_PRIVATE(grp).P); in esp_secure_boot_verify_ecdsa_signature_block()
107 if (keylen != 2 * plen) { in esp_secure_boot_verify_ecdsa_signature_block()
114 …ary(&ecdsa_context.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(X), signature_verification_key_start, plen)); in esp_secure_boot_verify_ecdsa_signature_block()
115 …dsa_context.MBEDTLS_PRIVATE(Q).MBEDTLS_PRIVATE(Y), signature_verification_key_start + plen, plen)); in esp_secure_boot_verify_ecdsa_signature_block()
/hal_espressif-latest/components/bt/porting/ext/tinycrypt/include/tinycrypt/
Dccm_mode.h159 unsigned int plen, TCCcmMode_t c);
204 unsigned int alen, const uint8_t *payload, unsigned int plen,
Dhmac_prng.h117 unsigned int plen);
/hal_espressif-latest/components/bt/esp_ble_mesh/mesh_common/tinycrypt/include/tinycrypt/
Dccm_mode.h159 unsigned int plen, TCCcmMode_t c);
204 unsigned int alen, const uint8_t *payload, unsigned int plen,
Dhmac_prng.h117 unsigned int plen);
/hal_espressif-latest/components/wpa_supplicant/esp_supplicant/src/
Desp_eap_client.c340 size_t plen; in eap_sm_process_request() local
354 plen = be_to_host16(ehdr->length); in eap_sm_process_request()
355 if (plen > wpabuf_len(reqData)) { in eap_sm_process_request()
377 if (plen < sizeof(*ehdr) + 8) { in eap_sm_process_request()
524 u32 plen, data_len; in eap_sm_rx_eapol_internal() local
547 plen = be_to_host16(hdr->length); in eap_sm_rx_eapol_internal()
548 data_len = plen + sizeof(*hdr); in eap_sm_rx_eapol_internal()
551 hdr->version, hdr->type, plen); in eap_sm_rx_eapol_internal()
561 if (plen > len - sizeof(*hdr) || plen < sizeof(*ehdr)) { in eap_sm_rx_eapol_internal()
564 (unsigned long) plen, (unsigned long) len); in eap_sm_rx_eapol_internal()
Desp_wps.c965 u32 plen, data_len, eap_len; in wps_sm_rx_eapol_internal() local
990 plen = be_to_host16(hdr->length); in wps_sm_rx_eapol_internal()
991 data_len = plen + sizeof(*hdr); in wps_sm_rx_eapol_internal()
995 hdr->version, hdr->type, plen); in wps_sm_rx_eapol_internal()
1006 if (plen > len - sizeof(*hdr) || plen < sizeof(*ehdr)) { in wps_sm_rx_eapol_internal()
1009 (unsigned long) plen, (unsigned long) len); in wps_sm_rx_eapol_internal()
1021 if (eap_len != plen) { in wps_sm_rx_eapol_internal()
1024 (unsigned long) eap_len, (unsigned long) plen); in wps_sm_rx_eapol_internal()
1055 … wpa_printf(MSG_DEBUG, "=========expanded plen[%" PRId32 "], %d===========", plen, sizeof(*ehdr)); in wps_sm_rx_eapol_internal()
1059 ret = wps_process_wps_mX_req(tmp, plen - sizeof(*ehdr) - 1, &res); in wps_sm_rx_eapol_internal()
/hal_espressif-latest/components/wpa_supplicant/src/eap_server/
Deap_server_wsc.c141 size_t send_len, plen; in eap_wsc_build_msg() local
153 plen = 2 + send_len; in eap_wsc_build_msg()
155 plen += 2; in eap_wsc_build_msg()
156 req = eap_msg_alloc(EAP_VENDOR_WFA, EAP_VENDOR_TYPE_WSC, plen, in eap_wsc_build_msg()
Deap_server.c85 size_t plen = 1; in eap_sm_buildInitiateReauthStart() local
92 plen += 2 + domain_len; in eap_sm_buildInitiateReauthStart()
96 (enum eap_type) EAP_ERP_TYPE_REAUTH_START, plen, in eap_sm_buildInitiateReauthStart()
709 size_t plen; in erp_send_finish_reauth() local
729 plen = 1 + 2 + 2 + os_strlen(nai); in erp_send_finish_reauth()
731 plen += 1 + hash_len; in erp_send_finish_reauth()
734 plen, EAP_CODE_FINISH, id); in erp_send_finish_reauth()
1501 size_t plen; in eap_sm_parseEapResp() local
1519 plen = be_to_host16(hdr->length); in eap_sm_parseEapResp()
1520 if (plen > wpabuf_len(resp)) { in eap_sm_parseEapResp()
[all …]

12