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

This file provides the prototypes for the commonly used functions and structures of OPTIGA Library. More...

Include dependency graph for optiga_lib_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  optiga_hash_context
 Specifies the structure to the Hash context details managed by OPTIGA. More...
 
struct  hash_data_from_host
 Specifies the structure to provide the details of data to be hashed from host. More...
 
struct  hash_data_in_optiga
 Specifies the structure to provide the details of data to be hashed from OPTIGA. More...
 
struct  public_key_from_host
 Specifies the data structure of the Public Key details (key, size and type) More...
 
struct  optiga_get_data_object
 Specifies the data structure for data to be read from OPTIGA. More...
 
struct  optiga_set_data_object
 Specifies the data structure for data to be written to OPTIGA. More...
 
struct  optiga_calc_hash
 Specifies the data structure of calculate hash. More...
 
struct  optiga_get_random
 Specifies the data structure of random generation. More...
 
struct  optiga_gen_keypair
 Specifies the data structure for generate key pair. More...
 
struct  optiga_calc_sign
 Specifies the data structure for ECDSA signature. More...
 
struct  optiga_verify_sign
 Specifies the data structure for ECDSA signature verification. More...
 
struct  optiga_calc_ssec
 Specifies the data structure for ecdh secret generation. More...
 
struct  optiga_derive_key
 Specifies the structure for derivation of key using pseudo random function. More...
 
struct  optiga_enc_dec_asym
 Specifies the structure for asymmetric encryption and decryption. More...
 
struct  optiga_set_object_protected_params
 Specifies the data structure for protected update. More...
 
struct  optiga_symmetric_enc_dec_params
 Specifies the data structure for symmetric encrypt and decrypt. More...
 
struct  optiga_gen_symkey_params
 Specifies the data structure for symmetric generate key. More...
 
#define OPTIGA_INSTANCE_ID_0   (0x00)
 Instance id of OPTIGA slave. More...
 
#define OPTIGA_COMMS_NO_PROTECTION   (0x00)
 When command data and response data is unprotected. More...
 
#define OPTIGA_COMMS_COMMAND_PROTECTION   (0x01)
 When command data is protected and response data is unprotected. More...
 
#define OPTIGA_COMMS_RESPONSE_PROTECTION   (0x02)
 When command data is unprotected and response data is protected. More...
 
#define OPTIGA_COMMS_FULL_PROTECTION   (0x03)
 Both command data and response data are protected. More...
 
#define OPTIGA_COMMS_RE_ESTABLISH   (0x80)
 Re-establish shielded connection. More...
 
#define OPTIGA_COMMS_PROTOCOL_VERSION_PRE_SHARED_SECRET   (0x01)
 Pre shared secret protocol version. More...
 
#define OPTIGA_CRYPT_HOST_DATA   (0x01)
 Data is provided by host. More...
 
#define OPTIGA_CRYPT_OID_DATA   (0x00)
 Data in internal to optiga OID. More...
 
#define OPTIGA_LIB_INSTANCE_BUSY   (0x0001)
 OPTIGA instance is busy. More...
 
#define OPTIGA_LIB_INSTANCE_FREE   (0x0000)
 OPTIGA instance is free. More...
 
enum  optiga_key_id {
  OPTIGA_KEY_ID_E0F0 = 0xE0F0, OPTIGA_KEY_ID_E0F1 = 0xE0F1, OPTIGA_KEY_ID_E0F2 = 0xE0F2, OPTIGA_KEY_ID_E0F3 = 0xE0F3,
  OPTIGA_KEY_ID_E0FC = 0xE0FC, OPTIGA_KEY_ID_E0FD = 0xE0FD, OPTIGA_KEY_ID_SESSION_BASED = 0x0000, OPTIGA_KEY_ID_SECRET_BASED = 0xE200
}
 Specifies the key location in OPTIGA. More...
 
enum  optiga_key_usage { OPTIGA_KEY_USAGE_AUTHENTICATION = 0x01, OPTIGA_KEY_USAGE_SIGN = 0x10, OPTIGA_KEY_USAGE_KEY_AGREEMENT = 0x20, OPTIGA_KEY_USAGE_ENCRYPTION = 0x02 }
 Specifies the key usage type in OPTIGA. More...
 
enum  optiga_set_obj_protected_tag { OPTIGA_SET_PROTECTED_UPDATE_START = 0x00, OPTIGA_SET_PROTECTED_UPDATE_CONTINUE = 0x02, OPTIGA_SET_PROTECTED_UPDATE_FINAL = 0x01 }
 Specifies the set protected object tag. More...
 
enum  optiga_ecc_curve {
  OPTIGA_ECC_CURVE_NIST_P_256 = 0x03, OPTIGA_ECC_CURVE_NIST_P_384 = 0x04, OPTIGA_ECC_CURVE_NIST_P_521 = 0x05, OPTIGA_ECC_CURVE_BRAIN_POOL_P_256R1 = 0x13,
  OPTIGA_ECC_CURVE_BRAIN_POOL_P_384R1 = 0x15, OPTIGA_ECC_CURVE_BRAIN_POOL_P_512R1 = 0x16
}
 Specifies the key curve type in OPTIGA. More...
 
enum  optiga_rsa_encryption_scheme { OPTIGA_RSAES_PKCS1_V15 = 0x11 }
 Specifies the RSA encryption schemes. More...
 
enum  optiga_rsa_key_type { OPTIGA_RSA_KEY_1024_BIT_EXPONENTIAL = 0x41, OPTIGA_RSA_KEY_2048_BIT_EXPONENTIAL = 0x42 }
 Specifies the RSA key type in OPTIGA. More...
 
enum  optiga_rsa_signature_scheme { OPTIGA_RSASSA_PKCS1_V15_SHA256 = 0x01, OPTIGA_RSASSA_PKCS1_V15_SHA384 = 0x02, OPTIGA_RSASSA_PKCS1_V15_SHA512 = 0x03 }
 Specifies the RSA signature schemes type in OPTIGA. More...
 
enum  optiga_symmetric_encryption_mode { OPTIGA_SYMMETRIC_ECB = 0x08, OPTIGA_SYMMETRIC_CBC = 0x09, OPTIGA_SYMMETRIC_CBC_MAC = 0x0A, OPTIGA_SYMMETRIC_CMAC = 0x0B }
 Specifies the symmetric encryption schemes type in OPTIGA. More...
 
enum  optiga_hash_type { OPTIGA_HASH_TYPE_SHA_256 = 0xE2 }
 Specifies the hashing algorithm type in OPTIGA. More...
 
enum  optiga_hash_context_length { OPTIGA_HASH_CONTEXT_LENGTH_SHA_256 = 209 }
 Specifies the hash context length in bytes. More...
 
enum  optiga_rng_type { OPTIGA_RNG_TYPE_TRNG = 0x00, OPTIGA_RNG_TYPE_DRNG = 0x01 }
 Specifies the random generation types. More...
 
enum  optiga_hmac_type { OPTIGA_HMAC_SHA_256 = 0x20, OPTIGA_HMAC_SHA_384 = 0x21, OPTIGA_HMAC_SHA_512 = 0x22 }
 Specifies the HMAC generation types in OPTIGA. More...
 
enum  optiga_hkdf_type { OPTIGA_HKDF_SHA_256 = 0x08, OPTIGA_HKDF_SHA_384 = 0x09, OPTIGA_HKDF_SHA_512 = 0x0A }
 Specifies the HKDF key derivation types in OPTIGA. More...
 
enum  optiga_tls_prf_type { OPTIGA_TLS12_PRF_SHA_256 = 0x01, OPTIGA_TLS12_PRF_SHA_384 = 0x02, OPTIGA_TLS12_PRF_SHA_512 = 0x03 }
 Specifies the key derivation types. More...
 
enum  optiga_symmetric_key_type { OPTIGA_SYMMETRIC_AES_128 = 0x81, OPTIGA_SYMMETRIC_AES_192 = 0x82, OPTIGA_SYMMETRIC_AES_256 = 0x83 }
 Specifies the symmetric key types supported by OPTIGA. More...
 
typedef enum optiga_key_id optiga_key_id_t
 Specifies the key location in OPTIGA. More...
 
typedef enum optiga_key_usage optiga_key_usage_t
 Specifies the key usage type in OPTIGA. More...
 
typedef enum optiga_set_obj_protected_tag optiga_set_obj_protected_tag_t
 Specifies the set protected object tag. More...
 
typedef enum optiga_ecc_curve optiga_ecc_curve_t
 Specifies the key curve type in OPTIGA. More...
 
typedef enum optiga_rsa_encryption_scheme optiga_rsa_encryption_scheme_t
 Specifies the RSA encryption schemes. More...
 
typedef enum optiga_rsa_key_type optiga_rsa_key_type_t
 Specifies the RSA key type in OPTIGA. More...
 
typedef enum optiga_rsa_signature_scheme optiga_rsa_signature_scheme_t
 Specifies the RSA signature schemes type in OPTIGA. More...
 
typedef enum optiga_symmetric_encryption_mode optiga_symmetric_encryption_mode_t
 Specifies the symmetric encryption schemes type in OPTIGA. More...
 
typedef enum optiga_hash_type optiga_hash_type_t
 Specifies the hashing algorithm type in OPTIGA. More...
 
typedef enum optiga_hash_context_length optiga_hash_context_length_t
 Specifies the hash context length in bytes. More...
 
typedef enum optiga_rng_type optiga_rng_type_t
 Specifies the random generation types. More...
 
typedef enum optiga_hmac_type optiga_hmac_type_t
 Specifies the HMAC generation types in OPTIGA. More...
 
typedef enum optiga_hkdf_type optiga_hkdf_type_t
 Specifies the HKDF key derivation types in OPTIGA. More...
 
typedef enum optiga_tls_prf_type optiga_tls_prf_type_t
 Specifies the key derivation types. More...
 
typedef enum optiga_symmetric_key_type optiga_symmetric_key_type_t
 Specifies the symmetric key types supported by OPTIGA. More...
 
typedef struct optiga_hash_context optiga_hash_context_t
 Specifies the structure to the Hash context details managed by OPTIGA. More...
 
typedef struct hash_data_from_host hash_data_from_host_t
 Specifies the structure to provide the details of data to be hashed from host. More...
 
typedef struct hash_data_in_optiga hash_data_in_optiga_t
 Specifies the structure to provide the details of data to be hashed from OPTIGA. More...
 
typedef struct public_key_from_host public_key_from_host_t
 Specifies the data structure of the Public Key details (key, size and type) More...
 
typedef struct optiga_get_data_object optiga_get_data_object_params_t
 Specifies the data structure for data to be read from OPTIGA. More...
 
typedef struct optiga_set_data_object optiga_set_data_object_params_t
 Specifies the data structure for data to be written to OPTIGA. More...
 
typedef struct optiga_calc_hash optiga_calc_hash_params_t
 Specifies the data structure of calculate hash. More...
 
typedef struct optiga_get_random optiga_get_random_params_t
 Specifies the data structure of random generation. More...
 
typedef struct optiga_gen_keypair optiga_gen_keypair_params_t
 Specifies the data structure for generate key pair. More...
 
typedef struct optiga_calc_sign optiga_calc_sign_params_t
 Specifies the data structure for ECDSA signature. More...
 
typedef struct optiga_verify_sign optiga_verify_sign_params_t
 Specifies the data structure for ECDSA signature verification. More...
 
typedef struct optiga_calc_ssec optiga_calc_ssec_params_t
 Specifies the data structure for ecdh secret generation. More...
 
typedef struct optiga_derive_key optiga_derive_key_params_t
 Specifies the structure for derivation of key using pseudo random function. More...
 
typedef struct optiga_enc_dec_asym optiga_encrypt_asym_params_t
 Specifies the structure for asymmetric encryption and decryption. More...
 
typedef struct optiga_enc_dec_asym optiga_decrypt_asym_params_t
 
typedef struct optiga_set_object_protected_params optiga_set_object_protected_params_t
 Specifies the data structure for protected update. More...
 
typedef struct optiga_symmetric_enc_dec_params optiga_encrypt_sym_params_t
 Specifies the data structure for symmetric encrypt and decrypt. More...
 
typedef struct optiga_symmetric_enc_dec_params optiga_decrypt_sym_params_t
 
typedef struct optiga_gen_symkey_params optiga_gen_symkey_params_t
 Specifies the data structure for symmetric generate key. More...
 
uint32_t optiga_common_get_uint32 (const uint8_t *p_input_buffer)
 Prepares uint32 [Big endian] type value from the buffer and store. More...
 
void optiga_common_set_uint16 (uint8_t *p_output_buffer, uint16_t two_byte_value)
 Copies 2 bytes of uint16 type value to the buffer. More...
 
void optiga_common_set_uint32 (uint8_t *p_output_buffer, uint32_t four_byte_value)
 Copies 4 bytes of uint32 [Big endian] type value to the buffer and stores in the output pointer. More...
 
void optiga_common_get_uint16 (const uint8_t *p_input_buffer, uint16_t *p_two_byte_value)
 Prepares uint16 [Big endian] type value from the buffer and stores in the output pointer. More...
 

Detailed Description

This file provides the prototypes for the commonly used functions and structures of OPTIGA Library.

Author
Infineon Technologies AG

Definition in file optiga_lib_common.h.

Macro Definition Documentation

◆ OPTIGA_COMMS_COMMAND_PROTECTION

#define OPTIGA_COMMS_COMMAND_PROTECTION   (0x01)

When command data is protected and response data is unprotected.

Definition at line 55 of file optiga_lib_common.h.

◆ OPTIGA_COMMS_FULL_PROTECTION

#define OPTIGA_COMMS_FULL_PROTECTION   (0x03)

Both command data and response data are protected.

Definition at line 59 of file optiga_lib_common.h.

◆ OPTIGA_COMMS_NO_PROTECTION

#define OPTIGA_COMMS_NO_PROTECTION   (0x00)

When command data and response data is unprotected.

Definition at line 53 of file optiga_lib_common.h.

◆ OPTIGA_COMMS_PROTOCOL_VERSION_PRE_SHARED_SECRET

#define OPTIGA_COMMS_PROTOCOL_VERSION_PRE_SHARED_SECRET   (0x01)

Pre shared secret protocol version.

Definition at line 63 of file optiga_lib_common.h.

◆ OPTIGA_COMMS_RE_ESTABLISH

#define OPTIGA_COMMS_RE_ESTABLISH   (0x80)

Re-establish shielded connection.

Definition at line 61 of file optiga_lib_common.h.

◆ OPTIGA_COMMS_RESPONSE_PROTECTION

#define OPTIGA_COMMS_RESPONSE_PROTECTION   (0x02)

When command data is unprotected and response data is protected.

Definition at line 57 of file optiga_lib_common.h.

◆ OPTIGA_CRYPT_HOST_DATA

#define OPTIGA_CRYPT_HOST_DATA   (0x01)

Data is provided by host.

Definition at line 66 of file optiga_lib_common.h.

◆ OPTIGA_CRYPT_OID_DATA

#define OPTIGA_CRYPT_OID_DATA   (0x00)

Data in internal to optiga OID.

Definition at line 68 of file optiga_lib_common.h.

◆ OPTIGA_INSTANCE_ID_0

#define OPTIGA_INSTANCE_ID_0   (0x00)

Instance id of OPTIGA slave.

Definition at line 50 of file optiga_lib_common.h.

◆ OPTIGA_LIB_INSTANCE_BUSY

#define OPTIGA_LIB_INSTANCE_BUSY   (0x0001)

OPTIGA instance is busy.

Definition at line 71 of file optiga_lib_common.h.

◆ OPTIGA_LIB_INSTANCE_FREE

#define OPTIGA_LIB_INSTANCE_FREE   (0x0000)

OPTIGA instance is free.

Definition at line 73 of file optiga_lib_common.h.

Typedef Documentation

◆ hash_data_from_host_t

Specifies the structure to provide the details of data to be hashed from host.

◆ hash_data_in_optiga_t

Specifies the structure to provide the details of data to be hashed from OPTIGA.

◆ optiga_calc_hash_params_t

Specifies the data structure of calculate hash.

◆ optiga_calc_sign_params_t

Specifies the data structure for ECDSA signature.

◆ optiga_calc_ssec_params_t

Specifies the data structure for ecdh secret generation.

◆ optiga_decrypt_asym_params_t

◆ optiga_decrypt_sym_params_t

◆ optiga_derive_key_params_t

Specifies the structure for derivation of key using pseudo random function.

◆ optiga_ecc_curve_t

Specifies the key curve type in OPTIGA.

◆ optiga_encrypt_asym_params_t

Specifies the structure for asymmetric encryption and decryption.

◆ optiga_encrypt_sym_params_t

Specifies the data structure for symmetric encrypt and decrypt.

◆ optiga_gen_keypair_params_t

Specifies the data structure for generate key pair.

◆ optiga_gen_symkey_params_t

Specifies the data structure for symmetric generate key.

◆ optiga_get_data_object_params_t

Specifies the data structure for data to be read from OPTIGA.

◆ optiga_get_random_params_t

Specifies the data structure of random generation.

◆ optiga_hash_context_length_t

Specifies the hash context length in bytes.

◆ optiga_hash_context_t

Specifies the structure to the Hash context details managed by OPTIGA.

◆ optiga_hash_type_t

Specifies the hashing algorithm type in OPTIGA.

◆ optiga_hkdf_type_t

Specifies the HKDF key derivation types in OPTIGA.

◆ optiga_hmac_type_t

Specifies the HMAC generation types in OPTIGA.

◆ optiga_key_id_t

Specifies the key location in OPTIGA.

◆ optiga_key_usage_t

Specifies the key usage type in OPTIGA.

◆ optiga_rng_type_t

Specifies the random generation types.

◆ optiga_rsa_encryption_scheme_t

Specifies the RSA encryption schemes.

◆ optiga_rsa_key_type_t

Specifies the RSA key type in OPTIGA.

◆ optiga_rsa_signature_scheme_t

Specifies the RSA signature schemes type in OPTIGA.

◆ optiga_set_data_object_params_t

Specifies the data structure for data to be written to OPTIGA.

◆ optiga_set_obj_protected_tag_t

Specifies the set protected object tag.

◆ optiga_set_object_protected_params_t

Specifies the data structure for protected update.

◆ optiga_symmetric_encryption_mode_t

Specifies the symmetric encryption schemes type in OPTIGA.

◆ optiga_symmetric_key_type_t

Specifies the symmetric key types supported by OPTIGA.

◆ optiga_tls_prf_type_t

Specifies the key derivation types.

◆ optiga_verify_sign_params_t

Specifies the data structure for ECDSA signature verification.

◆ public_key_from_host_t

Specifies the data structure of the Public Key details (key, size and type)

Enumeration Type Documentation

◆ optiga_ecc_curve

Specifies the key curve type in OPTIGA.

Enumerator
OPTIGA_ECC_CURVE_NIST_P_256 

Generate elliptic curve key based on NIST P256.

OPTIGA_ECC_CURVE_NIST_P_384 

Generate elliptic curve key based on NIST P384.

OPTIGA_ECC_CURVE_NIST_P_521 

Generate elliptic curve key based on ECC NIST P521.

OPTIGA_ECC_CURVE_BRAIN_POOL_P_256R1 

Generate elliptic curve key based on ECC Brainpool 256R1.

OPTIGA_ECC_CURVE_BRAIN_POOL_P_384R1 

Generate elliptic curve key based on ECC Brainpool 384R1.

OPTIGA_ECC_CURVE_BRAIN_POOL_P_512R1 

Generate elliptic curve key based on ECC Brainpool 512R1.

Definition at line 138 of file optiga_lib_common.h.

◆ optiga_hash_context_length

Specifies the hash context length in bytes.

Enumerator
OPTIGA_HASH_CONTEXT_LENGTH_SHA_256 

Hash context length (in bytes) in case of SHA256.

Definition at line 224 of file optiga_lib_common.h.

◆ optiga_hash_type

Specifies the hashing algorithm type in OPTIGA.

Enumerator
OPTIGA_HASH_TYPE_SHA_256 

Hash algorithm type SHA256.

Definition at line 215 of file optiga_lib_common.h.

◆ optiga_hkdf_type

Specifies the HKDF key derivation types in OPTIGA.

Enumerator
OPTIGA_HKDF_SHA_256 

Key derivation using HKDF-SHA256.

OPTIGA_HKDF_SHA_384 

Key derivation using HKDF-SHA384.

OPTIGA_HKDF_SHA_512 

Key derivation using HKDF-SHA512.

Definition at line 260 of file optiga_lib_common.h.

◆ optiga_hmac_type

Specifies the HMAC generation types in OPTIGA.

Enumerator
OPTIGA_HMAC_SHA_256 

Generated MAC using HMAC-SHA256.

OPTIGA_HMAC_SHA_384 

Generated MAC using HMAC-SHA384.

OPTIGA_HMAC_SHA_512 

Generated MAC using HMAC-SHA512.

Definition at line 245 of file optiga_lib_common.h.

◆ optiga_key_id

Specifies the key location in OPTIGA.

Enumerator
OPTIGA_KEY_ID_E0F0 

Key from key store (non-volatile)

OPTIGA_KEY_ID_E0F1 

Key from key store (non-volatile)

OPTIGA_KEY_ID_E0F2 

Key from key store (non-volatile)

OPTIGA_KEY_ID_E0F3 

Key from key store (non-volatile)

OPTIGA_KEY_ID_E0FC 

Key from key store for RSA (non-volatile)

OPTIGA_KEY_ID_E0FD 

Key from key store for RSA (non-volatile)

OPTIGA_KEY_ID_SESSION_BASED 

Key from session (volatile)

OPTIGA_KEY_ID_SECRET_BASED 

Key from key store for symmetric operations.

Definition at line 85 of file optiga_lib_common.h.

◆ optiga_key_usage

Specifies the key usage type in OPTIGA.

Enumerator
OPTIGA_KEY_USAGE_AUTHENTICATION 

This enables the private key for the signature generation as part of authentication commands.

OPTIGA_KEY_USAGE_SIGN 

This enables the private key for the signature generation.

OPTIGA_KEY_USAGE_KEY_AGREEMENT 

This enables the private key for key agreement (e.g. ecdh operations)

OPTIGA_KEY_USAGE_ENCRYPTION 

This enables the private key for encrypt and decrypt.

Definition at line 110 of file optiga_lib_common.h.

◆ optiga_rng_type

Specifies the random generation types.

Enumerator
OPTIGA_RNG_TYPE_TRNG 

Generate Random data using TRNG.

OPTIGA_RNG_TYPE_DRNG 

Generate Random data using DRNG.

Definition at line 233 of file optiga_lib_common.h.

◆ optiga_rsa_encryption_scheme

Specifies the RSA encryption schemes.

Enumerator
OPTIGA_RSAES_PKCS1_V15 

RSA PKCS1 v1.5 encryption scheme.

Definition at line 161 of file optiga_lib_common.h.

◆ optiga_rsa_key_type

Specifies the RSA key type in OPTIGA.

Enumerator
OPTIGA_RSA_KEY_1024_BIT_EXPONENTIAL 

Generate 1024 bit RSA key.

OPTIGA_RSA_KEY_2048_BIT_EXPONENTIAL 

Generate 2048 bit RSA key.

Definition at line 170 of file optiga_lib_common.h.

◆ optiga_rsa_signature_scheme

Specifies the RSA signature schemes type in OPTIGA.

Enumerator
OPTIGA_RSASSA_PKCS1_V15_SHA256 

Signature schemes RSA SSA PKCS1-v1.5 with SHA256 digest.

OPTIGA_RSASSA_PKCS1_V15_SHA384 

Signature schemes RSA SSA PKCS1-v1.5 with SHA384 digest.

OPTIGA_RSASSA_PKCS1_V15_SHA512 

Signature schemes RSA SSA PKCS1-v1.5 with SHA512 digest.

Definition at line 182 of file optiga_lib_common.h.

◆ optiga_set_obj_protected_tag

Specifies the set protected object tag.

Enumerator
OPTIGA_SET_PROTECTED_UPDATE_START 

This enables to start of the protected update.

OPTIGA_SET_PROTECTED_UPDATE_CONTINUE 

This enables to continue of the protected update.

OPTIGA_SET_PROTECTED_UPDATE_FINAL 

This enables to finish of the protected update.

Definition at line 125 of file optiga_lib_common.h.

◆ optiga_symmetric_encryption_mode

Specifies the symmetric encryption schemes type in OPTIGA.

Enumerator
OPTIGA_SYMMETRIC_ECB 

Symmetric encryption mode with ECB mode.

OPTIGA_SYMMETRIC_CBC 

Symmetric encryption mode with CBC mode.

OPTIGA_SYMMETRIC_CBC_MAC 

Symmetric encryption mode with CBC_MAC mode.

OPTIGA_SYMMETRIC_CMAC 

Symmetric encryption mode with CMAC mode.

Definition at line 199 of file optiga_lib_common.h.

◆ optiga_symmetric_key_type

Specifies the symmetric key types supported by OPTIGA.

Enumerator
OPTIGA_SYMMETRIC_AES_128 

Symmetric key type of AES-128.

OPTIGA_SYMMETRIC_AES_192 

Symmetric key type of AES-192.

OPTIGA_SYMMETRIC_AES_256 

Symmetric key type of AES-256.

Definition at line 292 of file optiga_lib_common.h.

◆ optiga_tls_prf_type

Specifies the key derivation types.

Enumerator
OPTIGA_TLS12_PRF_SHA_256 

Key derivation using TLSv1.2 PRF SHA256.

OPTIGA_TLS12_PRF_SHA_384 

Key derivation using TLSv1.2 PRF SHA384.

OPTIGA_TLS12_PRF_SHA_512 

Key derivation using TLSv1.2 PRF SHA512.

Definition at line 274 of file optiga_lib_common.h.

Function Documentation

◆ optiga_common_get_uint16()

void optiga_common_get_uint16 ( const uint8_t *  p_input_buffer,
uint16_t *  p_two_byte_value 
)

Prepares uint16 [Big endian] type value from the buffer and stores in the output pointer.

Prepares uint16 [Big endian] type value from the buffer and store

  • Return first 2 bytes from input buffer as uint16_t.
Precondition
  • None
Note
  • None
Parameters
[in]p_input_bufferPointer to the buffer
[in,out]p_two_byte_valuePointer to the value tobe assigne

◆ optiga_common_get_uint32()

uint32_t optiga_common_get_uint32 ( const uint8_t *  p_input_buffer)

Prepares uint32 [Big endian] type value from the buffer and store.

Prepares uint32 [Big endian] type value from the buffer and store

  • Return first 4 bytes from input buffer as uint32_t.
Precondition
  • None
Note
  • None
Parameters
[in]p_input_bufferPointer to the buffer
Return values
return32 bit value

◆ optiga_common_set_uint16()

void optiga_common_set_uint16 ( uint8_t *  p_output_buffer,
uint16_t  two_byte_value 
)

Copies 2 bytes of uint16 type value to the buffer.

Copies 2 bytes of uint16 type value to the buffer

  • Copies the 2 bytes value to input buffer in big endian format.
Precondition
  • None
Note
  • None
Parameters
[in,out]p_output_bufferPointer to the buffer
[in]two_byte_value16 bit value

◆ optiga_common_set_uint32()

void optiga_common_set_uint32 ( uint8_t *  p_output_buffer,
uint32_t  four_byte_value 
)

Copies 4 bytes of uint32 [Big endian] type value to the buffer and stores in the output pointer.

Copies 4 bytes of uint32 [Big endian] type value to the buffer and store

  • Copies the 4 bytes value to input buffer in big endian format.
Precondition
  • None
Note
  • None
Parameters
[in,out]p_output_bufferPointer to the buffer
[in]four_byte_value32 bit value