Searched refs:apkt (Results 1 – 3 of 3) sorted by relevance
/Zephyr-latest/drivers/crypto/ |
D | crypto_mtls_shim.c | 181 struct cipher_aead_pkt *apkt, in mtls_ccm_encrypt_auth() argument 187 ret = mbedtls_ccm_encrypt_and_tag(mtls_ctx, apkt->pkt->in_len, nonce, in mtls_ccm_encrypt_auth() 189 apkt->ad, apkt->ad_len, in mtls_ccm_encrypt_auth() 190 apkt->pkt->in_buf, in mtls_ccm_encrypt_auth() 191 apkt->pkt->out_buf, apkt->tag, in mtls_ccm_encrypt_auth() 203 apkt->pkt->out_len = apkt->pkt->in_len; in mtls_ccm_encrypt_auth() 204 apkt->pkt->out_len += ctx->mode_params.ccm_info.tag_len; in mtls_ccm_encrypt_auth() 210 struct cipher_aead_pkt *apkt, in mtls_ccm_decrypt_auth() argument 216 ret = mbedtls_ccm_auth_decrypt(mtls_ctx, apkt->pkt->in_len, nonce, in mtls_ccm_decrypt_auth() 218 apkt->ad, apkt->ad_len, in mtls_ccm_decrypt_auth() [all …]
|
/Zephyr-latest/drivers/ieee802154/ |
D | ieee802154_cc2520.c | 1157 struct cipher_aead_pkt *apkt, uint8_t m) in generate_nonce() argument 1159 nonce[0] = 0 | (apkt->ad_len ? 0x40 : 0) | (m << 3) | 1; in generate_nonce() 1163 nonce[14] = (uint8_t)(apkt->pkt->in_len >> 8); in generate_nonce() 1164 nonce[15] = (uint8_t)(apkt->pkt->in_len); in generate_nonce() 1171 struct cipher_aead_pkt *apkt, in insert_crypto_parameters() argument 1180 if (!apkt->pkt->out_buf || !apkt->pkt->out_buf_max) { in insert_crypto_parameters() 1195 if (!apkt->ad || !apkt->ad_len) { in insert_crypto_parameters() 1200 if (apkt->pkt->in_buf && apkt->pkt->in_buf - apkt->ad_len != apkt->ad) { in insert_crypto_parameters() 1205 if (!apkt->pkt->in_buf) { in insert_crypto_parameters() 1211 in_buf = apkt->ad; in insert_crypto_parameters() [all …]
|
/Zephyr-latest/subsys/net/l2/ieee802154/ |
D | ieee802154_security.c | 104 struct cipher_aead_pkt *apkt, struct cipher_pkt *pkt) in prepare_cipher_aead_pkt() argument 125 apkt->ad = is_authenticated ? frame : NULL; in prepare_cipher_aead_pkt() 126 apkt->ad_len = auth_len; in prepare_cipher_aead_pkt() 127 apkt->tag = is_authenticated ? frame + ll_hdr_len + payload_len : NULL; in prepare_cipher_aead_pkt() 128 apkt->pkt = pkt; in prepare_cipher_aead_pkt() 135 struct cipher_aead_pkt apkt; in ieee802154_decrypt_auth() local 152 prepare_cipher_aead_pkt(frame, level, ll_hdr_len, payload_len, authtag_len, &apkt, &pkt); in ieee802154_decrypt_auth() 154 ret = cipher_ccm_op(&sec_ctx->dec, &apkt, nonce); in ieee802154_decrypt_auth() 168 struct cipher_aead_pkt apkt; in ieee802154_encrypt_auth() local 195 prepare_cipher_aead_pkt(frame, level, ll_hdr_len, payload_len, authtag_len, &apkt, &pkt); in ieee802154_encrypt_auth() [all …]
|