Optimized RF24Network Layer v2.3.0
2024 - Optimized RF24 Network Layer for NRF24L01 & NRF52x radios
Loading...
Searching...
No Matches
rf24ccm Namespace Reference

Functions

uint8_t xtime (uint8_t x)
uint8_t rotl8 (uint8_t x, uint8_t shift)
const uint8_t * sbox ()
void aesExpandKey (const uint8_t key[16], uint8_t roundKeys[176])
void aesEncryptBlock (const uint8_t roundKeys[176], const uint8_t in[16], uint8_t out[16])
void ccmMac (const uint8_t roundKeys[176], const uint8_t *nonce, uint8_t nonceLen, const uint8_t *aad, size_t aadLen, const uint8_t *msg, size_t msgLen, uint8_t micLen, uint8_t mac[16])
void ccmCtr (const uint8_t roundKeys[176], const uint8_t *nonce, uint8_t nonceLen, const uint8_t *in, size_t len, uint8_t *out, uint8_t s0[16])
void ccmEncrypt (const uint8_t roundKeys[176], const uint8_t *nonce, uint8_t nonceLen, const uint8_t *aad, size_t aadLen, const uint8_t *in, size_t len, uint8_t *out, uint8_t *mic, uint8_t micLen)
bool ccmDecrypt (const uint8_t roundKeys[176], const uint8_t *nonce, uint8_t nonceLen, const uint8_t *aad, size_t aadLen, const uint8_t *in, size_t len, const uint8_t *mic, uint8_t micLen, uint8_t *out)

Function Documentation

◆ xtime()

uint8_t rf24ccm::xtime ( uint8_t x)
inline

◆ rotl8()

uint8_t rf24ccm::rotl8 ( uint8_t x,
uint8_t shift )
inline

◆ sbox()

const uint8_t * rf24ccm::sbox ( )
inline

◆ aesExpandKey()

void rf24ccm::aesExpandKey ( const uint8_t key[16],
uint8_t roundKeys[176] )
inline

◆ aesEncryptBlock()

void rf24ccm::aesEncryptBlock ( const uint8_t roundKeys[176],
const uint8_t in[16],
uint8_t out[16] )
inline

◆ ccmMac()

void rf24ccm::ccmMac ( const uint8_t roundKeys[176],
const uint8_t * nonce,
uint8_t nonceLen,
const uint8_t * aad,
size_t aadLen,
const uint8_t * msg,
size_t msgLen,
uint8_t micLen,
uint8_t mac[16] )
inline

◆ ccmCtr()

void rf24ccm::ccmCtr ( const uint8_t roundKeys[176],
const uint8_t * nonce,
uint8_t nonceLen,
const uint8_t * in,
size_t len,
uint8_t * out,
uint8_t s0[16] )
inline

◆ ccmEncrypt()

void rf24ccm::ccmEncrypt ( const uint8_t roundKeys[176],
const uint8_t * nonce,
uint8_t nonceLen,
const uint8_t * aad,
size_t aadLen,
const uint8_t * in,
size_t len,
uint8_t * out,
uint8_t * mic,
uint8_t micLen )
inline

Encrypt len bytes of in into out (may be the same buffer) and write a micLen byte tag to mic

◆ ccmDecrypt()

bool rf24ccm::ccmDecrypt ( const uint8_t roundKeys[176],
const uint8_t * nonce,
uint8_t nonceLen,
const uint8_t * aad,
size_t aadLen,
const uint8_t * in,
size_t len,
const uint8_t * mic,
uint8_t micLen,
uint8_t * out )
inline

Decrypt len bytes of in into out and verify the tag. On failure out is zeroed and false is returned