Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ead.h File Reference
#include <stddef.h>
#include <stdint.h>
#include <zephyr/kernel.h>
#include <zephyr/bluetooth/bluetooth.h>

Go to the source code of this file.

Macros

#define BT_EAD_RANDOMIZER_SIZE   5
 Randomizer size in bytes.
 
#define BT_EAD_KEY_SIZE   16
 Key size in bytes.
 
#define BT_EAD_IV_SIZE   8
 Initialisation Vector size in bytes.
 
#define BT_EAD_MIC_SIZE   4
 MIC size in bytes.
 
#define BT_EAD_ENCRYPTED_PAYLOAD_SIZE(payload_size)
 Get the size (in bytes) of the encrypted advertising data for a given payload size in bytes.
 
#define BT_EAD_DECRYPTED_PAYLOAD_SIZE(encrypted_payload_size)
 Get the size (in bytes) of the decrypted payload for a given payload size in bytes.
 

Functions

int bt_ead_encrypt (const uint8_t session_key[16], const uint8_t iv[8], const uint8_t *payload, size_t payload_size, uint8_t *encrypted_payload)
 Encrypt and authenticate the given advertising data.
 
int bt_ead_decrypt (const uint8_t session_key[16], const uint8_t iv[8], const uint8_t *encrypted_payload, size_t encrypted_payload_size, uint8_t *payload)
 Decrypt and authenticate the given encrypted advertising data.