Home
last modified time | relevance | path

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

12

/Zephyr-Core-3.4.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.4.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.4.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()
/Zephyr-Core-3.4.0/include/zephyr/bluetooth/
Dead.h63 int bt_ead_encrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE],
89 int bt_ead_decrypt(const uint8_t session_key[BT_EAD_KEY_SIZE], const uint8_t iv[BT_EAD_IV_SIZE],
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/ll_sw/openisa/hal/RV32M1/radio/
Dradio.c654 void radio_whiten_iv_set(uint32_t iv) in radio_whiten_iv_set() argument
679 GENFSK_WHITEN_CFG_WHITEN_INIT(iv | 0x40); in radio_whiten_iv_set()
882 void radio_crc_configure(uint32_t polynomial, uint32_t iv) in radio_crc_configure() argument
897 GENFSK->CRC_INIT = (iv << ((4U - GENFSK_BLE_CRC_SZ) << 3)); in radio_crc_configure()
1258 ccm->iv[0] = 0x24; in radio_ccm_rx_pkt_set_ut()
1259 ccm->iv[1] = 0xAB; in radio_ccm_rx_pkt_set_ut()
1260 ccm->iv[2] = 0xDC; in radio_ccm_rx_pkt_set_ut()
1261 ccm->iv[3] = 0xBA; in radio_ccm_rx_pkt_set_ut()
1262 ccm->iv[4] = 0xBE; in radio_ccm_rx_pkt_set_ut()
1263 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.4.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_stm32.c174 struct cipher_pkt *pkt, uint8_t *iv) in crypto_stm32_cbc_encrypt() argument
182 copy_reverse_words((uint8_t *)vec, sizeof(vec), iv, BLOCK_LEN_BYTES); in crypto_stm32_cbc_encrypt()
187 memcpy(pkt->out_buf, iv, 16); in crypto_stm32_cbc_encrypt()
201 struct cipher_pkt *pkt, uint8_t *iv) in crypto_stm32_cbc_decrypt() argument
209 copy_reverse_words((uint8_t *)vec, sizeof(vec), iv, BLOCK_LEN_BYTES); in crypto_stm32_cbc_decrypt()
226 struct cipher_pkt *pkt, uint8_t *iv) in crypto_stm32_ctr_encrypt() argument
234 copy_reverse_words((uint8_t *)ctr, sizeof(ctr), iv, ivlen); in crypto_stm32_ctr_encrypt()
246 struct cipher_pkt *pkt, uint8_t *iv) in crypto_stm32_ctr_decrypt() argument
254 copy_reverse_words((uint8_t *)ctr, sizeof(ctr), iv, ivlen); 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.4.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.4.0/subsys/bluetooth/mesh/
Dnet.c983 struct iv_val iv; in iv_set() local
994 err = bt_mesh_settings_set(read_cb, cb_arg, &iv, sizeof(iv)); in iv_set()
1000 bt_mesh.iv_index = iv.iv_index; in iv_set()
1001 atomic_set_bit_to(bt_mesh.flags, BT_MESH_IVU_IN_PROGRESS, iv.iv_update); in iv_set()
1002 bt_mesh.ivu_duration = iv.iv_duration; in iv_set()
1004 LOG_DBG("IV Index 0x%04x (IV Update Flag %u) duration %u hours", iv.iv_index, iv.iv_update, in iv_set()
1005 iv.iv_duration); in iv_set()
1010 BT_MESH_SETTINGS_DEFINE(iv, "IV", iv_set);
1109 struct iv_val iv; in store_pending_iv() local
1112 iv.iv_index = bt_mesh.iv_index; in store_pending_iv()
[all …]
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/hal/
Dccm.h13 uint8_t iv[8]; member
/Zephyr-Core-3.4.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.4.0/samples/bluetooth/encrypted_advertising/include/
Dcommon.h17 uint8_t iv[BT_EAD_IV_SIZE]; member
/Zephyr-Core-3.4.0/tests/bluetooth/controller/ctrl_encrypt/src/
Dmain.c81 zassert_mem_equal(_conn.lll.ccm_rx.iv, _iv, sizeof(_iv), \
92 zassert_mem_equal(_conn.lll.ccm_tx.iv, _iv, sizeof(_iv), \
192 const uint8_t iv[] = { IVM, IVS }; in ZTEST() local
261 CHECK_RX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_S_TO_M); in ZTEST()
262 CHECK_TX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_M_TO_S); in ZTEST()
350 const uint8_t iv[] = { IVM, IVS }; in ZTEST() local
465 CHECK_RX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_S_TO_M); in ZTEST()
466 CHECK_TX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_M_TO_S); in ZTEST()
1095 const uint8_t iv[] = { IVM, IVS }; in ZTEST() local
1207 CHECK_RX_CCM_STATE(conn, sk_be, iv, 0U, CCM_DIR_M_TO_S); in ZTEST()
[all …]
/Zephyr-Core-3.4.0/samples/drivers/crypto/src/
Dmain.c227 static uint8_t iv[16] = { in cbc_mode() local
238 if (cipher_cbc_op(&ini, &encrypt, iv)) { in cbc_mode()
317 uint8_t iv[12] = { in ctr_mode() local
328 if (cipher_ctr_op(&ini, &encrypt, iv)) { in ctr_mode()
352 if (cipher_ctr_op(&ini, &decrypt, iv)) { in ctr_mode()
/Zephyr-Core-3.4.0/samples/bluetooth/encrypted_advertising/peripheral/src/
Ddata.h50 .iv = {0xFB, 0x56, 0xE1, 0xDA, 0xDC, 0x7E, 0xAD, 0xF5},
/Zephyr-Core-3.4.0/samples/modules/thrift/hello/
Dnative-key.pem10 TH4jnozxL1eG+iv/2Q4LK0TnMKdbamuXqlOziLQtroCSIsH4z9nEN0d50jxcAVyj
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/ll_sw/nordic/lll/
Dlll_adv_iso.c355 (void)memcpy(lll->ccm_tx.iv, lll->giv, 4U); in prepare_cb_common()
356 mem_xor_32(lll->ccm_tx.iv, lll->ccm_tx.iv, access_addr); in prepare_cb_common()
689 (void)memcpy(lll->ccm_tx.iv, lll->giv, 4U); in isr_tx_common()
690 mem_xor_32(lll->ccm_tx.iv, lll->ccm_tx.iv, access_addr); in isr_tx_common()
/Zephyr-Core-3.4.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);
/Zephyr-Core-3.4.0/subsys/bluetooth/controller/ll_sw/
Dull_llcp_enc.c156 memcpy(&conn->lll.ccm_tx.iv[0], &conn->lll.ccm_rx.iv[0], sizeof(conn->lll.ccm_tx.iv)); in enc_setup_lll()
265 memcpy(&conn->lll.ccm_rx.iv[0], pdu->llctrl.enc_req.ivm, sizeof(pdu->llctrl.enc_req.ivm)); in lp_enc_store_m()
378 memcpy(&conn->lll.ccm_rx.iv[4], pdu->llctrl.enc_rsp.ivs, sizeof(pdu->llctrl.enc_rsp.ivs)); in lp_enc_store_s()
799 memcpy(&conn->lll.ccm_rx.iv[4], pdu->llctrl.enc_rsp.ivs, sizeof(pdu->llctrl.enc_rsp.ivs)); in rp_enc_store_s()
924 memcpy(&conn->lll.ccm_rx.iv[0], pdu->llctrl.enc_req.ivm, sizeof(pdu->llctrl.enc_req.ivm)); in rp_enc_store_m()
/Zephyr-Core-3.4.0/tests/bsim/bluetooth/host/adv/encrypted/ead_sample/src/
Dmain.c86 LOG_HEXDUMP_DBG(received_keymat.iv, BT_EAD_IV_SIZE, "Received IV"); in central_main()

12