Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
crypto.h File Reference

Bluetooth subsystem crypto APIs. More...

#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Functions

int bt_rand (void *buf, size_t len)
 Generate random data.
 
int bt_encrypt_le (const uint8_t key[16], const uint8_t plaintext[16], uint8_t enc_data[16])
 AES encrypt little-endian data.
 
int bt_encrypt_be (const uint8_t key[16], const uint8_t plaintext[16], uint8_t enc_data[16])
 AES encrypt big-endian data.
 
int bt_ccm_decrypt (const uint8_t key[16], uint8_t nonce[13], const uint8_t *enc_data, size_t len, const uint8_t *aad, size_t aad_len, uint8_t *plaintext, size_t mic_size)
 Decrypt big-endian data with AES-CCM.
 
int bt_ccm_encrypt (const uint8_t key[16], uint8_t nonce[13], const uint8_t *plaintext, size_t len, const uint8_t *aad, size_t aad_len, uint8_t *enc_data, size_t mic_size)
 Encrypt big-endian data with AES-CCM.
 

Detailed Description

Bluetooth subsystem crypto APIs.