How Create a VolatileKey in a ataes132a chip

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey Guys,

 

I'm new to this here I have read the manual a lot of times but not quite well understood this.

I try to create a VolatileKey in the SRAM,

 

here is my code where I create the command:

 

  uint8_t nonmac[16] = {0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5, 0xa5};
    io_securitychip_command_t keycmd = {
        IO_SECURITYCHIP_CMD__AES132_KEY_CREATE,  // opcode
        //76543210
        0b00000111,                              // mode
        //SRAM ADRRESS Maybe wrong, Violtiale key Address is : 0xFF
        0x00FF,                                  //param1
        //7654321076543210
        0b0000001101011010,                      // param2
        noncemac,                                     // data
        16                                       // size
    };

How do I calculate the MAC?

The CRC and Nonce is correct.

Nonce gives me 0x5A back as response.

The CRC I use from the Manual sheet.

 

What I'm doing wrong, also can I write direct to the KeyZone within in Testmode?

The Chip is not locked.

 

When you need somemore information let me know.

 

Greets Tony

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the chip is not locked, the key memory can be written in two ways. This is from Section 2.2 in the datasheet...

 

The Key Memory can be written prior to locking with either encrypted or cleartext data. Encrypted writes are
performed using the EncWrite command (see Section 7.11, EncWrite Command). Cleartext writes are
performed using the standard SPI or I2C Write commands (see Section 5.2, Write).

 

I didn't use volatile keys in my code so I can't help you with your other problem.

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

MAC calculation is detailed in the Excel spread attached to this post...

 

https://community.atmel.com/forum/ataes132a-basic-encryptiondecryption

 

Last Edited: Tue. Mar 20, 2018 - 12:57 AM