Skip to content

Commit bda9f73

Browse files
committed
Update annotations of sgx_sealed_data_t and sgx_aes_gcm_data_t (#639)
Signed-off-by: Huang Yang <yang.huang@intel.com>
1 parent 8d0e076 commit bda9f73

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

common/inc/sgx_tseal.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@
4747

4848
typedef struct _aes_gcm_data_t
4949
{
50-
uint32_t payload_size; /* 0: Size of the payload which includes both the encrypted data and the optional additional MAC text */
51-
uint8_t reserved[12]; /* 4: Reserved bits */
50+
uint32_t payload_size; /* 0: Size of the payload which includes the encrypted data */
51+
uint8_t reserved[SGX_SEAL_IV_SIZE]; /* 4: Reserved bits used as iv */
5252
uint8_t payload_tag[SGX_SEAL_TAG_SIZE]; /* 16: AES-GMAC of the plain text, payload, and the sizes */
53-
uint8_t payload[]; /* 32: The payload data which includes the encrypted data followed by the optional additional MAC text */
53+
uint8_t payload[]; /* 32: The payload data which includes the encrypted data followed by payload_tag */
5454
} sgx_aes_gcm_data_t;
5555

5656
typedef struct _sealed_data_t
5757
{
5858
sgx_key_request_t key_request; /* 00: The key request used to obtain the sealing key */
59-
uint32_t plain_text_offset; /* 64: Offset within aes_data.playload to the start of the optional additional MAC text */
60-
uint8_t reserved[12]; /* 68: Reserved bits */
61-
sgx_aes_gcm_data_t aes_data; /* 80: Data structure holding the AES/GCM related data */
59+
uint32_t plain_text_offset; /* 512: Offset within aes_data.playload to the start of the optional additional MAC text */
60+
uint8_t reserved[12]; /* 516: Reserved bits */
61+
sgx_aes_gcm_data_t aes_data; /* 528: Data structure holding the AES/GCM related data */
6262
} sgx_sealed_data_t;
6363

6464
#ifdef __cplusplus

0 commit comments

Comments
 (0)