This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ESB aes-ccm MIC verify

Hi

We are verifying the encrypt value and MIC value using a crypto tool.

The result is different depending on the setting of the packet S0 field.

If the S0 field is set as below, the MIC value is checked correctly.

NRF->RADIO->PCNF0 = (1 << RADIO_PCNF0_S0LEN_Pos) | ...

But if i set the S0 field to 0, the MIC value is wrong.

NRF->RADIO->PCNF0 = (0 << RADIO_PCNF0_S0LEN_Pos) | ...

Is it possible to use aes-ccm only when the S0 field is set to 1?

Parents Reply Children
  • clear_buffer[CCM_IN_HEADER_INDEX] = 0;
    clear_buffer[CCM_IN_LENGTH_INDEX] = (uint8_t)packet_length;
    clear_buffer[CCM_IN_RFU_INDEX] = 0;
    memcpy(&clear_buffer[CCM_IN_PAYLOAD_INDEX], packet, packet_length);
    NRF_CCM->INPTR = (uint32_t)clear_buffer;

     
    I understood  the above code , when the S0 field is set to 1, it is used as follows.

     AAD                  plain text

    | S0 | length | S1(RFU) | payload |



    How to use 'AAD' when S0 field is set to 0?

    AAD?                   plain text

    | X | length | S1(RFU) | payload |




  • Hi 

    What is "AAD" a reference to? 

    I can't find this acronym in our CCM documentation. 

    The problem with using the CCM when S0 is set to 0 is that the CCM module always assume that the S0 field is there, and if you are receiving data over the air without S0 included then the CCM module will process the data incorrectly. 

    Best regards
    Torbjørn

Related