This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

AES CCM: can INPTR = OUTPTR?

Hello:

I have read the documentation but I cannot determine if INPTR and OUTPTR can be set to the same memory address? I will try it to see what happens but it would be great to know if this is supported.

FYI: I want to do on-the-fly packet encryption. I want to set PACKETPTR in the radio peripheral to the same value as both INPTR and OUTPTR in the CCM peripheral. This way I dont have to have different buffers (saves memory).

Thanks!

Parents
  • If you set the pointers to the same value, output data will overwrite input data, but it may be that the overwriting happens after data is read, but this has not been verified. Judging by your results, this is not a viable option.

    I discussed this with our R&D engineers and this was their reply:

    For Tx, Radio PACKETPTR should point to where OUTPTR (encrypted packet) points to. INPTR (clear text) should point to a different location.

    For Rx, INPTR should point to where Radio PACKETPTR points to. OUTPTR (clear text) should point to a different location.

    -Bjørn

Reply
  • If you set the pointers to the same value, output data will overwrite input data, but it may be that the overwriting happens after data is read, but this has not been verified. Judging by your results, this is not a viable option.

    I discussed this with our R&D engineers and this was their reply:

    For Tx, Radio PACKETPTR should point to where OUTPTR (encrypted packet) points to. INPTR (clear text) should point to a different location.

    For Rx, INPTR should point to where Radio PACKETPTR points to. OUTPTR (clear text) should point to a different location.

    -Bjørn

Children
No Data
Related