2023-05-03 07:04 PM
AN5185 specifies that encrypted keys should use AES-128 GCM, but the format of data sent to FUS isn't very well specified:
Byte0: key type:
• 0x00: None
• 0x01: Simple key
• 0x02: Master key
• 0x03: Encrypted key
Byte1: key size N in bytes
Byte2 to ByteN-1: key data (key value + IV if any)
In particular, two things are not clear to me from this description:
Specifically, for an AES-256 encrypted key (with 32 byte cyphertext, 16 byte IV, and 16 byte tag), what value should be in byte 1, and how should data be arranged in bytes 2 and up?
Thank you!