This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TI aes gcm ram amount usage

Other Parts Discussed in Thread: MSP430F67791, MSP430F6779

Hi All,

someone know the ram amount usage of the aes-gcm 128 http://downloads.ti.com/tsu_encryption/tsu_encryption_public_sw 

  • Hi Fabio,

    According to the readme, the source code is written for MSP430F67791 which has 32KB of RAM. Any other MSP430 device that has 32KB of RAM should be able to execute the program.
    "Please note that the "aes-gcm-tests" project has the MSP430F67791 selected by default. However, other devices can be used by selecting another
    device as the target device in the IAR project settings for "aes-gcm-tests". Devices with sufficient RAM/Flash must
    be selected. Otherwise, linking errors may be observed when compiling the project."

    Sincerely,
    Sean
  • Hi Sean,

    thanks for your reply.

    I would like to use the algorithm on msp430 with 16 KB ram as you can imagine i need to know the amount of the aes-gcm ram usage in order to verify all the other things ram allocated.

    Do you know that amount ?

    Thanks in advance

    Reg.

    Fabio

  • Hi Fabio,

    Here is an idea to check RAM usage of the source code on your device. When you build the project a *.map file is created - it is a memory map where you can check what memory sections you are using. Below is a snippet of my map file for a sample program.

    MEMORY CONFIGURATION

    name origin length used unused attr fill
    ---------------------- -------- --------- -------- -------- ---- --------
    SFR 00000000 00000010 00000000 00000010 RWIX
    PERIPHERALS_8BIT 00000010 000000f0 00000000 000000f0 RWIX
    PERIPHERALS_16BIT 00000100 00000100 00000000 00000100 RWIX
    INFOA 00001c00 00000060 00000000 00000060 RWIX
    INT00 00001c60 00000002 00000000 00000002 RWIX
    INT01 00001c62 00000002 00000000 00000002 RWIX
    INT02 00001c64 00000002 00000000 00000002 RWIX
    INT03 00001c66 00000002 00000000 00000002 RWIX
    INT04 00001c68 00000002 00000000 00000002 RWIX
    INT05 00001c6a 00000002 00000002 00000000 RWIX
    INT06 00001c6c 00000002 00000002 00000000 RWIX
    INT07 00001c6e 00000002 00000002 00000000 RWIX
    INT08 00001c70 00000002 00000002 00000000 RWIX
    INT09 00001c72 00000002 00000002 00000000 RWIX
    INT10 00001c74 00000002 00000002 00000000 RWIX
    INT11 00001c76 00000002 00000002 00000000 RWIX
    INT12 00001c78 00000002 00000002 00000000 RWIX
    INT13 00001c7a 00000002 00000002 00000000 RWIX
    INT14 00001c7c 00000002 00000002 00000000 RWIX
    RESET 00001c7e 00000002 00000002 00000000 RWIX
    FLASH 00001c80 00000700 00000064 0000069c RWIX
    RAM 00002380 00000080 00000050 00000030 RWIX

    Therefore, I suggest building the AES GCM source code on your particular MSP430 device and checking the memory configuration.

    Sincerely,
    Sean

  • Hi Fabio,

    The AES-GCM code doesn't take a hug amount of RAM, but the amount it takes depends on the device you use. If you look in aes128_gcm.h you can see the structure used to hold the working data in RAM. If you build the software for a device with AES hardware, like the MSP430F6779, you need about 100 bytes of RAM. If you build for a device without AES hardware you need an additional 176 bytes of RAM, to hold the expanded AES key. I am only giving approximate numbers, as the exact peak RAM usage will depend on the stack space used.

**Attention** This is a public forum