Infineon OPTIGA(TM) Trust X mutual authentication APIs. More...
Data Structures | |
struct | sHardwareCrypto_d |
Structure for Hardware Crypto. More... | |
struct | sHandshake_d |
Structure containing Handshake related data. More... | |
struct | sCL_d |
Structure containing Crypto Layer information. More... | |
struct | sConfigCL_d |
Structure to configure Crypto Layer. More... | |
struct | sRL_d |
Structure containing Record Layer information. More... | |
struct | sConfigRL_d |
Structure to configure Record Layer. More... | |
struct | sTL_d |
Structure holding Transport Layer Information. More... | |
struct | sConfigTL_d |
Structure to configure Transport Layer. More... | |
Macros | |
#define | MODULE_ENABLE_READ_WRITE |
#define | MODULE_ENABLE_ONE_WAY_AUTH |
#define | MODULE_ENABLE_TOOLBOX |
#define | OPTIMIZE_CODE(x) |
#define | OPTIMIZE_CODE_ENDS(x) |
#define | ERROR_CODE_BASE 0x80000000 |
Base Error Code. | |
#define | BASE_ERROR_COMMS (ERROR_CODE_BASE | 0x00000000) |
Base Error code for Comms. | |
#define | BASE_ERROR_CMDLIB (ERROR_CODE_BASE | 0x00000100) |
Base Error code for Command Lib. | |
#define | BASE_ERROR_INTLIB (ERROR_CODE_BASE | 0x00000200) |
Base Error code for Integration Lib. | |
#define | BASE_ERROR_CRYPTOLIB (ERROR_CODE_BASE | 0x00000300) |
Base Error code for Crypto Lib. | |
#define | BASE_ERROR_ALERT (ERROR_CODE_BASE | 0x00000500) |
Base Error code for Alert. | |
#define | BASE_ERROR_HANDSHAKELAYER (ERROR_CODE_BASE | 0x00000600) |
Base Error code for Handshake Layer. | |
#define | BASE_ERROR_TRANSPORTLAYER (ERROR_CODE_BASE | 0x00000700) |
Base Error code for Transport Layer. | |
#define | BASE_ERROR_OCPLAYER (ERROR_CODE_BASE | 0x00000800) |
Base Error code for OCP. | |
#define | BASE_ERROR_RECORDLAYER (ERROR_CODE_BASE | 0x00000900) |
Base Error code for Record Layer. | |
#define | BASE_ERROR_WINDOW (ERROR_CODE_BASE | 0x00000A00) |
Base Error code for Windowing. | |
#define | BASE_ERROR_MESSAGELAYER (ERROR_CODE_BASE | 0x00000B00) |
Base Error code for Message Layer. | |
#define | BASE_ERROR_FLIGHT (ERROR_CODE_BASE | 0x00000C00) |
Base Error code for Flight Handler. | |
#define | BASE_ERROR_CRYPTO_LAYER (ERROR_CODE_BASE | 0x00000D00) |
Base Error code for Crypto Layer. | |
#define | BASE_ERROR_UDP (ERROR_CODE_BASE | 0x00000E00) |
Base Error code UDP. | |
#define | OCP_HL_OK 0x75236512 |
Successful execution. | |
#define | OCP_HL_ERROR 0XF3CA3154 |
Failure in execution. | |
#define | OCP_HL_NULL_PARAM BASE_ERROR_HANDSHAKELAYER |
Null Parameter(s) | |
#define | OCP_HL_LENZERO_ERROR (BASE_ERROR_HANDSHAKELAYER + 1) |
Length of input is zero. | |
#define | MAX_PMTU 1500 |
Maximum PMTU value. | |
#define | MIN_PMTU 296 |
Minimum PMTU Value. | |
#define | TLBUFFER_SIZE 1500 |
Buffer size to hold the received data. | |
#define | ENCRYPTED_APP_OVERHEAD (UDP_RECORD_OVERHEAD + EXPLICIT_NOUNCE_LENGTH + MAC_LENGTH ) |
Overhead length for encrypted message. | |
#define | MAX_APP_DATALEN(PhAppOCPCtx) ((((sAppOCPCtx_d*)PhAppOCPCtx)->sHandshake.wMaxPmtu) - ENCRYPTED_APP_OVERHEAD) |
Macro to get the Maximum length of the Application data which can be sent. | |
#define | OCP_CL_ERROR 0x51667F82 |
Failure in execution. | |
#define | OCP_CL_OK 0x4C36F247 |
Successful Execution. | |
#define | OCP_CL_NULL_PARAM BASE_ERROR_CRYPTO_LAYER |
Null paramter. | |
#define | OCP_CL_MALLOC_FAILURE (BASE_ERROR_CRYPTO_LAYER + 1) |
Malloc Failure in Crypto. | |
#define | OCP_CL_ZERO_LEN (BASE_ERROR_CRYPTO_LAYER + 2) |
Zero Length Failure. | |
#define | OCP_CL_INSUFFICIENT_MEMORY (BASE_ERROR_CRYPTO_LAYER + 3) |
Insufficient memory. | |
#define | OCP_RL_ERROR 0x55667F82 |
Failure in execution. | |
#define | OCP_RL_OK 0x297D9015 |
Internal status for success. | |
#define | OCP_RL_INVALID_RECORD_LENGTH BASE_ERROR_RECORDLAYER |
Invalid record length. | |
#define | OCP_RL_INVALID_CONTENTTYPE (BASE_ERROR_RECORDLAYER + 1) |
Invalid record content type. | |
#define | OCP_RL_INVALID_DEC_PAYLOAD_LEN (BASE_ERROR_RECORDLAYER + 2) |
Invalid decrypt payload lenght. | |
#define | OCP_RL_INVALID_PROTOCOL_VERSION (BASE_ERROR_RECORDLAYER + 3) |
Invalid protocol version. | |
#define | OCP_RL_INCORRECT_EPOCH (BASE_ERROR_RECORDLAYER + 4) |
Incorrect epoch. | |
#define | OCP_RL_RECORD_LEN_MISMATCH (BASE_ERROR_RECORDLAYER + 5) |
Record length mismatch. | |
#define | OCP_RL_BAD_RECORD (BASE_ERROR_RECORDLAYER + 6) |
Bad record. | |
#define | OCP_RL_NO_DATA (BASE_ERROR_RECORDLAYER + 7) |
No data. | |
#define | OCP_RL_LEN_GREATER_PMTU (BASE_ERROR_RECORDLAYER + 8) |
Data length is greater than PMTU. | |
#define | OCP_RL_INVALID_INSTANCE (BASE_ERROR_RECORDLAYER + 9) |
Invalid record instance. | |
#define | OCP_RL_ALERT_RECEIVED (BASE_ERROR_RECORDLAYER + 10) |
Alert record received. | |
#define | OCP_RL_APPDATA_RECEIVED (BASE_ERROR_RECORDLAYER + 11) |
Alert record received. | |
#define | OCP_RL_MALLOC_FAILURE (BASE_ERROR_RECORDLAYER + 12) |
Malloc Failure. | |
#define | CONTENTTYPE_CIPHER_SPEC 0x14 |
Cipher Spec Content Spec. | |
#define | CONTENTTYPE_ALERT 0x15 |
Alert Content Spec. | |
#define | CONTENTTYPE_HANDSHAKE 0x16 |
Handshake Content Spec. | |
#define | CONTENTTYPE_APP_DATA 0x17 |
Application Data Content Spec. | |
#define | UDP_RECORD_OVERHEAD 41 |
UDP REcord overhead length. | |
#define | MAC_LENGTH 8 |
Length of the MAC generated for encrypted message. | |
#define | EXPLICIT_NOUNCE_LENGTH 8 |
Length of Explicit Nounce. | |
#define | OCP_TL_ERROR 0xF1267AB3 |
General error. | |
#define | OCP_TL_OK 0x72309781 |
Successful execution. | |
#define | OCP_TL_NULL_PARAM BASE_ERROR_TRANSPORTLAYER |
Null Parameter(S) | |
#define | OCP_TL_BINDING_FAILURE (BASE_ERROR_TRANSPORTLAYER + 1) |
Null Parameter(S) | |
#define | OCP_TL_NO_DATA (BASE_ERROR_TRANSPORTLAYER + 2) |
NO Data received. | |
#define | OCP_TL_MALLOC_FAILURE (BASE_ERROR_TRANSPORTLAYER + 3) |
Malloc failure. | |
#define | E_COMMS_UDP_ALLOCATE_FAILURE 0x80000100 |
Failure to allocate memory. | |
#define | E_COMMS_UDP_BINDING_FAILURE 0x80000101 |
Binding failure to a port. | |
#define | E_COMMS_UDP_NO_DATA_TO_SEND 0x80000102 |
No data present to send. | |
#define | E_COMMS_UDP_NO_DATA_RECEIVED 0x80000103 |
No data received from the target. | |
#define | E_COMMS_UDP_ROUTING_FAILURE 0x80000104 |
Failure to route the UDP packet. | |
#define | E_COMMS_UDP_DEALLOCATION_FAILURE 0x80000105 |
Failure to deallocate the memory. | |
#define | E_COMMS_UDP_COPY_BUFFER_FAILURE 0x80000106 |
Copy to the buffer failure. | |
#define | E_COMMS_UDP_CONNECT_FAILURE 0x80000107 |
UDP connect failure. | |
Typedefs | |
typedef struct sHardwareCrypto_d | sHardwareCrypto_d |
Structure for Hardware Crypto. | |
typedef int32_t(* | fGetUnixTime_d )(uint32_t *) |
Function pointer to get the unix time. | |
typedef enum eMode_d | eMode_d |
Enumeration to specify the mode of operation of OCP. | |
typedef enum eProtVersion_d | eProtVersion_d |
Enumeration to specify the Protocol version. | |
typedef enum eAuthState_d | eAuthState_d |
Enum for Mutual Authentication states. | |
typedef struct sHandshake_d | sHandshake_d |
Structure containing Handshake related data. | |
typedef enum eFlight_d | eFlight_d |
Enum for Flights. | |
typedef int32_t(* | fPerformHandshake_d )(sHandshake_d *) |
Function pointer to perform Handshake. | |
typedef struct sCL_d | sCL_d |
Structure containing Crypto Layer information. | |
typedef int32_t(* | fCLInit )(sCL_d *psCL, const void *) |
Function pointer to Initialize Record Layer. | |
typedef int32_t(* | fCLEncrypt )(const sCL_d *psCL, const sbBlob_d *PpsBlobPlainText, sbBlob_d *PpsBlobCipherText, uint16_t wLen) |
Function pointer for Record Layer Send. | |
typedef int32_t(* | fCLDecrypt )(const sCL_d *psCL, const sbBlob_d *PpsBlobCipherText, sbBlob_d *PpsBlobPlainText, uint16_t wLen) |
Function pointer for Record Layer Receive. | |
typedef void(* | fCLClose )(sCL_d *psCL) |
Function pointer to close Record Layer. | |
typedef struct sConfigCL_d | sConfigCL_d |
Structure to configure Crypto Layer. | |
typedef struct sRL_d | sRL_d |
Structure containing Record Layer information. | |
typedef int32_t(* | fRLInit )(sRL_d *psRL) |
Function pointer to Initialize Record Layer. | |
typedef int32_t(* | fRLSend )(sRL_d *psRL, uint8_t *pbBuffer, uint16_t wLen) |
Function pointer for Record Layer Send. | |
typedef int32_t(* | fRLRecv )(sRL_d *psRL, uint8_t *pbBuffer, uint16_t *pwLen) |
Function pointer for Record Layer Receive. | |
typedef void(* | fRLClose )(sRL_d *psRL) |
Function pointer to close Record Layer. | |
typedef struct sConfigRL_d | sConfigRL_d |
Structure to configure Record Layer. | |
typedef enum eConnectionState_d | eConnectionState_d |
Enumeration to represent transport layer communication state. | |
typedef enum eReceiveCall_d | eReceiveCall_d |
This structure contains Ethernet communication data. | |
typedef struct sTL_d | sTL_d |
Structure holding Transport Layer Information. | |
typedef int32_t(* | fTLInit )(sTL_d *psTL) |
Function pointer for Transport Layer Init. | |
typedef int32_t(* | fTLConnect )(sTL_d *psTL) |
Function pointer for Transport Layer Connect. | |
typedef void(* | fTLDisconnect )(sTL_d *psTL) |
Function pointer for Transport Layer Disconnect. | |
typedef int32_t(* | fTLSend )(const sTL_d *psTL, uint8_t *pbBuffer, uint16_t wLen) |
Function pointer for Transport Layer Send. | |
typedef int32_t(* | fTLRecv )(const sTL_d *psTL, uint8_t *pbBuffer, uint16_t *pwLen) |
Function pointer for Transport Layer Receive. | |
typedef struct sConfigTL_d | sConfigTL_d |
Structure to configure Transport Layer. | |
Enumerations | |
enum | eMode_d { eClient = 0x24, eServer = 0x81 } |
Enumeration to specify the mode of operation of OCP. More... | |
enum | eProtVersion_d { eDTLS_1_2, eTLS_1_2 } |
Enumeration to specify the Protocol version. More... | |
enum | eAuthState_d { eAuthInitialised, eAuthStarted, eAuthCompleted, eAuthSessionClosed } |
Enum for Mutual Authentication states. | |
enum | eFlight_d { eFlight0 = 0, eFlight1 = 1, eFlight2 = 2, eFlight3 = 3, eFlight4 = 4, eFlight5 = 5, eFlight6 = 6, eDefault } |
Enum for Flights. More... | |
enum | eConnectionState_d { eConnected = 0x01, eDisconnected = 0x02 } |
Enumeration to represent transport layer communication state. More... | |
enum | eReceiveCall_d { eBlocking = 0x10, eNonBlocking = 0x20 } |
This structure contains Ethernet communication data. More... | |
Functions | |
int32_t | HWCL_Init (sCL_d *PpsCL, const void *PpParam) |
Initialises the Hardware Crypto Layer. | |
int32_t | HWCL_Encrypt (const sCL_d *PpsCL, const sbBlob_d *PpsBlobPlainText, sbBlob_d *PpsBlobCipherText, uint16_t PwLen) |
Encrypts the input plain text using Security chip. | |
int32_t | HWCL_Decrypt (const sCL_d *PpsCL, const sbBlob_d *PpsBlobCipherText, sbBlob_d *PpsBlobPlainText, uint16_t PwLen) |
Decrypts the input cipher text using Security chip. | |
void | HWCL_Close (sCL_d *PpsCL) |
Closes the Crypto layer. | |
Infineon OPTIGA(TM) Trust X mutual authentication APIs.
enum eConnectionState_d |
enum eFlight_d |
enum eMode_d |
enum eProtVersion_d |
enum eReceiveCall_d |