nonce generation on AES CCM* I want to encrypt with AES CCM* and i dont understand the nonce generation.
the toolkit i'm using has a function to generate the nonce for CCM but it needs the following params:


param src_addr      The MAC address in EUI-64 format.
param frame_counter The MAC frame counter.
param size_of_t     AES-CCM* MAC (tag) byte size. Valid values = [0,4,8,16].


i know the MAC size but how do i get the other parameters BEFORE even running init?
i know the MAC size but how do i get the other parameters BEFORE even running init?


This is one of the cases where you have to deal with two different expansions of the acronym "MAC": Medium Access Control and Message Authentication Tag. The first two points, ie the MAC address and the MAC frame counter refer to the Media Accesss Control expansion, ie the (link-layer) address of the peer you want to communicate with and the (link-layer) sequence counter of the current message packet. The MAC tag size refers to the actual Message Authentication Code tag of CCM*.


  so in testing it should be random?


This depends on the tests you want to do. In some cases it makes sense to randomize these values, eg if you just test whether encrypt and decryption works. In other cases, eg when you want to test against test vectors, the randomness will not be helpful / will make verification of operationality of the system harder.