Home
last modified time | relevance | path

Searched refs:iv (Results 1 – 25 of 42) sorted by relevance

12

/Zephyr-Core-3.6.0/subsys/bluetooth/lib/
Dead.c54 static int bt_ead_generate_nonce(const uint8_t iv[BT_EAD_IV_SIZE], in bt_ead_generate_nonce()
73 memcpy(&nonce[BT_EAD_RANDOMIZER_SIZE], iv, BT_EAD_IV_SIZE); in bt_ead_generate_nonce()
78 static int ead_encrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE], in ead_encrypt()
86 err = bt_ead_generate_nonce(iv, randomizer, nonce); in ead_encrypt()
105 int bt_ead_encrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE], in bt_ead_encrypt()
113 CHECKIF(iv == NULL) { in bt_ead_encrypt()
133 return ead_encrypt(session_key, iv, NULL, payload, payload_size, encrypted_payload); in bt_ead_encrypt()
139 const uint8_t iv[BT_EAD_IV_SIZE], in bt_test_ead_encrypt()
148 CHECKIF(iv == NULL) { in bt_test_ead_encrypt()
173 return ead_encrypt(session_key, iv, randomizer, payload, payload_size, encrypted_payload); in bt_test_ead_encrypt()
[all …]
/Zephyr-Core-3.6.0/subsys/mgmt/osdp/src/
Dosdp_sc.c159 uint8_t iv[16]; in osdp_decrypt_data() local
165 memcpy(iv, is_cmd ? pd->sc.r_mac : pd->sc.c_mac, 16); in osdp_decrypt_data()
167 iv[i] = ~iv[i]; in osdp_decrypt_data()
170 osdp_decrypt(pd->sc.s_enc, iv, data, length); in osdp_decrypt_data()
187 uint8_t iv[16]; in osdp_encrypt_data() local
194 memcpy(iv, is_cmd ? pd->sc.r_mac : pd->sc.c_mac, 16); in osdp_encrypt_data()
196 iv[i] = ~iv[i]; in osdp_encrypt_data()
199 osdp_encrypt(pd->sc.s_enc, iv, data, pad_len); in osdp_encrypt_data()
209 uint8_t iv[16]; in osdp_compute_mac() local
223 memcpy(iv, is_cmd ? pd->sc.r_mac : pd->sc.c_mac, 16); in osdp_compute_mac()
[all …]
Dosdp_common.c51 void osdp_encrypt(uint8_t *key, uint8_t *iv, uint8_t *data, int len) in osdp_encrypt() argument
72 if (iv != NULL) { in osdp_encrypt()
80 if (cipher_cbc_op(&ctx, &encrypt, iv)) { in osdp_encrypt()
98 void osdp_decrypt(uint8_t *key, uint8_t *iv, uint8_t *data, int len) in osdp_decrypt() argument
119 if (iv != NULL) { in osdp_decrypt()
127 if (cipher_cbc_op(&ctx, &decrypt, iv)) { in osdp_decrypt()
/Zephyr-Core-3.6.0/tests/bsim/bluetooth/host/adv/encrypted/css_sample_data/src/
Dcommon.h45 const uint8_t iv[BT_EAD_IV_SIZE],
76 const uint8_t iv[BT_EAD_IV_SIZE]; member
104 .iv = {0x9E, 0x7A, 0x00, 0xEF, 0xB1, 0x7A, 0xE7, 0x46},
131 .iv = {0x9E, 0x7A, 0x00, 0xEF, 0xB1, 0x7A, 0xE7, 0x46},
Dcentral.c40 err = bt_ead_decrypt(sample_data->session_key, sample_data->iv, data->data, in data_parse_cb()
Dperipheral.c68 err = bt_test_ead_encrypt(sample_data->session_key, sample_data->iv, in set_ad_data()
/Zephyr-Core-3.6.0/include/zephyr/bluetooth/
Dead.h77 int bt_ead_encrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE],
103 int bt_ead_decrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE],
/Zephyr-Core-3.6.0/subsys/bluetooth/controller/ll_sw/openisa/hal/RV32M1/radio/
Dradio.c653 void radio_whiten_iv_set(uint32_t iv) in radio_whiten_iv_set() argument
678 GENFSK_WHITEN_CFG_WHITEN_INIT(iv | 0x40); in radio_whiten_iv_set()
881 void radio_crc_configure(uint32_t polynomial, uint32_t iv) in radio_crc_configure() argument
896 GENFSK->CRC_INIT = (iv << ((4U - GENFSK_BLE_CRC_SZ) << 3)); in radio_crc_configure()
1257 ccm->iv[0] = 0x24; in radio_ccm_rx_pkt_set_ut()
1258 ccm->iv[1] = 0xAB; in radio_ccm_rx_pkt_set_ut()
1259 ccm->iv[2] = 0xDC; in radio_ccm_rx_pkt_set_ut()
1260 ccm->iv[3] = 0xBA; in radio_ccm_rx_pkt_set_ut()
1261 ccm->iv[4] = 0xBE; in radio_ccm_rx_pkt_set_ut()
1262 ccm->iv[5] = 0xBA; in radio_ccm_rx_pkt_set_ut()
[all …]
Dradio.h22 void radio_whiten_iv_set(uint32_t iv);
41 void radio_crc_configure(uint32_t polynomial, uint32_t iv);
/Zephyr-Core-3.6.0/tests/crypto/tinycrypt/src/
Dcbc_mode.c77 const uint8_t iv[16] = { variable
119 (void)memcpy(iv_buffer, iv, TC_AES_BLOCK_SIZE); in ZTEST()
/Zephyr-Core-3.6.0/drivers/crypto/
Dcrypto_tc_shim.c29 uint8_t *iv) in do_cbc_encrypt() argument
36 iv, in do_cbc_encrypt()
49 uint8_t *iv) in do_cbc_decrypt() argument
56 if (iv != op->in_buf) { in do_cbc_decrypt()
77 uint8_t *iv) in do_ctr_op() argument
86 memcpy(ctr, iv, ivlen); in do_ctr_op()
Dcrypto_mcux_dcp.c81 static int crypto_dcp_aes_cbc_encrypt(struct cipher_ctx *ctx, struct cipher_pkt *pkt, uint8_t *iv) in crypto_dcp_aes_cbc_encrypt() argument
94 memcpy(pkt->out_buf, iv, 16U); in crypto_dcp_aes_cbc_encrypt()
95 p_iv = iv; in crypto_dcp_aes_cbc_encrypt()
98 memcpy(iv_loc, iv, 16U); in crypto_dcp_aes_cbc_encrypt()
116 static int crypto_dcp_aes_cbc_decrypt(struct cipher_ctx *ctx, struct cipher_pkt *pkt, uint8_t *iv) in crypto_dcp_aes_cbc_decrypt() argument
126 p_iv = iv; in crypto_dcp_aes_cbc_decrypt()
129 memcpy(iv_loc, iv, 16U); in crypto_dcp_aes_cbc_decrypt()
Dcrypto_stm32.c179 struct cipher_pkt *pkt, uint8_t *iv) in crypto_stm32_cbc_encrypt() argument
187 (void)copy_reverse_words((uint8_t *)vec, sizeof(vec), iv, BLOCK_LEN_BYTES); in crypto_stm32_cbc_encrypt()
193 memcpy(pkt->out_buf, iv, 16); in crypto_stm32_cbc_encrypt()
207 struct cipher_pkt *pkt, uint8_t *iv) in crypto_stm32_cbc_decrypt() argument
215 (void)copy_reverse_words((uint8_t *)vec, sizeof(vec), iv, BLOCK_LEN_BYTES); in crypto_stm32_cbc_decrypt()
233 struct cipher_pkt *pkt, uint8_t *iv) in crypto_stm32_ctr_encrypt() argument
241 if (copy_reverse_words((uint8_t *)ctr, sizeof(ctr), iv, ivlen) != 0) { in crypto_stm32_ctr_encrypt()
256 struct cipher_pkt *pkt, uint8_t *iv) in crypto_stm32_ctr_decrypt() argument
264 if (copy_reverse_words((uint8_t *)ctr, sizeof(ctr), iv, ivlen) != 0) { in crypto_stm32_ctr_decrypt()
Dcrypto_mtls_shim.c122 int mtls_cbc_encrypt(struct cipher_ctx *ctx, struct cipher_pkt *pkt, uint8_t *iv) in mtls_cbc_encrypt() argument
133 memcpy(pkt->out_buf, iv, 16); in mtls_cbc_encrypt()
134 p_iv = iv; in mtls_cbc_encrypt()
137 memcpy(iv_loc, iv, 16); in mtls_cbc_encrypt()
153 int mtls_cbc_decrypt(struct cipher_ctx *ctx, struct cipher_pkt *pkt, uint8_t *iv) in mtls_cbc_decrypt() argument
161 p_iv = iv; in mtls_cbc_decrypt()
164 memcpy(iv_loc, iv, 16); in mtls_cbc_decrypt()
/Zephyr-Core-3.6.0/subsys/bluetooth/controller/hal/
Dccm.h13 uint8_t iv[8]; member
/Zephyr-Core-3.6.0/subsys/bluetooth/mesh/
Dnet.c987 struct iv_val iv; in iv_set() local
998 err = bt_mesh_settings_set(read_cb, cb_arg, &iv, sizeof(iv)); in iv_set()
1004 bt_mesh.iv_index = iv.iv_index; in iv_set()
1005 atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS, iv.iv_update); in iv_set()
1006 bt_mesh.ivu_duration = iv.iv_duration; in iv_set()
1008 LOG_DBG("IV Index 0x%04x (IV Update Flag %u) duration %u hours", iv.iv_index, iv.iv_update, in iv_set()
1009 iv.iv_duration); in iv_set()
1014 BT_MESH_SETTINGS_DEFINE(iv, "IV", iv_set);
1115 struct iv_val iv; in store_pending_iv() local
1118 iv.iv_index = bt_mesh.iv_index; in store_pending_iv()
[all …]
/Zephyr-Core-3.6.0/include/zephyr/crypto/
Dcrypto.h272 struct cipher_pkt *pkt, uint8_t *iv) in cipher_cbc_op() argument
278 return ctx->ops.cbc_crypt_hndlr(ctx, pkt, iv); in cipher_cbc_op()
299 struct cipher_pkt *pkt, uint8_t *iv) in cipher_ctr_op() argument
305 return ctx->ops.ctr_crypt_hndlr(ctx, pkt, iv); in cipher_ctr_op()
Dcipher.h63 uint8_t *iv);
/Zephyr-Core-3.6.0/samples/bluetooth/encrypted_advertising/include/
Dcommon.h17 uint8_t iv[BT_EAD_IV_SIZE]; member
/Zephyr-Core-3.6.0/tests/bluetooth/controller/ctrl_encrypt/src/
Dmain.c83 zassert_mem_equal(_conn.lll.ccm_rx.iv, _iv, sizeof(_iv), \
94 zassert_mem_equal(_conn.lll.ccm_tx.iv, _iv, sizeof(_iv), \
240 const uint8_t iv[] = { IVM, IVS }; in ZTEST() local
309 CHECK_RX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_S_TO_M); in ZTEST()
310 CHECK_TX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_M_TO_S); in ZTEST()
398 const uint8_t iv[] = { IVM, IVS }; in ZTEST() local
513 CHECK_RX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_S_TO_M); in ZTEST()
514 CHECK_TX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_M_TO_S); in ZTEST()
1143 const uint8_t iv[] = { IVM, IVS }; in ZTEST() local
1255 CHECK_RX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_M_TO_S); in ZTEST()
[all …]
/Zephyr-Core-3.6.0/samples/bluetooth/encrypted_advertising/peripheral/src/
Ddata.h50 .iv = {0xFB, 0x56, 0xE1, 0xDA, 0xDC, 0x7E, 0xAD, 0xF5},
/Zephyr-Core-3.6.0/samples/modules/thrift/hello/
Dnative-key.pem10 TH4jnozxL1eG+iv/2Q4LK0TnMKdbamuXqlOziLQtroCSIsH4z9nEN0d50jxcAVyj
/Zephyr-Core-3.6.0/samples/drivers/crypto/src/
Dmain.c229 static uint8_t iv[16] = { in cbc_mode() local
240 if (cipher_cbc_op(&ini, &encrypt, iv)) { in cbc_mode()
319 uint8_t iv[12] = { in ctr_mode() local
330 if (cipher_ctr_op(&ini, &encrypt, iv)) { in ctr_mode()
354 if (cipher_ctr_op(&ini, &decrypt, iv)) { in ctr_mode()
/Zephyr-Core-3.6.0/subsys/bluetooth/controller/ll_sw/nordic/lll/
Dlll_adv_iso.c359 (void)memcpy(lll->ccm_tx.iv, lll->giv, 4U); in prepare_cb_common()
360 mem_xor_32(lll->ccm_tx.iv, lll->ccm_tx.iv, access_addr); in prepare_cb_common()
696 (void)memcpy(lll->ccm_tx.iv, lll->giv, 4U); in isr_tx_common()
697 mem_xor_32(lll->ccm_tx.iv, lll->ccm_tx.iv, access_addr); in isr_tx_common()
/Zephyr-Core-3.6.0/subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/radio/
Dradio.h72 void radio_whiten_iv_set(uint32_t iv);
91 void radio_crc_configure(uint32_t polynomial, uint32_t iv);

12