OPTIGA™ Trust M
Host Library Documentation
protected_update_data_set.h File Reference

This file defines APIs, types and data structures used for protected update data set creation. More...

#include <stdint.h>
Include dependency graph for protected_update_data_set.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  kdf
 
struct  enc_params
 
struct  confidentiality
 
struct  data_payload
 
struct  ecc_key
 
struct  rsa_key
 
struct  aes_key
 
union  key_params
 
struct  key_payload
 
struct  metadata_payload
 
struct  manifest
 
struct  protected_update_data_set
 
#define FRAGMENT_DIGEST_LENGTH   (0x20)
 
#define MAX_PAYLOAD_SIZE   (640U)
 
#define MAC_SIZE   (8U)
 
#define MAX_PAYLOAD_FRAGMENT_SIZE   (MAX_PAYLOAD_SIZE - FRAGMENT_DIGEST_LENGTH)
 
#define NONCE_LENGTH   (11U)
 
#define FRAGMENT_NUMBER_LENGTH   (2U)
 
#define ASSOCIATED_DATA_LENGTH   (8U)
 
#define SESSION_KEY_LENGTH   (27U)
 
#define PAYLOAD_TYPE_KEY   "key"
 
#define PAYLOAD_TYPE_DATA   "data"
 
#define PROTECTED_INTEGRATY_TYPE   "integrity"
 
#define PROTECTED_CONFIDENTIALITY_TYPE   "confidentiality"
 
#define TRUE   (1U)
 
#define FALSE   (0U)
 
#define _STATIC_H   static
 
enum  key_type { eRSA = 1, eECC = 2, eAES = 3 }
 
enum  payload_type { ePAYLOAD_DATA = -1, ePAYLOAD_METADATA = -2, ePAYLOAD_KEY = -3 }
 
enum  key_algorithm {
  eECC_NIST_P_256 = 0x03, eECC_NIST_P_384 = 0x04, eRSA_1024_EXP = 0x41, eRSA_2048_EXP = 0x42,
  eAES_128 = 0x81
}
 
enum  key_usage { eAUTH = 0x01, eENC = 0x02, eSIGN = 0x10, eKEY_AGREE = 0x20 }
 
enum  encryption_algo { eAES_CCM_16_64_128 = 10 }
 
enum  kdf_algo { eIFX_KDF_TLS12_PRF_SHA256 = -65720 }
 
enum  content_reset_type { eMETADATA_IDENTIFIER_FLAG = 0, eZEROES = 1, eRANDOM = 2 }
 
enum  signature_algo { eES_SHA = -7, eRSA_SSA_PKCS1_V1_5_SHA_256 = -65700 }
 
enum  digest_algo { eSHA_256 = 41 }
 
typedef enum key_type key_type_d
 
typedef enum payload_type payload_type_t
 
typedef enum key_algorithm key_algorithm_t
 
typedef enum key_usage key_usage_t
 
typedef enum encryption_algo encryption_algo_t
 
typedef enum kdf_algo kdf_algo_t
 
typedef enum content_reset_type content_reset_type_t
 
typedef struct kdf kdf_t
 
typedef struct enc_params enc_params_t
 
typedef struct confidentiality confidentiality_t
 
typedef struct data_payload data_payload_t
 
typedef struct ecc_key ecc_key_t
 
typedef struct rsa_key rsa_key_t
 
typedef struct aes_key aes_key_t
 
typedef union key_params key_params_t
 
typedef struct key_payload key_payload_t
 
typedef struct metadata_payload metadata_payload_t
 
typedef enum signature_algo signature_algo_t
 
typedef enum digest_algo digest_algo_t
 
typedef struct manifest manifest_t
 
typedef struct protected_update_data_set protected_update_data_set_d
 
int32_t protected_update_create_manifest (manifest_t *manifest_data, protected_update_data_set_d *p_cbor_manifest)
 
int32_t protected_update_create_fragments (manifest_t *manifest_data, protected_update_data_set_d *p_cbor_manifest)
 
void protected_update_print_output_dataset (const protected_update_data_set_d *p_cbor_manifest)
 

Detailed Description

This file defines APIs, types and data structures used for protected update data set creation.

Author
Infineon Technologies AG

Definition in file protected_update_data_set.h.

Macro Definition Documentation

◆ _STATIC_H

#define _STATIC_H   static

Definition at line 256 of file protected_update_data_set.h.

◆ ASSOCIATED_DATA_LENGTH

#define ASSOCIATED_DATA_LENGTH   (8U)

Definition at line 49 of file protected_update_data_set.h.

◆ FALSE

#define FALSE   (0U)

Definition at line 57 of file protected_update_data_set.h.

◆ FRAGMENT_DIGEST_LENGTH

#define FRAGMENT_DIGEST_LENGTH   (0x20)

Definition at line 42 of file protected_update_data_set.h.

◆ FRAGMENT_NUMBER_LENGTH

#define FRAGMENT_NUMBER_LENGTH   (2U)

Definition at line 48 of file protected_update_data_set.h.

◆ MAC_SIZE

#define MAC_SIZE   (8U)

Definition at line 44 of file protected_update_data_set.h.

◆ MAX_PAYLOAD_FRAGMENT_SIZE

#define MAX_PAYLOAD_FRAGMENT_SIZE   (MAX_PAYLOAD_SIZE - FRAGMENT_DIGEST_LENGTH)

Definition at line 45 of file protected_update_data_set.h.

◆ MAX_PAYLOAD_SIZE

#define MAX_PAYLOAD_SIZE   (640U)

Definition at line 43 of file protected_update_data_set.h.

◆ NONCE_LENGTH

#define NONCE_LENGTH   (11U)

Definition at line 47 of file protected_update_data_set.h.

◆ PAYLOAD_TYPE_DATA

#define PAYLOAD_TYPE_DATA   "data"

Definition at line 53 of file protected_update_data_set.h.

◆ PAYLOAD_TYPE_KEY

#define PAYLOAD_TYPE_KEY   "key"

Definition at line 52 of file protected_update_data_set.h.

◆ PROTECTED_CONFIDENTIALITY_TYPE

#define PROTECTED_CONFIDENTIALITY_TYPE   "confidentiality"

Definition at line 55 of file protected_update_data_set.h.

◆ PROTECTED_INTEGRATY_TYPE

#define PROTECTED_INTEGRATY_TYPE   "integrity"

Definition at line 54 of file protected_update_data_set.h.

◆ SESSION_KEY_LENGTH

#define SESSION_KEY_LENGTH   (27U)

Definition at line 50 of file protected_update_data_set.h.

◆ TRUE

#define TRUE   (1U)

Definition at line 56 of file protected_update_data_set.h.

Typedef Documentation

◆ aes_key_t

typedef struct aes_key aes_key_t

◆ confidentiality_t

◆ content_reset_type_t

◆ data_payload_t

typedef struct data_payload data_payload_t

◆ digest_algo_t

typedef enum digest_algo digest_algo_t

◆ ecc_key_t

typedef struct ecc_key ecc_key_t

◆ enc_params_t

typedef struct enc_params enc_params_t

◆ encryption_algo_t

◆ kdf_algo_t

typedef enum kdf_algo kdf_algo_t

◆ kdf_t

typedef struct kdf kdf_t

◆ key_algorithm_t

◆ key_params_t

typedef union key_params key_params_t

◆ key_payload_t

typedef struct key_payload key_payload_t

◆ key_type_d

typedef enum key_type key_type_d

◆ key_usage_t

typedef enum key_usage key_usage_t

◆ manifest_t

typedef struct manifest manifest_t

◆ metadata_payload_t

◆ payload_type_t

◆ protected_update_data_set_d

◆ rsa_key_t

typedef struct rsa_key rsa_key_t

◆ signature_algo_t

Enumeration Type Documentation

◆ content_reset_type

Enumerator
eMETADATA_IDENTIFIER_FLAG 
eZEROES 
eRANDOM 

Definition at line 101 of file protected_update_data_set.h.

◆ digest_algo

Enumerator
eSHA_256 

Definition at line 203 of file protected_update_data_set.h.

◆ encryption_algo

Enumerator
eAES_CCM_16_64_128 

Definition at line 91 of file protected_update_data_set.h.

◆ kdf_algo

enum kdf_algo
Enumerator
eIFX_KDF_TLS12_PRF_SHA256 

Definition at line 96 of file protected_update_data_set.h.

◆ key_algorithm

Enumerator
eECC_NIST_P_256 
eECC_NIST_P_384 
eRSA_1024_EXP 
eRSA_2048_EXP 
eAES_128 

Definition at line 73 of file protected_update_data_set.h.

◆ key_type

enum key_type
Enumerator
eRSA 
eECC 
eAES 

Definition at line 59 of file protected_update_data_set.h.

◆ key_usage

enum key_usage
Enumerator
eAUTH 
eENC 
eSIGN 
eKEY_AGREE 

Definition at line 82 of file protected_update_data_set.h.

◆ payload_type

Enumerator
ePAYLOAD_DATA 
ePAYLOAD_METADATA 
ePAYLOAD_KEY 

Definition at line 66 of file protected_update_data_set.h.

◆ signature_algo

Enumerator
eES_SHA 
eRSA_SSA_PKCS1_V1_5_SHA_256 

Definition at line 197 of file protected_update_data_set.h.

Function Documentation

◆ protected_update_create_fragments()

int32_t protected_update_create_fragments ( manifest_t manifest_data,
protected_update_data_set_d p_cbor_manifest 
)

◆ protected_update_create_manifest()

int32_t protected_update_create_manifest ( manifest_t manifest_data,
protected_update_data_set_d p_cbor_manifest 
)

◆ protected_update_print_output_dataset()

void protected_update_print_output_dataset ( const protected_update_data_set_d p_cbor_manifest)