Home
last modified time | relevance | path

Searched refs:BT_CSIP_CRYPTO_PRAND_SIZE (Results 1 – 4 of 4) sorted by relevance

/Zephyr-latest/subsys/bluetooth/audio/
Dcsip_crypto.c33 #define BT_CSIP_PADDED_RAND_SIZE (BT_CSIP_CRYPTO_PADDING_SIZE + BT_CSIP_CRYPTO_PRAND_SIZE)
36 int bt_csip_sih(const uint8_t sirk[BT_CSIP_SIRK_SIZE], uint8_t r[BT_CSIP_CRYPTO_PRAND_SIZE], in bt_csip_sih() argument
42 if ((r[BT_CSIP_CRYPTO_PRAND_SIZE - 1] & BIT(7)) || in bt_csip_sih()
43 ((r[BT_CSIP_CRYPTO_PRAND_SIZE - 1] & BIT(6)) == 0)) { in bt_csip_sih()
44 LOG_DBG("Invalid r %s", bt_hex(r, BT_CSIP_CRYPTO_PRAND_SIZE)); in bt_csip_sih()
48 LOG_DBG("r %s", bt_hex(r, BT_CSIP_CRYPTO_PRAND_SIZE)); in bt_csip_sih()
51 (void)memset(res + BT_CSIP_CRYPTO_PRAND_SIZE, 0, BT_CSIP_CRYPTO_PADDING_SIZE); in bt_csip_sih()
52 memcpy(res, r, BT_CSIP_CRYPTO_PRAND_SIZE); in bt_csip_sih()
Dcsip_crypto.h15 #define BT_CSIP_CRYPTO_PRAND_SIZE 3 macro
30 int bt_csip_sih(const uint8_t sirk[BT_CSIP_SIRK_SIZE], uint8_t r[BT_CSIP_CRYPTO_PRAND_SIZE],
Dcsip_set_member.c184 static int generate_prand(uint8_t dest[BT_CSIP_CRYPTO_PRAND_SIZE]) in generate_prand() argument
193 res = bt_rand(dest, BT_CSIP_CRYPTO_PRAND_SIZE); in generate_prand()
205 dest[BT_CSIP_CRYPTO_PRAND_SIZE - 1] &= 0x3F; in generate_prand()
206 dest[BT_CSIP_CRYPTO_PRAND_SIZE - 1] |= BIT(6); in generate_prand()
215 uint8_t prand[BT_CSIP_CRYPTO_PRAND_SIZE]; in bt_csip_set_member_generate_rsi()
237 (void)memcpy(rsi + BT_CSIP_CRYPTO_HASH_SIZE, prand, BT_CSIP_CRYPTO_PRAND_SIZE); in bt_csip_set_member_generate_rsi()
Dcsip_set_coordinator.c846 uint8_t prand[BT_CSIP_CRYPTO_PRAND_SIZE]; in bt_csip_set_coordinator_is_set_member()
850 memcpy(prand, data->data + BT_CSIP_CRYPTO_HASH_SIZE, BT_CSIP_CRYPTO_PRAND_SIZE); in bt_csip_set_coordinator_is_set_member()
853 LOG_DBG("prand %s", bt_hex(prand, BT_CSIP_CRYPTO_PRAND_SIZE)); in bt_csip_set_coordinator_is_set_member()