Secure Engine: Modules

Secure Engine v1.3.0 Release
Modules
Here is a list of all modules:
[detail level 1234567]
▼ Secure Engine |
▼ Secure Engine Interface | APIs the SE users (bootloader, user app) can call
▼ Secure Engine Interface for Application | Interface functions the User Application calls to use SE services
Exported Functions | These are the functions the User Application can call to use the SE services
▼ Secure Engine Interface for Bootloader | Interface functions the Bootloader calls to use SE services. These APIs must remain crypto-agnostic
Exported Functions | These are the functions the bootloader can call to use the SE services. These functions must remain crypto-agnostic
▼ Common elements for SE interface | Common elements used by se_interface_application and se_interface_bootloader
▼ SE Interface common functions | Functions used by se_interface_bootloader and se_interface_application
SE Interface common functions for Secure Mode | Functions used by se_interface_bootloader and se_interface_application to handle the Secure Mode
Private Defines |
Private Macros |
▼ Low Layer Interface |
Private Variables |
▼ Exported Functions |
CRC Exported Functions |
FLASH Exported Functions |
▼ Exported Macros |
Code Isolation Settings | These settings configure the way the Secure Engine is isolated from the rest of the code
▼ SE Core | Secure Engine core code compiled in SE_CoreBin
▼ SE BootInfo | Boot Information management (system status used at boot time)
Private Defines |
Private Variables | WARNING: All the private variable of modules used by the SecureEngine must be not initialized. if these variables are used inside Secure Engine APIs exported to the UserApp, you can't count on the compiler/linker variable initialization at reset
Private Macros |
Private Functions |
▼ Exported Functions |
Initialization Functions |
Control Functions |
Exported Types |
▼ SE CallGate | Implementation of the call gate API. The call gate allows the execution of code inside the protected area
▼ Private Constants |
Private Macros |
Exported Functions |
▼ Exported Constants |
Secure Engine CallGate Function ID structure definition |
▼ SE Crypto | Crypto services (used by the bootloader and common crypto functions)
▼ SE Crypto for Bootloader | Crypto functions used by the bootloader. The implementation of these functions is crypto-dependent. These functions use the generic SE_FwRawHeaderTypeDef structure to fill crypto specific structures
Private Variables |
Private Macros |
Exported Functions | The implementation of these functions is crypto-dependent. These functions use the generic SE_FwRawHeaderTypeDef structure to fill crypto specific structures
▼ SE Common Crypto elements | Common Crypto items for the functions used by the bootloader and the application
▼ Exported Variables |
AES GCM Exported Variables | Private variables used for AES GCM symmetric crypto
▼ Exported Functions | Common crypto functions (helpers) to be used by the bootloader and the user application services if needed. This aims at factorizing the crypto code (core code with crypto-dependent APIs)
AES GCM Exported Functions | Common crypto functions (helpers) for AES GCM symmetric crypto
▼ SE crypto common structures | Structures used to work with the crypto-specific functions
SE crypto AES GCM structures | Structures used to work with the AES GCM symmetric crypto functions
▼ Public Macros | Common macros used by all files dealing with some crypto parameters
AES GCM Public Macros | Common macros used by all files dealing with some AES GCM crypto parameters
▼ SE Crypto common functions |
▼ Exported Functions | Common crypto functions (helpers) to be used by the bootloader and the user application services if needed. This aims at factorizing the crypto code (core code with crypto-dependent APIs)
AES GCM Exported Functions | Common crypto functions (helpers) for AES GCM symmetric crypto
SE Crypto scheme configuration | Choose the cryptographic scheme you want the bootloader to use. These settings apply to the services used by the bootloader only, not to the services called by the User Application
▼ SE Exception |
Exported Functions |
▼ SE Firmware Image | Code used to handle the Firmware Images. This contains functions used by the bootloader
Exported Functions |
▼ SE Startup | Init of the SE handled by the bootloader (via se_interface_bootloader) before the isolation mechanism is enabled
Exported Functions |
▼ SE Code for Application | This file is a placeholder for the code dedicated to the user application. It contains the code written by the end user. The code used by the application to handle the Firmware images is located in se_fwimg.c
Exported Functions |
Structure(s) for user defined SE code |
▼ SE Utils |
Private Variables |
Exported Functions |
▼ SE Definitions |
▼ SE Metadata Definitions | Definitions related to FW metadata (FW header) which are crypto dependent
Exported Constants |
Exported Types |
▼ SE Core Definitions | Core definitions (constants, error codes, image handling) which are NOT crypto dependent
▼ Exported Constants |
Secure Engine Status definition |
▼ SE Key |
SE_KEY_Exported_Functions | Functions SE_CoreBin can use to retrieve the keys. These functions are implemented in se_key.s
Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Secure Engine

Modules
Secure Engine

Modules

Secure Engine Interface
APIs the SE users (bootloader, user app) can call.
Low Layer Interface
SE Core
Secure Engine core code compiled in SE_CoreBin.
SE Key

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Secure Engine Interface

Modules
Secure Engine Interface
Secure Engine

APIs the SE users (bootloader, user app) can call. More...

Modules

Secure Engine Interface for Application
Interface functions the User Application calls to use SE services.
Secure Engine Interface for Bootloader
Interface functions the Bootloader calls to use SE services. These APIs must remain crypto-agnostic.
Common elements for SE interface
Common elements used by se_interface_application and se_interface_bootloader.

Detailed Description

APIs the SE users (bootloader, user app) can call.

Note
Please note that this code is compiled in the SB_SFU project (not in SE_CoreBin). Nevertheless, this file also includes "se_low_level.h" from SE_CoreBin to make sure the SE interface is in sync with the SE code.


Secure Engine: Secure Engine Interface for Application

Modules
Secure Engine Interface for Application
Secure Engine » Secure Engine Interface

Interface functions the User Application calls to use SE services. More...

Modules

Exported Functions
These are the functions the User Application can call to use the SE services.

Detailed Description

Interface functions the User Application calls to use SE services.

"se_interface" is built and set in the context of the SB_SFU project. Then some symbols are exported to the User Application for the User Application to call some Secure Engine services through "se_interface" (SB_SFU and the User Application are exclusive, they do not run in parallel). As "se_interface" is set by SB_SFU but can be used by the User Application, it is important not to introduce global variables if you do not want to create dependencies between the SB_SFU RAM mapping (SRAM1) and the User Application RAM mapping.


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » Secure Engine Interface » Secure Engine Interface for Application

These are the functions the User Application can call to use the SE services. More...

Functions

__root SE_ErrorStatus SE_APP_GetActiveFwInfo (SE_StatusTypeDef *peSE_Status, SE_APP_ActiveFwInfo_t *p_FwInfo)
Service called by the User Application to retrieve the Active Firmware Info. More...

Detailed Description

These are the functions the User Application can call to use the SE services.

@ Functions the User Application calls to run the SE services.

Function Documentation

◆ SE_APP_GetActiveFwInfo()

SE_ErrorStatus SE_APP_GetActiveFwInfo | ( | SE_StatusTypeDef * | peSE_Status,
 |  | SE_APP_ActiveFwInfo_t * | p_FwInfo
 | ) |  |

Service called by the User Application to retrieve the Active Firmware Info.

Parameters
peSE_Status | Secure Engine Status.
p_FwInfo | Active Firmware Info structure that will be filled.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References SE_APP_GET_ACTIVE_FW_INFO, SE_EnterSecureMode(), SE_ExitSecureMode(), and SET_CALLGATE.


Secure Engine: Secure Engine Interface for Bootloader

Modules
Secure Engine Interface for Bootloader
Secure Engine » Secure Engine Interface

Interface functions the Bootloader calls to use SE services. These APIs must remain crypto-agnostic. More...

Modules

Exported Functions
These are the functions the bootloader can call to use the SE services. These functions must remain crypto-agnostic.

Detailed Description

Interface functions the Bootloader calls to use SE services. These APIs must remain crypto-agnostic.

Note
Please note that this code is compiled in the SB_SFU project (not in SE_CoreBin). Nevertheless, this file also includes "se_low_level.h" from SE_CoreBin to make sure the SE interface is in sync with the SE code.

"se_interface" is built and set in the context of the SB_SFU project. Then some symbols are exported to the User Application for the User Application to call some Secure Engine services through "se_interface" (SB_SFU and the User Application are exclusive, they do not run in parallel). As "se_interface" is set by SB_SFU but can be used by the User Application, it is important not to introduce global variables if you do not want to create dependencies between the SB_SFU RAM mapping (SRAM1) and the User Application RAM mapping.


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » Secure Engine Interface » Secure Engine Interface for Bootloader

These are the functions the bootloader can call to use the SE services. These functions must remain crypto-agnostic. More...

Functions

SE_ErrorStatus | SE_Init (SE_StatusTypeDef *peSE_Status, uint32_t uSystemCoreClock)
Secure Engine initialization function. This function initialize all the internals module of the Secure Engine. More...
SE_ErrorStatus | SE_Startup (void)
Secure Engine Startup function. This function initializes the SE Core binary. This function must be called only one time so an internal check is executed. More...
SE_ErrorStatus | SE_INFO_ReadBootInfo (SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo)
call by SFU to read Info Boot inside the protected area. More...
SE_ErrorStatus | SE_INFO_WriteBootInfo (SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo)
call by SFU to write Info Boot inside the protected area. More...
SE_ErrorStatus | SE_LockRestrictServices (SE_StatusTypeDef *pSE_Status)
call by SFU to lock part of Secure Engine services More...
SE_ErrorStatus | SE_SFU_IMG_Read (SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length)
call by SFU to read flash protected area More...
SE_ErrorStatus | SE_SFU_IMG_Write (SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length)
call by SFU to write a flash protected area More...
SE_ErrorStatus | SE_SFU_IMG_Erase (SE_StatusTypeDef *pSE_Status, void *pDestination, uint32_t Length)
call by SFU to erase a flash protected area More...
SE_ErrorStatus | SE_Decrypt_Init (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType)
Secure Engine Decrypt Init function. It is a wrapper of Decrypt_Init function included in the protected area. More...
SE_ErrorStatus | SE_Decrypt_Append (SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Decrypt Append function. It is a wrapper of Decrypt_Append function included in the protected area. More...
SE_ErrorStatus | SE_Decrypt_Finish (SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Decrypt Finish function. It is a wrapper of Decrypt_Finish function included in the protected area. More...
SE_ErrorStatus | SE_AuthenticateFW_Init (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType)
Secure Engine Firmware Authentication Init function. It is a wrapper of AuthenticateFW_Init function included in the Firewall. More...
SE_ErrorStatus | SE_AuthenticateFW_Append (SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Firmware Authentication Append function. It is a wrapper of AuthenticateFW_Append function included in the Firewall. More...
SE_ErrorStatus | SE_AuthenticateFW_Finish (SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Firmware Authentication Finish function. It is a wrapper of AuthenticateFW_Finish function included in the Firewall. More...
SE_ErrorStatus | SE_VerifyFwRawHeaderTag (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxFwRawHeader)
Secure Engine Verify Raw Fw Header Tag. It verifies the signature of a raw header file. More...

Detailed Description

These are the functions the bootloader can call to use the SE services. These functions must remain crypto-agnostic.

Function Documentation

◆ SE_Init()

SE_ErrorStatus SE_Init | ( | SE_StatusTypeDef * | peSE_Status,
 |  | uint32_t | uSystemCoreClock
 | ) |  |

Secure Engine initialization function. This function initialize all the internals module of the Secure Engine.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
uSystemCoreClock | System clock value.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED.

◆ SE_Startup()

SE_ErrorStatus SE_Startup ( void )

Secure Engine Startup function. This function initializes the SE Core binary. This function must be called only one time so an internal check is executed.

Parameters
None.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

< Secure Engine STARTUP pointer function

References __IS_SFU_RESERVED.

◆ SE_INFO_ReadBootInfo()

SE_ErrorStatus SE_INFO_ReadBootInfo | ( | SE_StatusTypeDef * | peSE_Status,
 |  | SE_BootInfoTypeDef * | pxSE_BootInfo
 | ) |  |

call by SFU to read Info Boot inside the protected area.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
pxSE_BootInfo | BootInfo area pointer that will be filled.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_BOOT_INFO_READ_ALL_ID, SE_EnterSecureMode(), SE_ExitSecureMode(), and SET_CALLGATE.

◆ SE_INFO_WriteBootInfo()

SE_ErrorStatus SE_INFO_WriteBootInfo | ( | SE_StatusTypeDef * | peSE_Status,
 |  | SE_BootInfoTypeDef * | pxSE_BootInfo
 | ) |  |

call by SFU to write Info Boot inside the protected area.

Parameters
peSE_Status | Secure Engine Status.
pxSE_BootInfo | pxSE_BootInfo BootInfo area pointer.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_BOOT_INFO_WRITE_ALL_ID, SE_EnterSecureMode(), SE_ExitSecureMode(), and SET_CALLGATE.

◆ SE_LockRestrictServices()

SE_ErrorStatus SE_LockRestrictServices ( SE_StatusTypeDef * pSE_Status )

call by SFU to lock part of Secure Engine services

Parameters
pSE_Status Secure Engine Status.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_EnterSecureMode(), SE_ExitSecureMode(), SE_LOCK_RESTRICT_SERVICES, and SET_CALLGATE.

◆ SE_SFU_IMG_Read()

SE_ErrorStatus SE_SFU_IMG_Read | ( | SE_StatusTypeDef * | pSE_Status,
 |  | void * | pDestination,
 |  | const void * | pSource,
 |  | uint32_t | Length
 | ) |  |

call by SFU to read flash protected area

Parameters
pSE_Status | Secure Engine Status.
pDestination | pointer to output buffer.
pSource | pointer to the flash area to read.
Length | number of bytes to read from flash
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_EnterSecureMode(), SE_ExitSecureMode(), SE_IMG_READ, and SET_CALLGATE.

◆ SE_SFU_IMG_Write()

SE_ErrorStatus SE_SFU_IMG_Write | ( | SE_StatusTypeDef * | pSE_Status,
 |  | void * | pDestination,
 |  | const void * | pSource,
 |  | uint32_t | Length
 | ) |  |

call by SFU to write a flash protected area

Parameters
pSE_Status | Secure Engine Status.
pDestination | pointer to flash area to write.
pSource | pointer to input buffer.
Length | number of bytes to write to flash
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_EnterSecureMode(), SE_ExitSecureMode(), SE_IMG_WRITE, and SET_CALLGATE.

◆ SE_SFU_IMG_Erase()

SE_ErrorStatus SE_SFU_IMG_Erase | ( | SE_StatusTypeDef * | pSE_Status,
 |  | void * | pDestination,
 |  | uint32_t | Length
 | ) |  |

call by SFU to erase a flash protected area

Parameters
pSE_Status | Secure Engine Status.
pDestination | pointer to flash area to erase.
Length | number of bytes to erase in flash
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_EnterSecureMode(), SE_ExitSecureMode(), SE_IMG_ERASE, and SET_CALLGATE.

◆ SE_Decrypt_Init()

SE_ErrorStatus SE_Decrypt_Init | ( | SE_StatusTypeDef * | peSE_Status,
 |  | SE_FwRawHeaderTypeDef * | pxSE_Metadata,
 |  | int32_t | SE_FwType
 | ) |  |

Secure Engine Decrypt Init function. It is a wrapper of Decrypt_Init function included in the protected area.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
pxSE_Metadata | Metadata that will be used to fill the Crypto Init structure.
SE_FwType | Type of Fw Image. This parameter can be SE_FW_IMAGE_COMPLETE or SE_FW_IMAGE_PARTIAL.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED.

◆ SE_Decrypt_Append()

SE_ErrorStatus SE_Decrypt_Append | ( | SE_StatusTypeDef * | peSE_Status,
 |  | const uint8_t * | pInputBuffer,
 |  | int32_t | InputSize,
 |  | uint8_t * | pOutputBuffer,
 |  | int32_t * | pOutputSize
 | ) |  |

Secure Engine Decrypt Append function. It is a wrapper of Decrypt_Append function included in the protected area.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
pInputBuffer | pointer to Input Buffer.
InputSize | Input Size (bytes).
pOutputBuffer | pointer to Output Buffer.
pOutputSize | pointer to Output Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_CRYPTO_LL_DECRYPT_APPEND_ID, SE_EnterSecureMode(), SE_ExitSecureMode(), and SET_CALLGATE.

◆ SE_Decrypt_Finish()

SE_ErrorStatus SE_Decrypt_Finish | ( | SE_StatusTypeDef * | peSE_Status,
 |  | uint8_t * | pOutputBuffer,
 |  | int32_t * | pOutputSize
 | ) |  |

Secure Engine Decrypt Finish function. It is a wrapper of Decrypt_Finish function included in the protected area.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
pOutputBuffer | pointer to Output Buffer.
pOutputSize | pointer to Output Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_CRYPTO_LL_DECRYPT_FINISH_ID, SE_EnterSecureMode(), SE_ExitSecureMode(), and SET_CALLGATE.

◆ SE_AuthenticateFW_Init()

SE_ErrorStatus SE_AuthenticateFW_Init | ( | SE_StatusTypeDef * | peSE_Status,
 |  | SE_FwRawHeaderTypeDef * | pxSE_Metadata,
 |  | int32_t | SE_FwType
 | ) |  |

Secure Engine Firmware Authentication Init function. It is a wrapper of AuthenticateFW_Init function included in the Firewall.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
pxSE_Metadata | Metadata that will be used to fill the Crypto Init structure.
SE_FwType | Type of Fw Image. This parameter can be SE_FW_IMAGE_COMPLETE or SE_FW_IMAGE_PARTIAL.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED.

◆ SE_AuthenticateFW_Append()

SE_ErrorStatus SE_AuthenticateFW_Append | ( | SE_StatusTypeDef * | peSE_Status,
 |  | const uint8_t * | pInputBuffer,
 |  | int32_t | InputSize,
 |  | uint8_t * | pOutputBuffer,
 |  | int32_t * | pOutputSize
 | ) |  |

Secure Engine Firmware Authentication Append function. It is a wrapper of AuthenticateFW_Append function included in the Firewall.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
pInputBuffer | pointer to Input Buffer.
InputSize | Input Size (bytes).
pOutputBuffer | pointer to Output Buffer.
pOutputSize | pointer to Output Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_CRYPTO_LL_AUTHENTICATE_FW_APPEND_ID, SE_EnterSecureMode(), SE_ExitSecureMode(), and SET_CALLGATE.

◆ SE_AuthenticateFW_Finish()

SE_ErrorStatus SE_AuthenticateFW_Finish | ( | SE_StatusTypeDef * | peSE_Status,
 |  | uint8_t * | pOutputBuffer,
 |  | int32_t * | pOutputSize
 | ) |  |

Secure Engine Firmware Authentication Finish function. It is a wrapper of AuthenticateFW_Finish function included in the Firewall.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
pOutputBuffer | pointer to Output Buffer.
pOutputSize | pointer to Output Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_CRYPTO_LL_AUTHENTICATE_FW_FINISH_ID, SE_EnterSecureMode(), SE_ExitSecureMode(), and SET_CALLGATE.

◆ SE_VerifyFwRawHeaderTag()

SE_ErrorStatus SE_VerifyFwRawHeaderTag | ( | SE_StatusTypeDef * | peSE_Status,
 |  | SE_FwRawHeaderTypeDef * | pxFwRawHeader
 | ) |  |

Secure Engine Verify Raw Fw Header Tag. It verifies the signature of a raw header file.

Parameters
peSE_Status | Secure Engine Status. This parameter can be a value of Secure Engine Status definition.
pxFwRawHeader | pointer to RawHeader Buffer.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_SFU_RESERVED, SE_CRYPTO_HL_AUTHENTICATE_METADATA, SE_EnterSecureMode(), SE_ExitSecureMode(), and SET_CALLGATE.


Secure Engine: Common elements for SE interface

Modules | Variables
Common elements for SE interface
Secure Engine » Secure Engine Interface

Common elements used by se_interface_application and se_interface_bootloader. More...

Modules

SE Interface common functions
Functions used by se_interface_bootloader and se_interface_application.
Private Defines
Private Macros

Variables

uint32_t primask_bit

Detailed Description

Common elements used by se_interface_application and se_interface_bootloader.

Note
Please note that this code is compiled in the SB_SFU project (not in SE_CoreBin). Nevertheless, this file also includes "se_low_level.h" from SE_CoreBin to make sure the SE interface is in sync with the SE code.

Variable Documentation

◆ primask_bit

uint32_t primask_bit

interruption mask saved when disabling ITs then restore when re-enabling ITs


Secure Engine: SE Interface common functions

Modules
SE Interface common functions
Secure Engine » Secure Engine Interface » Common elements for SE interface

Functions used by se_interface_bootloader and se_interface_application. More...

Modules

SE Interface common functions for Secure Mode
Functions used by se_interface_bootloader and se_interface_application to handle the Secure Mode.

Detailed Description

Functions used by se_interface_bootloader and se_interface_application.


Secure Engine: SE Interface common functions for Secure Mode

Functions
SE Interface common functions for Secure Mode
Secure Engine » Secure Engine Interface » Common elements for SE interface » SE Interface common functions

Functions used by se_interface_bootloader and se_interface_application to handle the Secure Mode. More...

Functions

void | SE_EnterSecureMode (void)
SE Enter Secure Mode. More...
void | SE_ExitSecureMode (void)
SE Exit Secure Mode. More...

Detailed Description

Functions used by se_interface_bootloader and se_interface_application to handle the Secure Mode.

Function Documentation

◆ SE_EnterSecureMode()

void SE_EnterSecureMode ( void )

SE Enter Secure Mode.

Parameters
None.
Return values
None.

References primask_bit.

◆ SE_ExitSecureMode()

void SE_ExitSecureMode ( void )

SE Exit Secure Mode.

Parameters
None.
Return values
None.

References primask_bit.


Secure Engine: Private Defines

Macros
Private Defines
Secure Engine » Secure Engine Interface » Common elements for SE interface

Macros

#define | SE_MDW_VERSION_MAIN (0x01U)
Secure Engine Middleware version. More...
#define | SE_MDW_VERSION_SUB1 (0x00U)
#define | SE_MDW_VERSION_SUB2 (0x00U)
#define | SE_MDW_VERSION_RC (0x00U)
#define | SE_MDW_VERSION

Detailed Description

Macro Definition Documentation

◆ SE_MDW_VERSION_MAIN

#define SE_MDW_VERSION_MAIN (0x01U)

Secure Engine Middleware version.

[31:24] main version

◆ SE_MDW_VERSION_SUB1

#define SE_MDW_VERSION_SUB1 (0x00U)

[23:16] sub1 version

◆ SE_MDW_VERSION_SUB2

#define SE_MDW_VERSION_SUB2 (0x00U)

[15:8] sub2 version

◆ SE_MDW_VERSION_RC

#define SE_MDW_VERSION_RC (0x00U)

[7:0] release candidate

◆ SE_MDW_VERSION

#define SE_MDW_VERSION
Value:
((SE_MDW_VERSION_MAIN << 24U)\
|(SE_MDW_VERSION_SUB1 << 16U)\
|(SE_MDW_VERSION_SUB2 << 8U )\
|(SE_MDW_VERSION_RC))
SE_MDW_VERSION_MAIN
#define SE_MDW_VERSION_MAIN
Secure Engine Middleware version.
Definition: se_interface_common.h:55
SE_MDW_VERSION_RC
#define SE_MDW_VERSION_RC
Definition: se_interface_common.h:58
SE_MDW_VERSION_SUB2
#define SE_MDW_VERSION_SUB2
Definition: se_interface_common.h:57
SE_MDW_VERSION_SUB1
#define SE_MDW_VERSION_SUB1
Definition: se_interface_common.h:56

Fw Version


Secure Engine: Private Macros

Macros
Private Macros
Secure Engine » Secure Engine Interface » Common elements for SE interface

Macros

#define | __IS_SFU_RESERVED()
Check if the caller is located in SBSFU region. More...
#define | SET_CALLGATE()
This macro sets the CallGate function pointer. A local variable is used to avoid constraints regarding the SRAM1 handling, as the SE_Init is called in SB_SFU context but the se_interface functions can be called in the UserApp context too. More...

Detailed Description

Macro Definition Documentation

◆ __IS_SFU_RESERVED

#define __IS_SFU_RESERVED ( )
Value:
do{ \
if ((__get_LR())< SB_REGION_ROM_START){\
return SE_ERROR;}\
if ((__get_LR())> SB_REGION_ROM_END){\
return SE_ERROR;}\
}while(0)

Check if the caller is located in SBSFU region.

◆ SET_CALLGATE

#define SET_CALLGATE ( )
Value:
SE_ErrorStatus(*SE_CallGatePtr)(SE_FunctionIDTypeDef ID, SE_StatusTypeDef *peSE_Status, \
...); \
SE_CallGatePtr = (SE_ErrorStatus(*)(SE_FunctionIDTypeDef, SE_StatusTypeDef *, \
...))((uint32_t) SE_CALLGATE_REGION_ROM_START + 1U);
SE_FunctionIDTypeDef
uint32_t SE_FunctionIDTypeDef
Definition: se_callgate.h:89
SE_StatusTypeDef
uint32_t SE_StatusTypeDef
Definition: se_def_core.h:74
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54

This macro sets the CallGate function pointer. A local variable is used to avoid constraints regarding the SRAM1 handling, as the SE_Init is called in SB_SFU context but the se_interface functions can be called in the UserApp context too.


Secure Engine: Low Layer Interface

Modules
Low Layer Interface
Secure Engine

Modules

Private Variables
Exported Functions
Exported Macros

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Private Variables

Variables
Private Variables
Secure Engine » Low Layer Interface

Variables

static CRC_HandleTypeDef CrcHandle

Detailed Description

Variable Documentation

◆ CrcHandle

CRC_HandleTypeDef CrcHandle
static

SE Crc Handle


Secure Engine: Exported Functions

Modules
Exported Functions
Secure Engine » Low Layer Interface

Modules

CRC Exported Functions
FLASH Exported Functions

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: CRC Exported Functions

Functions
CRC Exported Functions
Secure Engine » Low Layer Interface » Exported Functions

Functions

SE_ErrorStatus | SE_LL_CRC_Config (void)
Set CRC configuration and call HAL CRC initialization function. More...
SE_ErrorStatus | SE_LL_CRC_Init (void)
Wrapper to HAL CRC initilization function. More...
SE_ErrorStatus | SE_LL_CRC_DeInit (void)
Wrapper to HAL CRC de-initilization function. More...
uint32_t | SE_LL_CRC_Calculate (uint32_t pBuffer[], uint32_t uBufferLength)
Wrapper to HAL CRC Calculate function. More...

Detailed Description

Function Documentation

◆ SE_LL_CRC_Config()

SE_ErrorStatus SE_LL_CRC_Config ( void )

Set CRC configuration and call HAL CRC initialization function.

Parameters
None.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise

◆ SE_LL_CRC_Init()

SE_ErrorStatus SE_LL_CRC_Init ( void )

Wrapper to HAL CRC initilization function.

Parameters
None
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_LL_CRC_DeInit()

SE_ErrorStatus SE_LL_CRC_DeInit ( void )

Wrapper to HAL CRC de-initilization function.

Parameters
None
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_LL_CRC_Calculate()

uint32_t SE_LL_CRC_Calculate | ( | uint32_t | pBuffer[],
 |  | uint32_t | uBufferLength
 | ) |  |

Wrapper to HAL CRC Calculate function.

Parameters
pBuffer | pointer to data buffer.
uBufferLength | buffer length in 32-bits word.
Return values
uint32_t CRC (returned value LSBs for CRC shorter than 32 bits)


Secure Engine: FLASH Exported Functions

Functions
FLASH Exported Functions
Secure Engine » Low Layer Interface » Exported Functions

Functions

SE_ErrorStatus | SE_LL_FLASH_Erase (void *pStart, uint32_t Length)
This function does an erase of nb pages in user flash area. More...
SE_ErrorStatus | SE_LL_FLASH_Write (void *pDestination, const void *pSource, uint32_t Length)
Write in Flash protected area. More...
SE_ErrorStatus | SE_LL_FLASH_Read (void *pDestination, const void *pSource, uint32_t Length)
Read in Flash protected area. More...
void | FLASH_IRQHandler (void)
Flash IRQ Handler. More...

Detailed Description

Function Documentation

◆ SE_LL_FLASH_Erase()

SE_ErrorStatus SE_LL_FLASH_Erase | ( | void * | pStart,
 |  | uint32_t | Length
 | ) |  |

This function does an erase of nb pages in user flash area.

Parameters
pStart | pointer to user flash area
Length | number of bytes.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_LL_FLASH_Write()

SE_ErrorStatus SE_LL_FLASH_Write | ( | void * | pDestination,
 |  | const void * | pSource,
 |  | uint32_t | Length
 | ) |  |

Write in Flash protected area.

Parameters
pDestination | pointer to destination area in Flash
pSource | pointer to input buffer
Length | number of bytes to be written
Return values
SE_SUCCESS if successful, otherwise SE_ERROR

◆ SE_LL_FLASH_Read()

SE_ErrorStatus SE_LL_FLASH_Read | ( | void * | pDestination,
 |  | const void * | pSource,
 |  | uint32_t | Length
 | ) |  |

Read in Flash protected area.

Parameters
pDestination | Start address for target location
pSource | pointer on buffer with data to read
Length | Length in bytes of data buffer
Return values
SFU_ErrorStatus SFU_SUCCESS if successful, SFU_ERROR otherwise.

◆ FLASH_IRQHandler()

void FLASH_IRQHandler ( void )

Flash IRQ Handler.

Parameters
None.
Return values
None.


Secure Engine: Exported Macros

Modules
Exported Macros
Secure Engine » Low Layer Interface

Modules

Code Isolation Settings
These settings configure the way the Secure Engine is isolated from the rest of the code.

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Code Isolation Settings

Macros
Code Isolation Settings
Secure Engine » Low Layer Interface » Exported Macros

These settings configure the way the Secure Engine is isolated from the rest of the code. More...

Macros

#define | ENTER_PROTECTED_AREA() CLEAR_BIT(FIREWALL->CR, FW_CR_FPA)
#define | EXIT_PROTECTED_AREA() __HAL_FIREWALL_PREARM_ENABLE()
Set FPA bit for a proper closure of the Firewall when exiting the protected function.

Detailed Description

These settings configure the way the Secure Engine is isolated from the rest of the code.

  • When using MPU isolation, only the SE code and data is isolated.
  • When using Firewall isolation, the header of slot #0 and the swap area are also protected.

Macro Definition Documentation

◆ ENTER_PROTECTED_AREA

#define ENTER_PROTECTED_AREA ( ) CLEAR_BIT(FIREWALL->CR, FW_CR_FPA)

Set the FIREWALL pre arm bit to avoid reset when fetching non protected code after exiting from protected code execution area


Secure Engine: SE Core

Modules
SE Core
Secure Engine

Secure Engine core code compiled in SE_CoreBin. More...

Modules

SE BootInfo
Boot Information management (system status used at boot time)
SE CallGate
Implementation of the call gate API. The call gate allows the execution of code inside the protected area.
SE Crypto
Crypto services (used by the bootloader and common crypto functions)
SE Exception
SE Firmware Image
Code used to handle the Firmware Images. This contains functions used by the bootloader.
SE Startup
Init of the SE handled by the bootloader (via se_interface_bootloader) before the isolation mechanism is enabled.
SE Code for Application
This file is a placeholder for the code dedicated to the user application. It contains the code written by the end user. The code used by the application to handle the Firmware images is located in se_fwimg.c.
SE Utils
SE Definitions

Detailed Description

Secure Engine core code compiled in SE_CoreBin.


Secure Engine: SE BootInfo

Modules
SE BootInfo
Secure Engine » SE Core

Boot Information management (system status used at boot time) More...

Modules

Private Defines
Private Variables
WARNING: All the private variable of modules used by the SecureEngine must be not initialized. if these variables are used inside Secure Engine APIs exported to the UserApp, you can't count on the compiler/linker variable initialization at reset.
Private Macros
Private Functions
Exported Functions
Exported Types

Detailed Description

Boot Information management (system status used at boot time)


Secure Engine: Private Defines

Macros
Private Defines
Secure Engine » SE Core » SE BootInfo

Macros

#define SE_INFO_NONE 0x0U

Detailed Description

Macro Definition Documentation

◆ SE_INFO_NONE

#define SE_INFO_NONE 0x0U

No information on last execution


Secure Engine: Private Variables

Variables
Private Variables
Secure Engine » SE Core » SE BootInfo

WARNING: All the private variable of modules used by the SecureEngine must be not initialized. if these variables are used inside Secure Engine APIs exported to the UserApp, you can't count on the compiler/linker variable initialization at reset. More...

Variables

static SE_INFO_StatusTypedef | eBootInfoStatus
static SE_BootInfoTypeDef | xBootInfo
static SE_BootInfoTypeDef | xBootInfoBackUp

Detailed Description

WARNING: All the private variable of modules used by the SecureEngine must be not initialized. if these variables are used inside Secure Engine APIs exported to the UserApp, you can't count on the compiler/linker variable initialization at reset.

Variable Documentation

◆ eBootInfoStatus

SE_INFO_StatusTypedef eBootInfoStatus
static

Status of boot info : SE_INFO_VALID, SE_INFO_RECOVERED ...

◆ xBootInfo

SE_BootInfoTypeDef xBootInfo
static

Boot information for last execution

◆ xBootInfoBackUp

SE_BootInfoTypeDef xBootInfoBackUp
static

Backup values in case in BootInfo invalidity : CRC check KO


Secure Engine: Private Macros

Macros
Private Macros
Secure Engine » SE Core » SE BootInfo

Macros

#define IS_SE_INFO_STATUS(STATUS)
Check validity of STATUS parameter. More...

Detailed Description

Macro Definition Documentation

◆ IS_SE_INFO_STATUS

#define IS_SE_INFO_STATUS ( STATUS )
Value:
(((STATUS) == SE_INFO_NOT_ACCESSED) || \
((STATUS) == SE_INFO_VALID) || \
((STATUS) == SE_INFO_RECOVERED) || \
((STATUS) == SE_INFO_NOT_FOUND) || \
((STATUS) == SE_INFO_NOT_VALID))
SE_INFO_RECOVERED
Definition: se_bootinfo.h:54
SE_INFO_NOT_ACCESSED
Definition: se_bootinfo.h:52
SE_INFO_NOT_VALID
Definition: se_bootinfo.h:56
SE_INFO_NOT_FOUND
Definition: se_bootinfo.h:55
SE_INFO_VALID
Definition: se_bootinfo.h:53

Check validity of STATUS parameter.


Secure Engine: Private Functions

Functions
Private Functions
Secure Engine » SE Core » SE BootInfo

Functions

static SE_ErrorStatus SE_LL_CRC_Check (SE_BootInfoTypeDef *x)
Check the CRC of the BootInfo given as a parameter. More...

Detailed Description

Function Documentation

◆ SE_LL_CRC_Check()

static SE_ErrorStatus SE_LL_CRC_Check ( SE_BootInfoTypeDef * x )
static

Check the CRC of the BootInfo given as a parameter.

Parameters
x pointer to the BootInfo to be checked.
Return values
SE_SUCCESS if it succeeds, SE_ERROR otherwise

References SE_LL_CRC_Calculate().


Secure Engine: Exported Functions

Modules
Exported Functions
Secure Engine » SE Core » SE BootInfo

Modules

Initialization Functions
Control Functions

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Initialization Functions

Functions
Initialization Functions
Secure Engine » SE Core » SE BootInfo » Exported Functions

Functions

SE_ErrorStatus | SE_INFO_BootInfoAreaInit (SE_INFO_StatusTypedef *peBootInfoStatus)
Initialize the global variable used by this module and the BootInfoArea Hardware (CRC, etc.). More...
SE_ErrorStatus | SE_INFO_BootInfoAreaDeInit (void)
DeInitialize the BootInfoArea structure cleaning the SRAM, and the xBootInfo area access and the related Hw. More...

Detailed Description

Function Documentation

◆ SE_INFO_BootInfoAreaInit()

SE_ErrorStatus SE_INFO_BootInfoAreaInit ( SE_INFO_StatusTypedef * peBootInfoStatus )

Initialize the global variable used by this module and the BootInfoArea Hardware (CRC, etc.).

Parameters
peBootInfoStatus output param to be filled with the BootInfoArea status
Note
The specific global variable initialization is mandatory for all the modules part of the Secure Engine and cannot be delegated to the compiler/linker. When the secure engine is exported to an external application , only the SE APIs are exported while the global variable initialization (normally executed during the startup of this project) will not be executed. So without calling this function, all the global variables used by this module should be declared not-initialized and must be initialized here!
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise

References eBootInfoStatus, SE_INFO_NOT_ACCESSED, and SE_LL_CRC_Init().

◆ SE_INFO_BootInfoAreaDeInit()

SE_ErrorStatus SE_INFO_BootInfoAreaDeInit ( void )

DeInitialize the BootInfoArea structure cleaning the SRAM, and the xBootInfo area access and the related Hw.

Parameters
None.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise

References SE_LL_CRC_DeInit().


Secure Engine: Control Functions

Functions
Control Functions
Secure Engine » SE Core » SE BootInfo » Exported Functions

Functions

SE_ErrorStatus | SE_INFO_BootInfoAreaFactoryReset (void)
Reset the BootInfo shared Area to factory value. More...
SE_ErrorStatus | SE_INFO_ReadBootInfoArea (SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus)
Read the xBootInfo area and return the BootInfoArea and the related status. More...
SE_ErrorStatus | SE_INFO_WriteBootInfoArea (SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus)
Write the passed BootInfo pointer into the xBootInfo area and return related status. More...

Detailed Description

Function Documentation

◆ SE_INFO_BootInfoAreaFactoryReset()

SE_ErrorStatus SE_INFO_BootInfoAreaFactoryReset ( void )

Reset the BootInfo shared Area to factory value.

Note
This function must be called in case it's not possible to read a valid BootInfoArea even after an attempted recovery . This can happen if the MCU is rebooting the 1st time after this code has been flashed, or if for some reason the BootInfoArea and its backup copy are corrupted
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise

References SE_BootInfoTypeDef::ConsecutiveBootOnErrorCounter, SE_BootInfoTypeDef::CRC32, eBootInfoStatus, IS_SE_INFO_STATUS, SE_BootInfoTypeDef::LastExecError, SE_BootInfoTypeDef::LastExecStatus, SE_INFO_NONE, SE_INFO_NOT_ACCESSED, SE_INFO_WriteBootInfoArea(), and SE_LL_CRC_Calculate().

◆ SE_INFO_ReadBootInfoArea()

SE_ErrorStatus SE_INFO_ReadBootInfoArea | ( | SE_BootInfoTypeDef * | pxBootInfo,
 |  | SE_INFO_StatusTypedef * | peBootInfoStatus
 | ) |  |

Read the xBootInfo area and return the BootInfoArea and the related status.

Parameters
pxBootInfo | output param to be filled with the BootInfoArea structure
peBootInfoStatus | output param to be filled with the BootInfoArea status
Note
This function is supposed to be called from inside the protected area (when available in the MCU). SE_INFO_BootInfoAreaInit must have been called before using this function;
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise

◆ SE_INFO_WriteBootInfoArea()

SE_ErrorStatus SE_INFO_WriteBootInfoArea | ( | SE_BootInfoTypeDef * | pxBootInfo,
 |  | SE_INFO_StatusTypedef * | peBootInfoStatus
 | ) |  |

Write the passed BootInfo pointer into the xBootInfo area and return related status.

Parameters
pxBootInfo | input param containing the BootInfoArea structure to be written
peBootInfoStatus | output param to be filled with the BootInfoArea status
Note
This function is supposed to be called from inside the protected area (when available in the MCU) SE_INFO_BootInfoAreaInit must have been called before using this function;
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise


Secure Engine: Exported Types

Data Structures | Enumerations
Exported Types
Secure Engine » SE Core » SE BootInfo

Data Structures

struct SE_BootInfoTypeDef
Specifies the BootInfo data structure. More...

Enumerations

enum SE_INFO_StatusTypedef {
SE_INFO_NOT_ACCESSED = 0U, SE_INFO_VALID, SE_INFO_RECOVERED, SE_INFO_NOT_FOUND,
SE_INFO_NOT_VALID
}
Specific the BootInfoArea status. More...

Detailed Description

Enumeration Type Documentation

◆ SE_INFO_StatusTypedef

enum SE_INFO_StatusTypedef

Specific the BootInfoArea status.

Enumerator
SE_INFO_NOT_ACCESSED | BootInfo is not initialized/validated yet
SE_INFO_VALID | BootInfo is correctly found and verified
SE_INFO_RECOVERED | Problem detected, but recovered thanks to the BootInfoBckp
SE_INFO_NOT_FOUND | BootInfo is not present. Empty
SE_INFO_NOT_VALID | BootInfo is not valid and recover from BootInfoBckp is not possible


Secure Engine: SE_BootInfoTypeDef Struct Reference

Data Fields
SE_BootInfoTypeDef Struct Reference
Secure Engine » SE Core » SE BootInfo » Exported Types

Specifies the BootInfo data structure. More...

#include <se_bootinfo.h>

Data Fields

uint32_t | LastExecStatus
uint32_t | LastExecError
uint32_t | ConsecutiveBootOnErrorCounter
uint32_t | CRC32

Detailed Description

Specifies the BootInfo data structure.

Field Documentation

◆ LastExecStatus

uint32_t SE_BootInfoTypeDef::LastExecStatus

The last execution status set by the Secure Boot before a reset/reboot occurred

◆ LastExecError

uint32_t SE_BootInfoTypeDef::LastExecError

The last execution error set by the Secure Boot before a reset/reboot occurred

◆ ConsecutiveBootOnErrorCounter

uint32_t SE_BootInfoTypeDef::ConsecutiveBootOnErrorCounter

Counter counting the number of consecutive boot procedures triggered by an error (in UserApp or SB_SFU). Reset as soon as a normal boot procedure (power off/on) is performed.

◆ CRC32

uint32_t SE_BootInfoTypeDef::CRC32

The 32bit checksum calculated on the previous structure fields. It is mandatory to keep this field as the last uint32_t of this structure.

The documentation for this struct was generated from the following file:
  • C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_bootinfo.h


Secure Engine: SE CallGate

Modules
SE CallGate
Secure Engine » SE Core

Implementation of the call gate API. The call gate allows the execution of code inside the protected area. More...

Modules

Private Constants
Exported Constants

Detailed Description

Implementation of the call gate API. The call gate allows the execution of code inside the protected area.


Secure Engine: Private Constants

Modules | Enumerations | Functions
Private Constants
Secure Engine » SE Core » SE CallGate

Modules

Private Macros
Exported Functions

Enumerations

enum SE_LockStatus { SE_UNLOCKED = 0x55555555U, SE_LOCKED = 0x7AAAAAAAU }
Secure Engine Lock Status enum definition.

Functions

SE_ErrorStatus SE_SP_SMUGGLE (SE_FunctionIDTypeDef eID, SE_StatusTypeDef *peSE_Status, va_list arguments)
Switch stack pointer from SB RAM region to SE RAM region then call SE_CallGateService.

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Private Macros

Macros
Private Macros
Secure Engine » SE Core » SE CallGate » Private Constants

Macros

#define | __IS_CALLER_SE_IF()
Check if the caller is located in SE Interface region. More...
#define | __IS_SE_LOCKED_SERVICES()
If lock restriction service enabled, execution is forbidden. More...

Detailed Description

Macro Definition Documentation

◆ __IS_CALLER_SE_IF

#define __IS_CALLER_SE_IF ( )
Value:
do{ \
if (LR< SE_IF_REGION_ROM_START){\
NVIC_SystemReset();}\
if (LR> SE_IF_REGION_ROM_END){\
NVIC_SystemReset();}\
}while(0)

Check if the caller is located in SE Interface region.

◆ __IS_SE_LOCKED_SERVICES

#define __IS_SE_LOCKED_SERVICES ( )
Value:
do{ \
if (SE_LockRestrictedServices != SE_UNLOCKED){\
NVIC_SystemReset();}\
}while(0)

If lock restriction service enabled, execution is forbidden.


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » SE Core » SE CallGate » Private Constants

Functions

SE_ErrorStatus | SE_CallGate (SE_FunctionIDTypeDef eID, SE_StatusTypeDef *peSE_Status,...)
Secure Engine CallGate function. It is the only access/exit point to code inside protected area. In order to call others functions included in the protected area, the specific ID has to be specified. More...
SE_ErrorStatus | SE_CallGateService (SE_FunctionIDTypeDef eID, SE_StatusTypeDef *peSE_Status, va_list arguments)
Dispatch function used by the Secure Engine CallGate function. Calls other functions included in the protected area based on the eID parameter. More...

Detailed Description

Function Documentation

◆ SE_CallGate()

SE_ErrorStatus SE_CallGate | ( | SE_FunctionIDTypeDef | eID,
 |  | SE_StatusTypeDef * | peSE_Status,
 |  |  | ...
 | ) |  |

Secure Engine CallGate function. It is the only access/exit point to code inside protected area. In order to call others functions included in the protected area, the specific ID has to be specified.

Note
It is a variable argument function. The correct number and order of parameters has to be used in order to call internal function in the right way.
DO NOT MODIFY THIS FUNCTION. New services can be implemented in SE_CallGateService.
Parameters
eID | Secure Engine protected function ID.
peSE_Status | Secure Engine Status.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __IS_CALLER_SE_IF.

◆ SE_CallGateService()

SE_ErrorStatus SE_CallGateService | ( | SE_FunctionIDTypeDef | eID,
 |  | SE_StatusTypeDef * | peSE_Status,
 |  | va_list | arguments
 | ) |  |

Dispatch function used by the Secure Engine CallGate function. Calls other functions included in the protected area based on the eID parameter.

Note
It is a variable argument function. The correct number and order of parameters has to be used in order to call internal function in the right way.
Parameters
eID | Secure Engine protected function ID.
peSE_Status Secure Engine Status.
arguments | argument list to be extracted. Depends on each protected function ID.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.


Secure Engine: Exported Constants

Modules
Exported Constants
Secure Engine » SE Core » SE CallGate

Modules

Secure Engine CallGate Function ID structure definition

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Secure Engine CallGate Function ID structure definition

Macros | Typedefs
Secure Engine CallGate Function ID structure definition
Secure Engine » SE Core » SE CallGate » Exported Constants

Macros

#define | SE_INIT_ID (0x00UL)
#define | SE_CRYPTO_LL_DECRYPT_INIT_ID (0x04UL)
#define | SE_CRYPTO_LL_DECRYPT_APPEND_ID (0x05UL)
#define | SE_CRYPTO_LL_DECRYPT_FINISH_ID (0x06UL)
#define | SE_CRYPTO_LL_AUTHENTICATE_FW_INIT_ID (0x07UL)
#define | SE_CRYPTO_LL_AUTHENTICATE_FW_APPEND_ID (0x08UL)
#define | SE_CRYPTO_LL_AUTHENTICATE_FW_FINISH_ID (0x09UL)
#define | SE_CRYPTO_HL_AUTHENTICATE_METADATA (0x10UL)
#define | SE_APP_GET_ACTIVE_FW_INFO (0x20UL)
#define | SE_BOOT_INFO_READ_ALL_ID (0x80UL)
#define | SE_BOOT_INFO_WRITE_ALL_ID (0x81UL)
#define | SE_IMG_READ (0x92UL)
#define | SE_IMG_WRITE (0x93UL)
#define | SE_IMG_ERASE (0x94UL)
#define | SE_LOCK_RESTRICT_SERVICES (0x100UL)
#define | SE_MW_ADDON_MSB_MASK (0x70000000U)
#define | SE_MW_ADDON_KMS_MSB (0x10000000U)

Typedefs

typedef uint32_t SE_FunctionIDTypeDef

Detailed Description

Macro Definition Documentation

◆ SE_INIT_ID

#define SE_INIT_ID (0x00UL)

Secure Engine Init

◆ SE_CRYPTO_LL_DECRYPT_INIT_ID

#define SE_CRYPTO_LL_DECRYPT_INIT_ID (0x04UL)

CRYPTO Low level Decrypt_Init

◆ SE_CRYPTO_LL_DECRYPT_APPEND_ID

#define SE_CRYPTO_LL_DECRYPT_APPEND_ID (0x05UL)

CRYPTO Low level Decrypt_Append

◆ SE_CRYPTO_LL_DECRYPT_FINISH_ID

#define SE_CRYPTO_LL_DECRYPT_FINISH_ID (0x06UL)

CRYPTO Low level Decrypt_Finish

◆ SE_CRYPTO_LL_AUTHENTICATE_FW_INIT_ID

#define SE_CRYPTO_LL_AUTHENTICATE_FW_INIT_ID (0x07UL)

CRYPTO Low level Authenticate_FW_Init

◆ SE_CRYPTO_LL_AUTHENTICATE_FW_APPEND_ID

#define SE_CRYPTO_LL_AUTHENTICATE_FW_APPEND_ID (0x08UL)

CRYPTO Low level Authenticate_FW_Append

◆ SE_CRYPTO_LL_AUTHENTICATE_FW_FINISH_ID

#define SE_CRYPTO_LL_AUTHENTICATE_FW_FINISH_ID (0x09UL)

CRYPTO Low level Authenticate_FW_Finish

◆ SE_CRYPTO_HL_AUTHENTICATE_METADATA

#define SE_CRYPTO_HL_AUTHENTICATE_METADATA (0x10UL)

CRYPTO High level Authenticate Metadata

◆ SE_APP_GET_ACTIVE_FW_INFO

#define SE_APP_GET_ACTIVE_FW_INFO (0x20UL)

User Application retrieves the Active Firmware Info

◆ SE_BOOT_INFO_READ_ALL_ID

#define SE_BOOT_INFO_READ_ALL_ID (0x80UL)

SE_INFO_ReadBootInfo (bootloader only)

◆ SE_BOOT_INFO_WRITE_ALL_ID

#define SE_BOOT_INFO_WRITE_ALL_ID (0x81UL)

SE_INFO_WriteBootInfo (bootloader only)

◆ SE_IMG_READ

#define SE_IMG_READ (0x92UL)

SFU reads a Flash protected area (bootloader only)

◆ SE_IMG_WRITE

#define SE_IMG_WRITE (0x93UL)

SFU write a Flash protected area (bootloader only)

◆ SE_IMG_ERASE

#define SE_IMG_ERASE (0x94UL)

SFU erase a Flash protected area (bootloader only)

◆ SE_LOCK_RESTRICT_SERVICES

#define SE_LOCK_RESTRICT_SERVICES (0x100UL)

SFU lock part of SE services (bootloader only)

◆ SE_MW_ADDON_MSB_MASK

#define SE_MW_ADDON_MSB_MASK (0x70000000U)

SE add-ons MSB bits reserved for add-on middle wares IDs

◆ SE_MW_ADDON_KMS_MSB

#define SE_MW_ADDON_KMS_MSB (0x10000000U)

KMS services ID range begin

Typedef Documentation

◆ SE_FunctionIDTypeDef

typedef uint32_t SE_FunctionIDTypeDef

Secure Engine CallGate Function ID structure definition


Secure Engine: SE Crypto

Modules
SE Crypto
Secure Engine » SE Core

Crypto services (used by the bootloader and common crypto functions) More...

Modules

SE Crypto for Bootloader
Crypto functions used by the bootloader. The implementation of these functions is crypto-dependent. These functions use the generic SE_FwRawHeaderTypeDef structure to fill crypto specific structures.
SE Common Crypto elements
Common Crypto items for the functions used by the bootloader and the application.
SE Crypto scheme configuration
Choose the cryptographic scheme you want the bootloader to use. These settings apply to the services used by the bootloader only, not to the services called by the User Application.

Detailed Description

Crypto services (used by the bootloader and common crypto functions)


Secure Engine: SE Crypto for Bootloader

Modules
SE Crypto for Bootloader
Secure Engine » SE Core » SE Crypto

Crypto functions used by the bootloader. The implementation of these functions is crypto-dependent. These functions use the generic SE_FwRawHeaderTypeDef structure to fill crypto specific structures. More...

Modules

Private Variables
Private Macros
Exported Functions
The implementation of these functions is crypto-dependent. These functions use the generic SE_FwRawHeaderTypeDef structure to fill crypto specific structures.

Detailed Description

Crypto functions used by the bootloader. The implementation of these functions is crypto-dependent. These functions use the generic SE_FwRawHeaderTypeDef structure to fill crypto specific structures.


Secure Engine: Private Variables

Private Variables
Secure Engine » SE Core » SE Crypto » SE Crypto for Bootloader


Secure Engine: Private Macros

Macros
Private Macros
Secure Engine » SE Core » SE Crypto » SE Crypto for Bootloader

Macros

#define | SE_CLEAN_UP_FW_KEY() do { /* implement if needed */; } while(0)
Clean up the RAM area storing the Firmware key. This applies only to the secret symmetric key loaded with SE_ReadKey().
#define | SE_CLEAN_UP_PUB_KEY() do { /* implement if needed */; } while(0)
Clean up the RAM area storing the ECC Public Key. This applies only to the public asymmetric key loaded with SE_ReadKey_Pub().

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » SE Core » SE Crypto » SE Crypto for Bootloader

The implementation of these functions is crypto-dependent. These functions use the generic SE_FwRawHeaderTypeDef structure to fill crypto specific structures. More...

Functions

SE_ErrorStatus | SE_CRYPTO_Encrypt_Init (SE_FwRawHeaderTypeDef *pxSE_Metadata)
SE_ErrorStatus | SE_CRYPTO_Header_Append (const uint8_t *pInputBuffer, int32_t InputSize)
SE_ErrorStatus | SE_CRYPTO_Encrypt_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
SE_ErrorStatus | SE_CRYPTO_Encrypt_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)
SE_ErrorStatus | SE_CRYPTO_Decrypt_Init (SE_FwRawHeaderTypeDef *pxSE_Metadata)
SE_ErrorStatus | SE_CRYPTO_Decrypt_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
SE_ErrorStatus | SE_CRYPTO_Decrypt_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)
SE_ErrorStatus | SE_CRYPTO_Authenticate_Metadata (SE_FwRawHeaderTypeDef *pxSE_Metadata)
SE_ErrorStatus | SE_CRYPTO_AuthenticateFW_Init (SE_FwRawHeaderTypeDef *pxSE_Metadata)
SE_ErrorStatus | SE_CRYPTO_AuthenticateFW_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
SE_ErrorStatus | SE_CRYPTO_AuthenticateFW_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)

Detailed Description

The implementation of these functions is crypto-dependent. These functions use the generic SE_FwRawHeaderTypeDef structure to fill crypto specific structures.


Secure Engine: SE Common Crypto elements

Modules
SE Common Crypto elements
Secure Engine » SE Core » SE Crypto

Common Crypto items for the functions used by the bootloader and the application. More...

Modules

Exported Variables
Exported Functions
Common crypto functions (helpers) to be used by the bootloader and the user application services if needed. This aims at factorizing the crypto code (core code with crypto-dependent APIs).
SE crypto common structures
Structures used to work with the crypto-specific functions.
Public Macros
Common macros used by all files dealing with some crypto parameters.
SE Crypto common functions

Detailed Description

Common Crypto items for the functions used by the bootloader and the application.


Secure Engine: Exported Variables

Modules
Exported Variables
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements

Modules

AES GCM Exported Variables
Private variables used for AES GCM symmetric crypto.

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: AES GCM Exported Variables

Variables
AES GCM Exported Variables
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements » Exported Variables

Private variables used for AES GCM symmetric crypto. More...

Variables

AESGCMctx_stt m_xSE_AESGCMCtx

Detailed Description

Private variables used for AES GCM symmetric crypto.

Variable Documentation

◆ m_xSE_AESGCMCtx

AESGCMctx_stt m_xSE_AESGCMCtx

Variable used to store the AES128 context


Secure Engine: Exported Functions

Modules
Exported Functions
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements Secure Engine » SE Core » SE Crypto » SE Common Crypto elements » | SE Crypto common functions

Common crypto functions (helpers) to be used by the bootloader and the user application services if needed. This aims at factorizing the crypto code (core code with crypto-dependent APIs). More...

Modules

AES GCM Exported Functions
Common crypto functions (helpers) for AES GCM symmetric crypto.

Detailed Description

Common crypto functions (helpers) to be used by the bootloader and the user application services if needed. This aims at factorizing the crypto code (core code with crypto-dependent APIs).


Secure Engine: AES GCM Exported Functions

Functions
AES GCM Exported Functions
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements Secure Engine » SE Core » SE Crypto » SE Common Crypto elements » | SE Crypto common functions » Exported Functions

Common crypto functions (helpers) for AES GCM symmetric crypto. More...

Functions

SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Init (const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit)
Secure Engine AES GCM Encrypt Init function. It is a wrapper of AES_GCM_Encrypt_Init function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Header_Append (const uint8_t *pInputBuffer, int32_t InputSize)
Secure Engine AES GCM Header Append function. It is a wrapper of AES_GCM_Header_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Encrypt Append function. It is a wrapper of AES_GCM_Encrypt_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Encrypt Finish function. It is a wrapper of AES_GCM_Encrypt_Finish function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Init (const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit)
Secure Engine AES GCM Decrypt Init function. It is a wrapper of AES_GCM_Decrypt_Init function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Decrypt Append function. It is a wrapper of AES_GCM_Decrypt_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Decrypt Finish function. It is a wrapper of AES_GCM_Decrypt_Finish function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...

Detailed Description

Common crypto functions (helpers) for AES GCM symmetric crypto.

Function Documentation

◆ SE_CRYPTO_AES_GCM_Encrypt_Init()

SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Init | ( | const uint8_t * | pKey,
 |  | SE_GCMInitTypeDef * | pxSE_GCMInit
 | ) |  |

Secure Engine AES GCM Encrypt Init function. It is a wrapper of AES_GCM_Encrypt_Init function included in the protected area. This parameter can be a value of Secure Engine Status definition.

Parameters
pKey | pointer to the key.
pxSE_GCMInit | Secure Engine AES GCM Init structure.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_CRYPTO_AES_GCM_Header_Append()

SE_ErrorStatus SE_CRYPTO_AES_GCM_Header_Append | ( | const uint8_t * | pInputBuffer,
 |  | int32_t | InputSize
 | ) |  |

Secure Engine AES GCM Header Append function. It is a wrapper of AES_GCM_Header_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition.

Parameters
pInputBuffer | pointer to Input Buffer.
InputSize | Input Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_CRYPTO_AES_GCM_Encrypt_Append()

SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Append | ( | const uint8_t * | pInputBuffer,
 |  | int32_t | InputSize,
 |  | uint8_t * | pOutputBuffer,
 |  | int32_t * | pOutputSize
 | ) |  |

Secure Engine AES GCM Encrypt Append function. It is a wrapper of AES_GCM_Encrypt_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition.

Parameters
pInputBuffer | pointer to Input Buffer.
InputSize | Input Size (bytes).
pOutputBuffer | pointer to Output Buffer.
pOutputSize | pointer to Output Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_CRYPTO_AES_GCM_Encrypt_Finish()

SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Finish | ( | uint8_t * | pOutputBuffer,
 |  | int32_t * | pOutputSize
 | ) |  |

Secure Engine AES GCM Encrypt Finish function. It is a wrapper of AES_GCM_Encrypt_Finish function included in the protected area. This parameter can be a value of Secure Engine Status definition.

Parameters
pOutputBuffer | pointer to Output Buffer.
pOutputSize | pointer to Output Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_CRYPTO_AES_GCM_Decrypt_Init()

SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Init | ( | const uint8_t * | pKey,
 |  | SE_GCMInitTypeDef * | pxSE_GCMInit
 | ) |  |

Secure Engine AES GCM Decrypt Init function. It is a wrapper of AES_GCM_Decrypt_Init function included in the protected area. This parameter can be a value of Secure Engine Status definition.

Parameters
pKey | pointer to the key.
pxSE_GCMInit | Secure Engine AES GCM Init structure.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_CRYPTO_AES_GCM_Decrypt_Append()

SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Append | ( | const uint8_t * | pInputBuffer,
 |  | int32_t | InputSize,
 |  | uint8_t * | pOutputBuffer,
 |  | int32_t * | pOutputSize
 | ) |  |

Secure Engine AES GCM Decrypt Append function. It is a wrapper of AES_GCM_Decrypt_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition.

Parameters
pInputBuffer | pointer to Input Buffer.
InputSize | Input Size (bytes).
pOutputBuffer | pointer to Output Buffer.
pOutputSize | pointer to Output Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

◆ SE_CRYPTO_AES_GCM_Decrypt_Finish()

SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Finish | ( | uint8_t * | pOutputBuffer,
 |  | int32_t * | pOutputSize
 | ) |  |

Secure Engine AES GCM Decrypt Finish function. It is a wrapper of AES_GCM_Decrypt_Finish function included in the protected area. This parameter can be a value of Secure Engine Status definition.

Parameters
pOutputBuffer | pointer to Output Buffer.
pOutputSize | pointer to Output Size (bytes).
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.


Secure Engine: SE crypto common structures

Modules
SE crypto common structures
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements

Structures used to work with the crypto-specific functions. More...

Modules

SE crypto AES GCM structures
Structures used to work with the AES GCM symmetric crypto functions.

Detailed Description

Structures used to work with the crypto-specific functions.


Secure Engine: SE crypto AES GCM structures

Data Structures
SE crypto AES GCM structures
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements » SE crypto common structures

Structures used to work with the AES GCM symmetric crypto functions. More...

Data Structures

struct SE_GCMInitTypeDef
Secure Engine AES GCM structure definition. More...

Detailed Description

Structures used to work with the AES GCM symmetric crypto functions.


Secure Engine: SE_GCMInitTypeDef Struct Reference

Data Fields
SE_GCMInitTypeDef Struct Reference
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements » SE crypto common structures » SE crypto AES GCM structures

Secure Engine AES GCM structure definition. More...

#include <se_crypto_common.h>

Data Fields

uint8_t * | pNonce
int32_t | NonceSize
uint8_t * | pTag
int32_t | TagSize
int32_t | HeaderSize
int32_t | PayloadSize

Detailed Description

Secure Engine AES GCM structure definition.

Field Documentation

◆ pNonce

uint8_t* SE_GCMInitTypeDef::pNonce

Pointer Nonce buffer.

◆ NonceSize

int32_t SE_GCMInitTypeDef::NonceSize

Size of the Nonce in bytes.

◆ pTag

uint8_t* SE_GCMInitTypeDef::pTag

Pointer to Authentication TAG. This value must be set in decryption, and this TAG will be verified

◆ TagSize

int32_t SE_GCMInitTypeDef::TagSize

Size of the Tag to return.

◆ HeaderSize

int32_t SE_GCMInitTypeDef::HeaderSize

Header Size.

◆ PayloadSize

int32_t SE_GCMInitTypeDef::PayloadSize

Payload Size.

The documentation for this struct was generated from the following file:
  • C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_crypto_common.h


Secure Engine: Public Macros

Modules
Public Macros
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements

Common macros used by all files dealing with some crypto parameters. More...

Modules

AES GCM Public Macros
Common macros used by all files dealing with some AES GCM crypto parameters.

Detailed Description

Common macros used by all files dealing with some crypto parameters.


Secure Engine: AES GCM Public Macros

Macros
AES GCM Public Macros
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements » Public Macros

Common macros used by all files dealing with some AES GCM crypto parameters. More...

Macros

#define | IS_SE_CRYPTO_AES_GCM_NONCE_SIZE(SIZE) ((SIZE) == SE_NONCE_LEN)
#define | IS_SE_CRYPTO_AES_GCM_TAG_SIZE(SIZE) ((SIZE) == SE_TAG_LEN)

Detailed Description

Common macros used by all files dealing with some AES GCM crypto parameters.

Macro Definition Documentation

◆ IS_SE_CRYPTO_AES_GCM_NONCE_SIZE

#define IS_SE_CRYPTO_AES_GCM_NONCE_SIZE ( SIZE ) ((SIZE) == SE_NONCE_LEN)

Verify the size of the AES nonce

◆ IS_SE_CRYPTO_AES_GCM_TAG_SIZE

#define IS_SE_CRYPTO_AES_GCM_TAG_SIZE ( SIZE ) ((SIZE) == SE_TAG_LEN)

Verify the size of the AES tag


Secure Engine: SE Crypto common functions

Modules
SE Crypto common functions
Secure Engine » SE Core » SE Crypto » SE Common Crypto elements

Modules

Exported Functions
Common crypto functions (helpers) to be used by the bootloader and the user application services if needed. This aims at factorizing the crypto code (core code with crypto-dependent APIs).

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: SE Crypto scheme configuration

Macros
SE Crypto scheme configuration
Secure Engine » SE Core » SE Crypto

Choose the cryptographic scheme you want the bootloader to use. These settings apply to the services used by the bootloader only, not to the services called by the User Application. More...

Macros

#define | SECBOOT_ECCDSA_WITHOUT_ENCRYPT_SHA256 (1U)
#define | SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256 (2U)
#define | SECBOOT_AES128_GCM_AES128_GCM_AES128_GCM (3U)
#define | SECBOOT_CRYPTO_SCHEME

Detailed Description

Choose the cryptographic scheme you want the bootloader to use. These settings apply to the services used by the bootloader only, not to the services called by the User Application.

Macro Definition Documentation

◆ SECBOOT_ECCDSA_WITHOUT_ENCRYPT_SHA256

#define SECBOOT_ECCDSA_WITHOUT_ENCRYPT_SHA256 (1U)

SE_CoreBin instantiates the crypto scheme selected thanks to "SECBOOT_CRYPTO_SCHEME". "SECBOOT_CRYPTO_SCHEME" is composed as indicated below: SECBOOT_authenticationalgo_encryptionalgo_MACalgo

Set "SECBOOT_CRYPTO_SCHEME" to one of the values listed below:

SECBOOT_ECCDSA_WITHOUT_ENCRYPT_SHA256: no FW encryption, only Authentication and Integrity are ensured. Authenticate Firmware Metadata using SHA256 signed with ECC DSA. No Firmware encryption. Authenticate Firmware Image using SHA256 on clear Firmware (SHA256 stored in the authenticated metadata).

SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256: Authentication, Integrity, Confidentiality are ensured. Authenticate Firmware Metadata using SHA256 signed with ECC DSA. Decrypt Firmware Image with AES128-CBC. Authenticate Firmware Image using SHA256 on clear Firmware (SHA256 stored in the authenticated metadata).

SECBOOT_AES128_GCM_AES128_GCM_AES128_GCM: Authentication, Integrity, Confidentiality are ensured. Authenticate Firmware Metadata using AES128-GCM tag. Decrypt Firmware image using AES128-GCM algo. Authenticate Firmware image using AES128-GCM tag.asymmetric crypto, no FW encryption

◆ SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256

#define SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256 (2U)

asymmetric crypto with encrypted Firmware

◆ SECBOOT_AES128_GCM_AES128_GCM_AES128_GCM

#define SECBOOT_AES128_GCM_AES128_GCM_AES128_GCM (3U)

symmetric crypto


Secure Engine: SE Exception

Modules
SE Exception
Secure Engine » SE Core

Modules

Exported Functions

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » SE Core » SE Exception

Functions

void | SE_NMI_ExceptionHandler (void)
SE Non Maskeable Interrupt handler. More...
void | HardFault_Handler (void)
HardFault Handler. More...
void | MemManage_Handler (void)
MPU Fault Handler. More...
void | BusFault_Handler (void)
Bus Fault Handler. More...

Detailed Description

Function Documentation

◆ SE_NMI_ExceptionHandler()

void SE_NMI_ExceptionHandler ( void )

SE Non Maskeable Interrupt handler.

Parameters
None.
Return values
None.

◆ HardFault_Handler()

void HardFault_Handler ( void )

HardFault Handler.

Parameters
None.
Return values
None.

References SE_NMI_ExceptionHandler().

◆ MemManage_Handler()

void MemManage_Handler ( void )

MPU Fault Handler.

Parameters
None.
Return values
None.

References SE_NMI_ExceptionHandler().

◆ BusFault_Handler()

void BusFault_Handler ( void )

Bus Fault Handler.

Parameters
None.
Return values
None.

References SE_NMI_ExceptionHandler().


Secure Engine: SE Firmware Image

Modules
SE Firmware Image
Secure Engine » SE Core

Code used to handle the Firmware Images. This contains functions used by the bootloader. More...

Modules

Exported Functions

Detailed Description

Code used to handle the Firmware Images. This contains functions used by the bootloader.


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » SE Core » SE Firmware Image

Functions

SE_ErrorStatus | SE_IMG_Write (void *pDestination, const void *pSource, uint32_t Length)
Write in Flash protected area. More...
SE_ErrorStatus | SE_IMG_Read (void *pDestination, const void *pSource, uint32_t Length)
Read from Flash protected area. More...
SE_ErrorStatus | SE_IMG_Erase (void *pDestination, uint32_t Length)
Erase a Flash protected area. More...

Detailed Description

Function Documentation

◆ SE_IMG_Write()

SE_ErrorStatus SE_IMG_Write | ( | void * | pDestination,
 |  | const void * | pSource,
 |  | uint32_t | Length
 | ) |  |

Write in Flash protected area.

Parameters
pDestination | pointer to destination area in Flash
pSource | pointer to input buffer
Length | number of bytes to be written
Return values
SE_SUCCESS if successful, otherwise SE_ERROR

References SE_LL_FLASH_Write().

◆ SE_IMG_Read()

SE_ErrorStatus SE_IMG_Read | ( | void * | pDestination,
 |  | const void * | pSource,
 |  | uint32_t | Length
 | ) |  |

Read from Flash protected area.

Parameters
pDestination | pointer to output buffer
pSource | pointer to source area in Flash
Length | number of bytes to be read
Return values
SE_SUCCESS if successful, otherwise SE_ERROR

References SE_LL_FLASH_Read().

◆ SE_IMG_Erase()

SE_ErrorStatus SE_IMG_Erase | ( | void * | pDestination,
 |  | uint32_t | Length
 | ) |  |

Erase a Flash protected area.

Parameters
pDestination | pointer to destination area in Flash
Length | number of bytes to be erased
Return values
SE_SUCCESS if successful, otherwise SE_ERROR

References SE_LL_FLASH_Erase().


Secure Engine: SE Startup

Modules | Functions
SE Startup
Secure Engine » SE Core

Init of the SE handled by the bootloader (via se_interface_bootloader) before the isolation mechanism is enabled. More...

Modules

Exported Functions

Functions

void __iar_data_init3 (void)

Detailed Description

Init of the SE handled by the bootloader (via se_interface_bootloader) before the isolation mechanism is enabled.

Function Documentation

◆ __iar_data_init3()

void __iar_data_init3 ( void )

Compiler-specific data initialization function


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » SE Core » SE Startup

Functions

__root SE_ErrorStatus SE_CORE_Startup (void)
Secure Engine Core Startup function. It is the initialization function for Secure Engine Core binary. Initialize all variables defined in the binary. More...

Detailed Description

Function Documentation

◆ SE_CORE_Startup()

SE_ErrorStatus SE_CORE_Startup ( void )

Secure Engine Core Startup function. It is the initialization function for Secure Engine Core binary. Initialize all variables defined in the binary.

Note
It has to be called before the isolation mechanism is activated!!
Parameters
None.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References __iar_data_init3().


Secure Engine: SE Code for Application

Modules
SE Code for Application
Secure Engine » SE Core

This file is a placeholder for the code dedicated to the user application. It contains the code written by the end user. The code used by the application to handle the Firmware images is located in se_fwimg.c. More...

Modules

Exported Functions
Structure(s) for user defined SE code

Detailed Description

This file is a placeholder for the code dedicated to the user application. It contains the code written by the end user. The code used by the application to handle the Firmware images is located in se_fwimg.c.


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » SE Core » SE Code for Application

Functions

SE_ErrorStatus SE_APPLI_GetActiveFwInfo (SE_APP_ActiveFwInfo_t *p_FwInfo)
Service called by the User Application to retrieve the Active Firmware Info. More...

Detailed Description

Function Documentation

◆ SE_APPLI_GetActiveFwInfo()

SE_ErrorStatus SE_APPLI_GetActiveFwInfo ( SE_APP_ActiveFwInfo_t * p_FwInfo )

Service called by the User Application to retrieve the Active Firmware Info.

Parameters
p_FwInfo Active Firmware Info structure that will be filled.
Return values
SE_ErrorStatus SE_SUCCESS if successful, SE_ERROR otherwise.

References SE_FW_HEADER_METADATA_LEN.


Secure Engine: Structure(s) for user defined SE code

Data Structures
Structure(s) for user defined SE code
Secure Engine » SE Core » SE Code for Application

Data Structures

struct SE_APP_ActiveFwInfo_t
Firmware Information structure definition. This structure is used to retrieve some information about the active Firmware. More...

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: SE_APP_ActiveFwInfo_t Struct Reference

Data Fields
SE_APP_ActiveFwInfo_t Struct Reference
Secure Engine » SE Core » SE Code for Application » Structure(s) for user defined SE code

Firmware Information structure definition. This structure is used to retrieve some information about the active Firmware. More...

#include <se_user_application.h>

Data Fields

uint16_t | ActiveFwVersion
uint32_t | ActiveFwSize

Detailed Description

Firmware Information structure definition. This structure is used to retrieve some information about the active Firmware.

Field Documentation

◆ ActiveFwVersion

uint16_t SE_APP_ActiveFwInfo_t::ActiveFwVersion

Firmware version (see SFU_FW_VERSION_START_NUM for the min. valid value)

◆ ActiveFwSize

uint32_t SE_APP_ActiveFwInfo_t::ActiveFwSize

Firmware size (bytes)

The documentation for this struct was generated from the following file:
  • C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_user_application.h


Secure Engine: SE Utils

Modules
SE Utils
Secure Engine » SE Core

Modules

Private Variables
Exported Functions

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Private Variables

Variables
Private Variables
Secure Engine » SE Core » SE Utils

Variables

static uint32_t m_uSE_SystemCoreClock

Detailed Description

Variable Documentation

◆ m_uSE_SystemCoreClock

uint32_t m_uSE_SystemCoreClock
static

System clock used for tick calculation


Secure Engine: Exported Functions

Functions
Exported Functions
Secure Engine » SE Core » SE Utils

Functions

void | SE_SetSystemCoreClock (uint32_t uSystemCoreClock)
Set Secure Engine SystemCoreClock variable. More...
uint32_t | HAL_GetTick (void)
Provide a tick value in millisecond. More...
void | HAL_Delay (uint32_t Delay)
This function provides minimum delay (in milliseconds) based on variable incremented. More...

Detailed Description

Function Documentation

◆ SE_SetSystemCoreClock()

void SE_SetSystemCoreClock ( uint32_t uSystemCoreClock )

Set Secure Engine SystemCoreClock variable.

Parameters
uSystemCoreClock Secure Engine SystemCoreClock variable.
Return values
None.

References m_uSE_SystemCoreClock.

◆ HAL_GetTick()

uint32_t HAL_GetTick ( void )

Provide a tick value in millisecond.

Note
This function overwrites the one declared as __weak in HAL. In this implementation, time is counted without using SysTick timer interrupts.
Return values
tick value

References m_uSE_SystemCoreClock.

◆ HAL_Delay()

void HAL_Delay ( uint32_t Delay )

This function provides minimum delay (in milliseconds) based on variable incremented.

Parameters
Delay specifies the delay time length, in milliseconds.
Return values
None

References HAL_GetTick().


Secure Engine: SE Definitions

Modules
SE Definitions
Secure Engine » SE Core

Modules

SE Metadata Definitions
definitions related to FW metadata (FW header) which are crypto dependent.
SE Core Definitions
core definitions (constants, error codes, image handling) which are NOT crypto dependent

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: SE Metadata Definitions

Modules
SE Metadata Definitions
Secure Engine » SE Core » SE Definitions

definitions related to FW metadata (FW header) which are crypto dependent. More...

Modules

Exported Constants
Exported Types

Detailed Description

definitions related to FW metadata (FW header) which are crypto dependent.

Note
This file is a template file and must be adapted for each cryptographic scheme. The se_def_metadata.h file declared in the SE_CoreBin project must be included by the SB_SFU project.


Secure Engine: Exported Constants

Macros
Exported Constants
Secure Engine » SE Core » SE Definitions » SE Metadata Definitions

Macros

#define | SE_FW_HEADER_TOT_LEN ((int32_t) sizeof(SE_FwRawHeaderTypeDef))
Firmware Image Header (FW metadata) constants. More...
#define | SE_FW_HEADER_METADATA_LEN ((int32_t) sizeof(SE_FwRawHeaderTypeDef))

Detailed Description

Macro Definition Documentation

◆ SE_FW_HEADER_TOT_LEN

#define SE_FW_HEADER_TOT_LEN ((int32_t) sizeof(SE_FwRawHeaderTypeDef))

Firmware Image Header (FW metadata) constants.

FW INFO header Total Length

◆ SE_FW_HEADER_METADATA_LEN

#define SE_FW_HEADER_METADATA_LEN ((int32_t) sizeof(SE_FwRawHeaderTypeDef))

FW Metadata INFO header Length


Secure Engine: Exported Types

Data Structures
Exported Types
Secure Engine » SE Core » SE Definitions » SE Metadata Definitions

Data Structures

struct SE_FwRawHeaderTypeDef
Secure Engine crypto structure definition There must be a Firmware Header structure definition This structure MUST be called SE_FwRawHeaderTypeDef This structure MUST contain a field named 'FwVersion' This structure MUST contain a field named 'FwSize'. More...

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: SE_FwRawHeaderTypeDef Struct Reference

Data Fields
SE_FwRawHeaderTypeDef Struct Reference
Secure Engine » SE Core » SE Definitions » SE Metadata Definitions » Exported Types

Secure Engine crypto structure definition There must be a Firmware Header structure definition This structure MUST be called SE_FwRawHeaderTypeDef This structure MUST contain a field named 'FwVersion' This structure MUST contain a field named 'FwSize'. More...

#include <se_def_metadata_template.h>

Data Fields

uint16_t | FwVersion
uint32_t | FwSize

Detailed Description

Secure Engine crypto structure definition There must be a Firmware Header structure definition This structure MUST be called SE_FwRawHeaderTypeDef This structure MUST contain a field named 'FwVersion' This structure MUST contain a field named 'FwSize'.

Firmware Header structure definition

Note
This structure MUST be called SE_FwRawHeaderTypeDef
This structure MUST contain a field named 'FwVersion'
This structure MUST contain a field named 'FwSize'

Field Documentation

◆ FwVersion

uint16_t SE_FwRawHeaderTypeDef::FwVersion

Firmware version

◆ FwSize

uint32_t SE_FwRawHeaderTypeDef::FwSize

Firmware size (bytes)

The documentation for this struct was generated from the following file:
  • C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_def_metadata_template.h


Secure Engine: SE Core Definitions

Modules
SE Core Definitions
Secure Engine » SE Core » SE Definitions

core definitions (constants, error codes, image handling) which are NOT crypto dependent More...

Modules

Exported Constants

Detailed Description

core definitions (constants, error codes, image handling) which are NOT crypto dependent


Secure Engine: Exported Constants

Modules | Enumerations
Exported Constants
Secure Engine » SE Core » SE Definitions » SE Core Definitions

Modules

Secure Engine Status definition

Enumerations

enum SE_ErrorStatus { SE_ERROR = 0x00018799U, SE_SUCCESS = 0x0012310FU }
Secure Engine Error definition.

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: Secure Engine Status definition

Macros | Typedefs
Secure Engine Status definition
Secure Engine » SE Core » SE Definitions » SE Core Definitions » Exported Constants

Macros

#define | SE_OK (0x0012e223UL)
#define | SE_KO (0x0013023dUL)
#define | SE_INIT_ERR (0x00130ce5UL)
#define | SE_BOOT_INFO_ERR (0x00135705UL)
#define | SE_BOOT_INFO_ERR_FACTORY_RESET (0x0013b424UL)
#define | SE_SIGNATURE_ERR (0x00146ac1UL)
#define | SE_ERR_FLASH_READ (0x0014b817UL)

Typedefs

typedef uint32_t SE_StatusTypeDef

Detailed Description

Macro Definition Documentation

◆ SE_OK

#define SE_OK (0x0012e223UL)

Secure Engine OK

◆ SE_KO

#define SE_KO (0x0013023dUL)

Secure Engine KO

◆ SE_INIT_ERR

#define SE_INIT_ERR (0x00130ce5UL)

Secure Engine initialization error

◆ SE_BOOT_INFO_ERR

#define SE_BOOT_INFO_ERR (0x00135705UL)

An error occurred when accessing BootInfo area

◆ SE_BOOT_INFO_ERR_FACTORY_RESET

#define SE_BOOT_INFO_ERR_FACTORY_RESET (0x0013b424UL)

A factory reset has been executed to recover the BootInfo Initialization failure

◆ SE_SIGNATURE_ERR

#define SE_SIGNATURE_ERR (0x00146ac1UL)

An error occurred when checking FW signature (Tag)

◆ SE_ERR_FLASH_READ

#define SE_ERR_FLASH_READ (0x0014b817UL)

An error occurred trying to read the Flash

Typedef Documentation

◆ SE_StatusTypeDef

typedef uint32_t SE_StatusTypeDef

Secure Engine status definition


Secure Engine: SE Key

Modules
SE Key
Secure Engine

Modules

SE_KEY_Exported_Functions
Functions SE_CoreBin can use to retrieve the keys. These functions are implemented in se_key.s.

Detailed Description

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: SE_KEY_Exported_Functions

Functions
SE_KEY_Exported_Functions
Secure Engine » SE Key

Functions SE_CoreBin can use to retrieve the keys. These functions are implemented in se_key.s. More...

Functions

void | SE_ReadKey (uint8_t *pKey)
Function to retrieve the symmetric key. More...
void | SE_ReadKey_Pub (uint8_t *pPubKey)
Function to retrieve the public asymmetric key. More...
void | SE_ReadKey_Pairing (uint8_t *pPairingKey)
Function to retrieve the external token pairing keys. More...

Detailed Description

Functions SE_CoreBin can use to retrieve the keys. These functions are implemented in se_key.s.

Note
Depending on the crypto scheme, SE_ReadKey or SE_ReadKey_Pub can be useless. Nevertheless, we do not use compiler switches as the linker will remove the unused function(s).

Function Documentation

◆ SE_ReadKey()

void SE_ReadKey ( uint8_t * pKey )

Function to retrieve the symmetric key.

Parameters
pKey pointer to an array of uint8_t with the appropriate size
Return values
void

◆ SE_ReadKey_Pub()

void SE_ReadKey_Pub ( uint8_t * pPubKey )

Function to retrieve the public asymmetric key.

Parameters
pPubKey pointer to an array of uint8_t with the appropriate size
Return values
void

◆ SE_ReadKey_Pairing()

void SE_ReadKey_Pairing ( uint8_t * pPairingKey )

Function to retrieve the external token pairing keys.

Parameters
pPairingKey pointer to an array of uint8_t with the appropriate size (32 bytes)
Return values
void


Secure Engine: Data Structures

Data Structures
Here are the data structures with brief descriptions:
[detail level 12]
▼N keys |
C AES_CBC |
C AES_GCM |
C ECDSA256P1 |
C PAIRING |
C SE_APP_ActiveFwInfo_t | Firmware Information structure definition. This structure is used to retrieve some information about the active Firmware
C SE_BootInfoTypeDef | Specifies the BootInfo data structure
C SE_FwRawHeaderTypeDef | Secure Engine crypto structure definition There must be a Firmware Header structure definition This structure MUST be called SE_FwRawHeaderTypeDef This structure MUST contain a field named 'FwVersion' This structure MUST contain a field named 'FwSize'
C SE_GCMInitTypeDef | Secure Engine AES GCM structure definition


Secure Engine: keys.AES_CBC Class Reference

  • keys
  • AES_CBC
Public Member Functions | Static Public Member Functions | Data Fields
keys.AES_CBC Class Reference

Public Member Functions

def | __init__ (self, key)
def | export_private (self, path)
def | encrypt (self, payload, nonce=[])
def | trans (self, section, name, end, assembly, version)
def | has_nonce (self)
def | has_sign (self)
def | has_encrypt (self)
def | get_key (self, type)

Static Public Member Functions

def generate ()

Data Fields

key
nonce

Constructor & Destructor Documentation

◆ __init__()

def keys.AES_CBC.__init__ | ( | self,
 |  | key
 | ) |
Construct an AES_CBC private key with the given key data

References keys.AES_CBC.key, and keys.AES_CBC.nonce.

The documentation for this class was generated from the following file:
  • C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/keys.py


Secure Engine: keys.AES_GCM Class Reference

  • keys
  • AES_GCM
Public Member Functions | Static Public Member Functions | Data Fields
keys.AES_GCM Class Reference

Public Member Functions

def | __init__ (self, key)
def | export_private (self, path)
def | encrypt (self, payload, nonce=[])
def | sign (self, payload, nonce)
def | trans (self, section, name, end, assembly, version)
def | has_nonce (self)
def | has_sign (self)
def | has_encrypt (self)
def | get_key (self, type)

Static Public Member Functions

def generate ()

Data Fields

key
nonce

Constructor & Destructor Documentation

◆ __init__()

def keys.AES_GCM.__init__ | ( | self,
 |  | key
 | ) |
Construct an AES_GCM private key with the given key data

References keys.AES_CBC.key, keys.AES_GCM.key, keys.AES_CBC.nonce, and keys.AES_GCM.nonce.

The documentation for this class was generated from the following file:
  • C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/keys.py


Secure Engine: keys.ECDSA256P1 Class Reference

  • keys
  • ECDSA256P1
Public Member Functions | Static Public Member Functions | Data Fields
keys.ECDSA256P1 Class Reference

Public Member Functions

def | __init__ (self, key)
def | export_private (self, path)
def | trans (self, section, name, end, assembly, version)
def | sign (self, payload)
def | has_nonce (self)
def | has_sign (self)
def | has_encrypt (self)
def | get_key (self, type)

Static Public Member Functions

def generate ()

Data Fields

key

Constructor & Destructor Documentation

◆ __init__()

def keys.ECDSA256P1.__init__ | ( | self,
 |  | key
 | ) |
Construct an ECDSA P-256 private key

References keys.AES_CBC.key, keys.AES_GCM.key, and keys.ECDSA256P1.key.

The documentation for this class was generated from the following file:
  • C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/keys.py


Secure Engine: keys.PAIRING Class Reference

  • keys
  • PAIRING
Public Member Functions | Static Public Member Functions | Data Fields
keys.PAIRING Class Reference

Public Member Functions

def | __init__ (self, key)
def | export_private (self, path)
def | encrypt (self, payload, nonce=[])
def | sign (self, payload, nonce)
def | trans (self, section, name, end, assembly, version)
def | has_nonce (self)
def | has_sign (self)
def | has_encrypt (self)
def | get_key (self, type)

Static Public Member Functions

def generate ()

Data Fields

key
nonce

Constructor & Destructor Documentation

◆ __init__()

def keys.PAIRING.__init__ | ( | self,
 |  | key
 | ) |
Construct an PAIRING private key with the given key data

References keys.AES_CBC.key, keys.AES_GCM.key, keys.ECDSA256P1.key, keys.PAIRING.key, keys.AES_CBC.nonce, keys.AES_GCM.nonce, and keys.PAIRING.nonce.

The documentation for this class was generated from the following file:
  • C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/keys.py


Secure Engine: Data Fields

Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:
  • __init__() : keys.AES_CBC , keys.AES_GCM , keys.ECDSA256P1 , keys.PAIRING
  • ActiveFwSize : SE_APP_ActiveFwInfo_t
  • ActiveFwVersion : SE_APP_ActiveFwInfo_t
  • ConsecutiveBootOnErrorCounter : SE_BootInfoTypeDef
  • CRC32 : SE_BootInfoTypeDef
  • FwSize : SE_FwRawHeaderTypeDef
  • FwVersion : SE_FwRawHeaderTypeDef
  • HeaderSize : SE_GCMInitTypeDef
  • LastExecError : SE_BootInfoTypeDef
  • LastExecStatus : SE_BootInfoTypeDef
  • NonceSize : SE_GCMInitTypeDef
  • PayloadSize : SE_GCMInitTypeDef
  • pNonce : SE_GCMInitTypeDef
  • pTag : SE_GCMInitTypeDef
  • TagSize : SE_GCMInitTypeDef


Secure Engine: Data Fields - Functions

  • __init__() : keys.AES_CBC , keys.AES_GCM , keys.ECDSA256P1 , keys.PAIRING


Secure Engine: Data Fields - Variables

  • ActiveFwSize : SE_APP_ActiveFwInfo_t
  • ActiveFwVersion : SE_APP_ActiveFwInfo_t
  • ConsecutiveBootOnErrorCounter : SE_BootInfoTypeDef
  • CRC32 : SE_BootInfoTypeDef
  • FwSize : SE_FwRawHeaderTypeDef
  • FwVersion : SE_FwRawHeaderTypeDef
  • HeaderSize : SE_GCMInitTypeDef
  • LastExecError : SE_BootInfoTypeDef
  • LastExecStatus : SE_BootInfoTypeDef
  • NonceSize : SE_GCMInitTypeDef
  • PayloadSize : SE_GCMInitTypeDef
  • pNonce : SE_GCMInitTypeDef
  • pTag : SE_GCMInitTypeDef
  • TagSize : SE_GCMInitTypeDef


Secure Engine: File List

File List
Here is a list of all documented files with brief descriptions:
[detail level 12345678910]
▼ Firmware |
▼ Middlewares |
▼ ST |
▼ STM32_Secure_Engine |
▼ Core |
se_bootinfo.c | Secure Engine BOOTINFO module. This file provides set of firmware functions to manage SE BootInfo functionalities
se_bootinfo.h | This file contains definitions for SE BootInfo functionalities
se_callgate.c | Secure Engine CALLGATE module. This file provides set of firmware functions to manage SE Callgate functionalities
se_callgate.h | This file contains definitions for Secure Engine CALLGATE module functionalities
se_crypto_bootloader_template.h |
se_crypto_common.c | Secure Engine CRYPTO module. This file provides set of firmware functions to manage SE Crypto functionalities. These functions are some common code for the functions used by the bootloader and the application
se_crypto_common.h |
se_crypto_config_template.h |
se_def.h | This file references the definitions for SE functionalities
se_def_core.h | This file contains core definitions for SE functionalities
se_def_metadata_template.h |
se_exception.c | Secure Engine exception module. This file provides set of firmware functions to manage SE non maskeable interruption
se_exception.h |
se_fwimg.c | This file provides a set of firmware functions used by the bootloader to manage Secure Firmware Update functionalities
se_fwimg.h | This file provides set of firmware functions to manage Secure Firmware Update functionalities
se_interface_application.c | Secure Engine Interface module. This file provides set of firmware functions to manage SE Interface functionalities. These services are used by the application
se_interface_application.h | This file contains definitions for Secure Engine Interface module functionalities. These services are used by the application
se_interface_bootloader.c | Secure Engine Interface module. This file provides set of firmware functions to manage SE Interface functionalities. These services are used by the bootloader
se_interface_bootloader.h | This file contains definitions for Secure Engine Reserved Interface module functionalities. These services are used by the bootloader
se_interface_common.c | Secure Engine Interface module. This file provides set of common firmware functions to manage SE Interface functionalities. These services are used by the se_interface_bootloader.c and se_interface_application.c files
se_interface_common.h | This file contains common definitions for Secure Engine Interface module functionalities
se_intrinsics.h |
se_startup.c | Secure Engine STARTUP module. This file provides set of firmware functions to manage SE Startup functionalities
se_startup.h | This file contains definitions for Secure Engine STARTUP module functionalities
se_user_application.c | Secure Engine USER APPLICATION module. This file is a placeholder for the code dedicated to the user application. These services are used by the application
se_user_application.h |
se_utils.c | Secure Engine UTILS module. This file provides set of firmware functions to manage SE Utils functionalities
se_utils.h | This file contains definitions for Secure Engine UTILS module functionalities
▼ Interface |
se_low_level_template.h |
▼ Key |
se_key.h | This file contains definitions for Secure Engine KEY module functionalities
▼ Utilities |
▼ KeysAndImages |
▼ win |
▼ prepareimage |
▼ Include |
pyconfig.h |


Secure Engine: C:/git/sbsfu_master/Firmware Directory Reference

  • Firmware
Firmware Directory Reference


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares Directory Reference

  • Firmware
  • Middlewares
Middlewares Directory Reference


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST Directory Reference

  • Firmware
  • Middlewares
  • ST
ST Directory Reference


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
STM32_Secure_Engine Directory Reference

Directories

directory Utilities


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Core Directory Reference

Files

file | se_bootinfo.c
Secure Engine BOOTINFO module. This file provides set of firmware functions to manage SE BootInfo functionalities.
file | se_bootinfo.h [code]
This file contains definitions for SE BootInfo functionalities.
file | se_callgate.c
Secure Engine CALLGATE module. This file provides set of firmware functions to manage SE Callgate functionalities.
file | se_callgate.h [code]
This file contains definitions for Secure Engine CALLGATE module functionalities.
file | se_crypto_common.c
Secure Engine CRYPTO module. This file provides set of firmware functions to manage SE Crypto functionalities. These functions are some common code for the functions used by the bootloader and the application.
file | se_crypto_common.h [code]
file | se_def.h [code]
This file references the definitions for SE functionalities.
file | se_def_core.h [code]
This file contains core definitions for SE functionalities.
file | se_exception.c
Secure Engine exception module. This file provides set of firmware functions to manage SE non maskeable interruption.
file | se_fwimg.c
This file provides a set of firmware functions used by the bootloader to manage Secure Firmware Update functionalities.
file | se_fwimg.h [code]
This file provides set of firmware functions to manage Secure Firmware Update functionalities.
file | se_interface_application.c
Secure Engine Interface module. This file provides set of firmware functions to manage SE Interface functionalities. These services are used by the application.
file | se_interface_application.h [code]
This file contains definitions for Secure Engine Interface module functionalities. These services are used by the application.
file | se_interface_bootloader.c
Secure Engine Interface module. This file provides set of firmware functions to manage SE Interface functionalities. These services are used by the bootloader.
file | se_interface_bootloader.h [code]
This file contains definitions for Secure Engine Reserved Interface module functionalities. These services are used by the bootloader.
file | se_interface_common.c
Secure Engine Interface module. This file provides set of common firmware functions to manage SE Interface functionalities. These services are used by the se_interface_bootloader.c and se_interface_application.c files.
file | se_interface_common.h [code]
This file contains common definitions for Secure Engine Interface module functionalities.
file | se_startup.c
Secure Engine STARTUP module. This file provides set of firmware functions to manage SE Startup functionalities.
file | se_startup.h [code]
This file contains definitions for Secure Engine STARTUP module functionalities.
file | se_user_application.c
Secure Engine USER APPLICATION module. This file is a placeholder for the code dedicated to the user application. These services are used by the application.
file | se_user_application.h [code]
file | se_utils.c
Secure Engine UTILS module. This file provides set of firmware functions to manage SE Utils functionalities.
file | se_utils.h [code]
This file contains definitions for Secure Engine UTILS module functionalities.


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_bootinfo.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Macros | Functions | Variables
se_bootinfo.c File Reference

Secure Engine BOOTINFO module. This file provides set of firmware functions to manage SE BootInfo functionalities. More...

#include "se_bootinfo.h"
#include "se_utils.h"
#include "se_low_level.h"
#include "string.h"

Macros

#define | SE_INFO_NONE 0x0U
#define | IS_SE_INFO_STATUS(STATUS)
Check validity of STATUS parameter. More...

Functions

static SE_ErrorStatus | SE_LL_CRC_Check (SE_BootInfoTypeDef *x)
Check the CRC of the BootInfo given as a parameter. More...
SE_ErrorStatus | SE_INFO_BootInfoAreaInit (SE_INFO_StatusTypedef *peBootInfoStatus)
Initialize the global variable used by this module and the BootInfoArea Hardware (CRC, etc.). More...
SE_ErrorStatus | SE_INFO_BootInfoAreaDeInit (void)
DeInitialize the BootInfoArea structure cleaning the SRAM, and the xBootInfo area access and the related Hw. More...
SE_ErrorStatus | SE_INFO_BootInfoAreaFactoryReset (void)
Reset the BootInfo shared Area to factory value. More...
SE_ErrorStatus | SE_INFO_ReadBootInfoArea (SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus)
Read the xBootInfo area and return the BootInfoArea and the related status. More...
SE_ErrorStatus | SE_INFO_WriteBootInfoArea (SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus)
Write the passed BootInfo pointer into the xBootInfo area and return related status. More...

Variables

static SE_INFO_StatusTypedef | eBootInfoStatus
static SE_BootInfoTypeDef | xBootInfo
static SE_BootInfoTypeDef | xBootInfoBackUp

Detailed Description

Secure Engine BOOTINFO module. This file provides set of firmware functions to manage SE BootInfo functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_bootinfo.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Data Structures | Enumerations | Functions
se_bootinfo.h File Reference

This file contains definitions for SE BootInfo functionalities. More...

#include "se_def.h"

Go to the source code of this file.

Data Structures

struct SE_BootInfoTypeDef
Specifies the BootInfo data structure. More...

Enumerations

enum SE_INFO_StatusTypedef {
SE_INFO_NOT_ACCESSED = 0U, SE_INFO_VALID, SE_INFO_RECOVERED, SE_INFO_NOT_FOUND,
SE_INFO_NOT_VALID
}
Specific the BootInfoArea status. More...

Functions

SE_ErrorStatus | SE_INFO_BootInfoAreaInit (SE_INFO_StatusTypedef *peBootInfoStatus)
Initialize the global variable used by this module and the BootInfoArea Hardware (CRC, etc.). More...
SE_ErrorStatus | SE_INFO_BootInfoAreaDeInit (void)
DeInitialize the BootInfoArea structure cleaning the SRAM, and the xBootInfo area access and the related Hw. More...
SE_ErrorStatus | SE_INFO_BootInfoAreaFactoryReset (void)
Reset the BootInfo shared Area to factory value. More...
SE_ErrorStatus | SE_INFO_ReadBootInfoArea (SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus)
Read the xBootInfo area and return the BootInfoArea and the related status. More...
SE_ErrorStatus | SE_INFO_WriteBootInfoArea (SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus)
Write the passed BootInfo pointer into the xBootInfo area and return related status. More...

Detailed Description

This file contains definitions for SE BootInfo functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_callgate.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Macros | Enumerations | Functions
se_callgate.c File Reference

Secure Engine CALLGATE module. This file provides set of firmware functions to manage SE Callgate functionalities. More...

#include <stdarg.h>
#include "se_crypto_bootloader.h"
#include "se_crypto_common.h"
#include "se_user_application.h"
#include "se_callgate.h"
#include "se_key.h"
#include "se_bootinfo.h"
#include "se_utils.h"
#include "se_fwimg.h"
#include "se_low_level.h"
#include "se_startup.h"
#include "string.h"
#include "se_intrinsics.h"
#include "mapping_export.h"

Macros

#define | __IS_CALLER_SE_IF()
Check if the caller is located in SE Interface region. More...
#define | __IS_SE_LOCKED_SERVICES()
If lock restriction service enabled, execution is forbidden. More...

Enumerations

enum SE_LockStatus { SE_UNLOCKED = 0x55555555U, SE_LOCKED = 0x7AAAAAAAU }
Secure Engine Lock Status enum definition.

Functions

SE_ErrorStatus | SE_CallGateService (SE_FunctionIDTypeDef eID, SE_StatusTypeDef *peSE_Status, va_list arguments)
Dispatch function used by the Secure Engine CallGate function. Calls other functions included in the protected area based on the eID parameter. More...
SE_ErrorStatus | SE_SP_SMUGGLE (SE_FunctionIDTypeDef eID, SE_StatusTypeDef *peSE_Status, va_list arguments)
Switch stack pointer from SB RAM region to SE RAM region then call SE_CallGateService.
SE_ErrorStatus | SE_CallGate (SE_FunctionIDTypeDef eID, SE_StatusTypeDef *peSE_Status,...)
Secure Engine CallGate function. It is the only access/exit point to code inside protected area. In order to call others functions included in the protected area, the specific ID has to be specified. More...

Detailed Description

Secure Engine CALLGATE module. This file provides set of firmware functions to manage SE Callgate functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_callgate.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Macros | Typedefs | Functions
se_callgate.h File Reference

This file contains definitions for Secure Engine CALLGATE module functionalities. More...

#include "se_def.h"

Go to the source code of this file.

Macros

#define | SE_INIT_ID (0x00UL)
#define | SE_CRYPTO_LL_DECRYPT_INIT_ID (0x04UL)
#define | SE_CRYPTO_LL_DECRYPT_APPEND_ID (0x05UL)
#define | SE_CRYPTO_LL_DECRYPT_FINISH_ID (0x06UL)
#define | SE_CRYPTO_LL_AUTHENTICATE_FW_INIT_ID (0x07UL)
#define | SE_CRYPTO_LL_AUTHENTICATE_FW_APPEND_ID (0x08UL)
#define | SE_CRYPTO_LL_AUTHENTICATE_FW_FINISH_ID (0x09UL)
#define | SE_CRYPTO_HL_AUTHENTICATE_METADATA (0x10UL)
#define | SE_APP_GET_ACTIVE_FW_INFO (0x20UL)
#define | SE_BOOT_INFO_READ_ALL_ID (0x80UL)
#define | SE_BOOT_INFO_WRITE_ALL_ID (0x81UL)
#define | SE_IMG_READ (0x92UL)
#define | SE_IMG_WRITE (0x93UL)
#define | SE_IMG_ERASE (0x94UL)
#define | SE_LOCK_RESTRICT_SERVICES (0x100UL)
#define | SE_MW_ADDON_MSB_MASK (0x70000000U)
#define | SE_MW_ADDON_KMS_MSB (0x10000000U)

Typedefs

typedef uint32_t SE_FunctionIDTypeDef

Functions

SE_ErrorStatus SE_CallGate (SE_FunctionIDTypeDef eID, SE_StatusTypeDef *peSE_Status,...)
Secure Engine CallGate function. It is the only access/exit point to code inside protected area. In order to call others functions included in the protected area, the specific ID has to be specified. More...

Detailed Description

This file contains definitions for Secure Engine CALLGATE module functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_crypto_bootloader_template.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_crypto_bootloader_template.h
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_CRYPTO_BOOTLOADER_H
23 #define SE_CRYPTO_BOOTLOADER_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30 #include "se_crypto_config.h"
31 #include "crypto.h"
32 #include "se_def.h"
33
54 /*Low level functions*/
55 SE_ErrorStatus SE_CRYPTO_Encrypt_Init(SE_FwRawHeaderTypeDef *pxSE_Metadata);
56 SE_ErrorStatus SE_CRYPTO_Header_Append(const uint8_t *pInputBuffer, int32_t InputSize);
57 SE_ErrorStatus SE_CRYPTO_Encrypt_Append(const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer,
58 int32_t *pOutputSize);
59 SE_ErrorStatus SE_CRYPTO_Encrypt_Finish(uint8_t *pOutputBuffer, int32_t *pOutputSize);
60 SE_ErrorStatus SE_CRYPTO_Decrypt_Init(SE_FwRawHeaderTypeDef *pxSE_Metadata);
61 SE_ErrorStatus SE_CRYPTO_Decrypt_Append(const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer,
62 int32_t *pOutputSize);
63 SE_ErrorStatus SE_CRYPTO_Decrypt_Finish(uint8_t *pOutputBuffer, int32_t *pOutputSize);
64 SE_ErrorStatus SE_CRYPTO_AuthenticateFW_Init(SE_FwRawHeaderTypeDef *pxSE_Metadata);
65 SE_ErrorStatus SE_CRYPTO_AuthenticateFW_Append(const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer,
66 int32_t *pOutputSize);
67 SE_ErrorStatus SE_CRYPTO_AuthenticateFW_Finish(uint8_t *pOutputBuffer, int32_t *pOutputSize);
68 /*High level functions*/
69 SE_ErrorStatus SE_CRYPTO_Authenticate_Metadata(SE_FwRawHeaderTypeDef *pxSE_Metadata);
70
91 #ifdef __cplusplus
92 }
93 #endif
94
95 #endif /* SE_CRYPTO_BOOTLOADER_H */
96
97 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
98
SE_FwRawHeaderTypeDef
Secure Engine crypto structure definition There must be a Firmware Header structure definition This s...
Definition: se_def_metadata_template.h:84
se_def.h
This file references the definitions for SE functionalities.
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54
Generated on Fri Jun 28 2019 10:23:41 for Secure Engine by doxygen 1.8.14


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_crypto_common.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions | Variables
se_crypto_common.c File Reference

Secure Engine CRYPTO module. This file provides set of firmware functions to manage SE Crypto functionalities. These functions are some common code for the functions used by the bootloader and the application. More...

#include "se_crypto_common.h"
#include "crypto.h"

Functions

SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Init (const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit)
Secure Engine AES GCM Encrypt Init function. It is a wrapper of AES_GCM_Encrypt_Init function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Header_Append (const uint8_t *pInputBuffer, int32_t InputSize)
Secure Engine AES GCM Header Append function. It is a wrapper of AES_GCM_Header_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Encrypt Append function. It is a wrapper of AES_GCM_Encrypt_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Encrypt Finish function. It is a wrapper of AES_GCM_Encrypt_Finish function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Init (const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit)
Secure Engine AES GCM Decrypt Init function. It is a wrapper of AES_GCM_Decrypt_Init function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Decrypt Append function. It is a wrapper of AES_GCM_Decrypt_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Decrypt Finish function. It is a wrapper of AES_GCM_Decrypt_Finish function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...

Variables

AESGCMctx_stt m_xSE_AESGCMCtx

Detailed Description

Secure Engine CRYPTO module. This file provides set of firmware functions to manage SE Crypto functionalities. These functions are some common code for the functions used by the bootloader and the application.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_crypto_common.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Data Structures | Macros | Functions
se_crypto_common.h File Reference
#include "se_def.h"

Go to the source code of this file.

Data Structures

struct SE_GCMInitTypeDef
Secure Engine AES GCM structure definition. More...

Macros

#define | IS_SE_CRYPTO_AES_GCM_NONCE_SIZE(SIZE) ((SIZE) == SE_NONCE_LEN)
#define | IS_SE_CRYPTO_AES_GCM_TAG_SIZE(SIZE) ((SIZE) == SE_TAG_LEN)

Functions

SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Init (const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit)
Secure Engine AES GCM Encrypt Init function. It is a wrapper of AES_GCM_Encrypt_Init function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Header_Append (const uint8_t *pInputBuffer, int32_t InputSize)
Secure Engine AES GCM Header Append function. It is a wrapper of AES_GCM_Header_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Encrypt Append function. It is a wrapper of AES_GCM_Encrypt_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Encrypt_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Encrypt Finish function. It is a wrapper of AES_GCM_Encrypt_Finish function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Init (const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit)
Secure Engine AES GCM Decrypt Init function. It is a wrapper of AES_GCM_Decrypt_Init function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Append (const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Decrypt Append function. It is a wrapper of AES_GCM_Decrypt_Append function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...
SE_ErrorStatus | SE_CRYPTO_AES_GCM_Decrypt_Finish (uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Decrypt Finish function. It is a wrapper of AES_GCM_Decrypt_Finish function included in the protected area. This parameter can be a value of Secure Engine Status definition. More...

Detailed Description

Author
MCD Application Team This file provides set of firmware functions to manage SE Crypto functionalities. These functions are some common code for the functions used by the bootloader and the application.
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_crypto_config_template.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_crypto_config_template.h
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_CRYPTO_CONFIG_H
23 #define SE_CRYPTO_CONFIG_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
73 #define SECBOOT_ECCDSA_WITHOUT_ENCRYPT_SHA256 (1U)
74 #define SECBOOT_ECCDSA_WITH_AES128_CBC_SHA256 (2U)
75 #define SECBOOT_AES128_GCM_AES128_GCM_AES128_GCM (3U)
77 /* Selected Crypto Scheme for bootloader operations */
78 #define SECBOOT_CRYPTO_SCHEME
79
80
81
98 #ifdef __cplusplus
99 }
100 #endif
101
102 #endif /* SE_CRYPTO_CONFIG_H */
103
104 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
105
Generated on Fri Jun 28 2019 10:23:41 for Secure Engine by doxygen 1.8.14


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_def.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_def.h File Reference

This file references the definitions for SE functionalities. More...

#include <stdint.h>
#include "se_def_core.h"
#include "se_def_metadata.h"

Go to the source code of this file.

Detailed Description

This file references the definitions for SE functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_def_core.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Macros | Typedefs | Enumerations
se_def_core.h File Reference

This file contains core definitions for SE functionalities. More...

Go to the source code of this file.

Macros

#define | SE_OK (0x0012e223UL)
#define | SE_KO (0x0013023dUL)
#define | SE_INIT_ERR (0x00130ce5UL)
#define | SE_BOOT_INFO_ERR (0x00135705UL)
#define | SE_BOOT_INFO_ERR_FACTORY_RESET (0x0013b424UL)
#define | SE_SIGNATURE_ERR (0x00146ac1UL)
#define | SE_ERR_FLASH_READ (0x0014b817UL)

Typedefs

typedef uint32_t SE_StatusTypeDef

Enumerations

enum SE_ErrorStatus { SE_ERROR = 0x00018799U, SE_SUCCESS = 0x0012310FU }
Secure Engine Error definition.

Detailed Description

This file contains core definitions for SE functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_def_metadata_template.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_def_metadata_template.h
1
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef SE_DEF_METADATA_H
22 #define SE_DEF_METADATA_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* Includes ------------------------------------------------------------------*/
29 #include <stdint.h>
30 #include "se_crypto_config.h"
31
59 #define SE_FW_HEADER_TOT_LEN ((int32_t) sizeof(SE_FwRawHeaderTypeDef))
60 #define SE_FW_HEADER_METADATA_LEN ((int32_t) sizeof(SE_FwRawHeaderTypeDef))
84 typedef struct
85 {
86 uint16_t FwVersion;
87 uint32_t FwSize;
88 /* If you want to support Firmware Authentication then the field below is also required */
89 /* uint8_t FwTag[SE_TAG_LEN]; */
90 /* If you want to authenticate the Firmware metadata the the field below is also required */
91 /* uint8_t HeaderMAC[SE_TAG_LEN]; */
92 } SE_FwRawHeaderTypeDef;
93
114 #ifdef __cplusplus
115 }
116 #endif
117
118 #endif /* SE_DEF_METADATA_H */
119
120 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
121
SE_FwRawHeaderTypeDef
Secure Engine crypto structure definition There must be a Firmware Header structure definition This s...
Definition: se_def_metadata_template.h:84
SE_FwRawHeaderTypeDef::FwSize
uint32_t FwSize
Definition: se_def_metadata_template.h:87
SE_FwRawHeaderTypeDef::FwVersion
uint16_t FwVersion
Definition: se_def_metadata_template.h:86


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_exception.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_exception.c File Reference

Secure Engine exception module. This file provides set of firmware functions to manage SE non maskeable interruption. More...

#include "stddef.h"
#include "se_low_level.h"
#include "se_exception.h"

Functions

void | SE_NMI_ExceptionHandler (void)
SE Non Maskeable Interrupt handler. More...
void | HardFault_Handler (void)
HardFault Handler. More...
void | MemManage_Handler (void)
MPU Fault Handler. More...
void | BusFault_Handler (void)
Bus Fault Handler. More...

Detailed Description

Secure Engine exception module. This file provides set of firmware functions to manage SE non maskeable interruption.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_exception.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_exception.h
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_EXCEPTION_H
23 #define SE_EXCEPTION_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30 #include "se_def.h"
31
47 void SE_NMI_ExceptionHandler(void);
48 void HardFault_Handler(void);
49 void MemManage_Handler(void);
50 void BusFault_Handler(void);
51
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif /* SE_EXCEPTION_H */
73
74 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
75
SE_NMI_ExceptionHandler
void SE_NMI_ExceptionHandler(void)
SE Non Maskeable Interrupt handler.
Definition: se_exception.c:48
BusFault_Handler
void BusFault_Handler(void)
Bus Fault Handler.
Definition: se_exception.c:80
HardFault_Handler
void HardFault_Handler(void)
HardFault Handler.
Definition: se_exception.c:59
MemManage_Handler
void MemManage_Handler(void)
MPU Fault Handler.
Definition: se_exception.c:69
se_def.h
This file references the definitions for SE functionalities.


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_fwimg.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_fwimg.c File Reference

This file provides a set of firmware functions used by the bootloader to manage Secure Firmware Update functionalities. More...

#include "se_def.h"
#include "se_fwimg.h"
#include "se_low_level.h"
#include "se_exception.h"
#include "string.h"

Functions

SE_ErrorStatus | SE_IMG_Write (void *pDestination, const void *pSource, uint32_t Length)
Write in Flash protected area. More...
SE_ErrorStatus | SE_IMG_Read (void *pDestination, const void *pSource, uint32_t Length)
Read from Flash protected area. More...
SE_ErrorStatus | SE_IMG_Erase (void *pDestination, uint32_t Length)
Erase a Flash protected area. More...

Detailed Description

This file provides a set of firmware functions used by the bootloader to manage Secure Firmware Update functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_fwimg.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_fwimg.h File Reference

This file provides set of firmware functions to manage Secure Firmware Update functionalities. More...

Go to the source code of this file.

Functions

SE_ErrorStatus | SE_IMG_Erase (void *pDestination, uint32_t Length)
Erase a Flash protected area. More...
SE_ErrorStatus | SE_IMG_Read (void *pDestination, const void *pSource, uint32_t Length)
Read from Flash protected area. More...
SE_ErrorStatus | SE_IMG_Write (void *pDestination, const void *pSource, uint32_t Length)
Write in Flash protected area. More...

Detailed Description

This file provides set of firmware functions to manage Secure Firmware Update functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_application.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_interface_application.c File Reference

Secure Engine Interface module. This file provides set of firmware functions to manage SE Interface functionalities. These services are used by the application. More...

#include "main.h"
#include "se_low_level.h"
#include "se_interface_common.h"
#include "se_callgate.h"
#include "se_interface_application.h"
#include "se_intrinsics.h"

Functions

__root SE_ErrorStatus SE_APP_GetActiveFwInfo (SE_StatusTypeDef *peSE_Status, SE_APP_ActiveFwInfo_t *p_FwInfo)
Service called by the User Application to retrieve the Active Firmware Info. More...

Detailed Description

Secure Engine Interface module. This file provides set of firmware functions to manage SE Interface functionalities. These services are used by the application.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_application.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_interface_application.h File Reference

This file contains definitions for Secure Engine Interface module functionalities. These services are used by the application. More...

#include "se_def.h"
#include "se_user_application.h"

Go to the source code of this file.

Functions

__root SE_ErrorStatus SE_APP_GetActiveFwInfo (SE_StatusTypeDef *peSE_Status, SE_APP_ActiveFwInfo_t *p_FwInfo)
Service called by the User Application to retrieve the Active Firmware Info. More...

Detailed Description

This file contains definitions for Secure Engine Interface module functionalities. These services are used by the application.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_bootloader.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_interface_bootloader.c File Reference

Secure Engine Interface module. This file provides set of firmware functions to manage SE Interface functionalities. These services are used by the bootloader. More...

#include "main.h"
#include "se_low_level.h"
#include "se_interface_common.h"
#include "se_callgate.h"
#include "se_interface_bootloader.h"
#include "se_intrinsics.h"

Functions

SE_ErrorStatus | SE_Init (SE_StatusTypeDef *peSE_Status, uint32_t uSystemCoreClock)
Secure Engine initialization function. This function initialize all the internals module of the Secure Engine. More...
SE_ErrorStatus | SE_Startup (void)
Secure Engine Startup function. This function initializes the SE Core binary. This function must be called only one time so an internal check is executed. More...
SE_ErrorStatus | SE_INFO_ReadBootInfo (SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo)
call by SFU to read Info Boot inside the protected area. More...
SE_ErrorStatus | SE_INFO_WriteBootInfo (SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo)
call by SFU to write Info Boot inside the protected area. More...
SE_ErrorStatus | SE_LockRestrictServices (SE_StatusTypeDef *pSE_Status)
call by SFU to lock part of Secure Engine services More...
SE_ErrorStatus | SE_SFU_IMG_Read (SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length)
call by SFU to read flash protected area More...
SE_ErrorStatus | SE_SFU_IMG_Write (SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length)
call by SFU to write a flash protected area More...
SE_ErrorStatus | SE_SFU_IMG_Erase (SE_StatusTypeDef *pSE_Status, void *pDestination, uint32_t Length)
call by SFU to erase a flash protected area More...
SE_ErrorStatus | SE_Decrypt_Init (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType)
Secure Engine Decrypt Init function. It is a wrapper of Decrypt_Init function included in the protected area. More...
SE_ErrorStatus | SE_Decrypt_Append (SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Decrypt Append function. It is a wrapper of Decrypt_Append function included in the protected area. More...
SE_ErrorStatus | SE_Decrypt_Finish (SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Decrypt Finish function. It is a wrapper of Decrypt_Finish function included in the protected area. More...
SE_ErrorStatus | SE_AuthenticateFW_Init (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType)
Secure Engine Firmware Authentication Init function. It is a wrapper of AuthenticateFW_Init function included in the Firewall. More...
SE_ErrorStatus | SE_AuthenticateFW_Append (SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Firmware Authentication Append function. It is a wrapper of AuthenticateFW_Append function included in the Firewall. More...
SE_ErrorStatus | SE_AuthenticateFW_Finish (SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Firmware Authentication Finish function. It is a wrapper of AuthenticateFW_Finish function included in the Firewall. More...
SE_ErrorStatus | SE_VerifyFwRawHeaderTag (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxFwRawHeader)
Secure Engine Verify Raw Fw Header Tag. It verifies the signature of a raw header file. More...

Detailed Description

Secure Engine Interface module. This file provides set of firmware functions to manage SE Interface functionalities. These services are used by the bootloader.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_bootloader.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_interface_bootloader.h File Reference

This file contains definitions for Secure Engine Reserved Interface module functionalities. These services are used by the bootloader. More...

#include "se_def.h"
#include "se_bootinfo.h"

Go to the source code of this file.

Functions

SE_ErrorStatus | SE_Init (SE_StatusTypeDef *peSE_Status, uint32_t uSystemCoreClock)
Secure Engine initialization function. This function initialize all the internals module of the Secure Engine. More...
SE_ErrorStatus | SE_Startup (void)
Secure Engine Startup function. This function initializes the SE Core binary. This function must be called only one time so an internal check is executed. More...
SE_ErrorStatus | SE_INFO_ReadBootInfo (SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo)
call by SFU to read Info Boot inside the protected area. More...
SE_ErrorStatus | SE_INFO_WriteBootInfo (SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo)
call by SFU to write Info Boot inside the protected area. More...
SE_ErrorStatus | SE_LockRestrictServices (SE_StatusTypeDef *pSE_Status)
call by SFU to lock part of Secure Engine services More...
SE_ErrorStatus | SE_SFU_IMG_Erase (SE_StatusTypeDef *pSE_Status, void *pDestination, uint32_t Length)
call by SFU to erase a flash protected area More...
SE_ErrorStatus | SE_SFU_IMG_Read (SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length)
call by SFU to read flash protected area More...
SE_ErrorStatus | SE_SFU_IMG_Write (SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length)
call by SFU to write a flash protected area More...
SE_ErrorStatus | SE_VerifyFwRawHeaderTag (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxFwRawHeader)
Secure Engine Verify Raw Fw Header Tag. It verifies the signature of a raw header file. More...
SE_ErrorStatus | SE_Decrypt_Init (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType)
Secure Engine Decrypt Init function. It is a wrapper of Decrypt_Init function included in the protected area. More...
SE_ErrorStatus | SE_Decrypt_Append (SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Decrypt Append function. It is a wrapper of Decrypt_Append function included in the protected area. More...
SE_ErrorStatus | SE_Decrypt_Finish (SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Decrypt Finish function. It is a wrapper of Decrypt_Finish function included in the protected area. More...
SE_ErrorStatus | SE_AuthenticateFW_Init (SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType)
Secure Engine Firmware Authentication Init function. It is a wrapper of AuthenticateFW_Init function included in the Firewall. More...
SE_ErrorStatus | SE_AuthenticateFW_Append (SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Firmware Authentication Append function. It is a wrapper of AuthenticateFW_Append function included in the Firewall. More...
SE_ErrorStatus | SE_AuthenticateFW_Finish (SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Firmware Authentication Finish function. It is a wrapper of AuthenticateFW_Finish function included in the Firewall. More...

Detailed Description

This file contains definitions for Secure Engine Reserved Interface module functionalities. These services are used by the bootloader.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_common.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions | Variables
se_interface_common.c File Reference

Secure Engine Interface module. This file provides set of common firmware functions to manage SE Interface functionalities. These services are used by the se_interface_bootloader.c and se_interface_application.c files. More...

#include "main.h"
#include "se_low_level.h"
#include "se_interface_common.h"
#include "se_intrinsics.h"

Functions

void | SE_EnterSecureMode (void)
SE Enter Secure Mode. More...
void | SE_ExitSecureMode (void)
SE Exit Secure Mode. More...

Variables

uint32_t primask_bit

Detailed Description

Secure Engine Interface module. This file provides set of common firmware functions to manage SE Interface functionalities. These services are used by the se_interface_bootloader.c and se_interface_application.c files.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_common.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Macros | Functions
se_interface_common.h File Reference

This file contains common definitions for Secure Engine Interface module functionalities. More...

#include "mapping_export.h"
#include "se_def.h"

Go to the source code of this file.

Macros

#define | SE_MDW_VERSION_MAIN (0x01U)
Secure Engine Middleware version. More...
#define | SE_MDW_VERSION_SUB1 (0x00U)
#define | SE_MDW_VERSION_SUB2 (0x00U)
#define | SE_MDW_VERSION_RC (0x00U)
#define | SE_MDW_VERSION
#define | __IS_SFU_RESERVED()
Check if the caller is located in SBSFU region. More...
#define | SET_CALLGATE()
This macro sets the CallGate function pointer. A local variable is used to avoid constraints regarding the SRAM1 handling, as the SE_Init is called in SB_SFU context but the se_interface functions can be called in the UserApp context too. More...

Functions

void | SE_EnterSecureMode (void)
SE Enter Secure Mode. More...
void | SE_ExitSecureMode (void)
SE Exit Secure Mode. More...

Detailed Description

This file contains common definitions for Secure Engine Interface module functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_intrinsics.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_intrinsics.h
1
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef SE_INTRINSICS_H
24 #define SE_INTRINSICS_H
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #if defined (__CC_ARM)
31 #define __root __attribute__((used))
32 #elif defined (__GNUC__)
33 #define __root __attribute__((used))
34 #endif /* __CC_ARM */
35
36 #if defined(__CC_ARM)
37 #define __get_SP __current_sp
38 #elif defined(__GNUC__)
39 static inline unsigned int __get_SP(void)
40 {
41 register unsigned sp asm("sp");
42 return sp;
43 }
44 #endif /* __CC_ARM */
45
46 #if defined(__CC_ARM)
47 #define __get_LR __return_address
48 #elif defined(__GNUC__)
49 static inline unsigned int __get_LR(void)
50 {
51 register uint32_t result;
52 asm volatile("MOV %0, LR\n" : "=r"(result));
53 return (result);
54 }
55 #endif /* __CC_ARM */
56
57 #if defined(__ICCARM__)
58 extern void *__vector_table;
59 #elif defined(__CC_ARM)
60 extern void *__Vectors;
61 #define __vector_table __Vectors
62 #elif defined(__GNUC__)
63 extern void *g_pfnVectors[];
64 #define __vector_table g_pfnVectors
65 #endif /* __ICCARM__ */
66
67 #ifdef __cplusplus
68 }
69 #endif
70
71 #endif /* SE_INTRINSICS */
72 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
73


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_startup.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_startup.c File Reference

Secure Engine STARTUP module. This file provides set of firmware functions to manage SE Startup functionalities. More...

#include "se_def.h"
#include "se_startup.h"
#include "se_intrinsics.h"

Functions

void | __iar_data_init3 (void)
__root SE_ErrorStatus | SE_CORE_Startup (void)
Secure Engine Core Startup function. It is the initialization function for Secure Engine Core binary. Initialize all variables defined in the binary. More...

Detailed Description

Secure Engine STARTUP module. This file provides set of firmware functions to manage SE Startup functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_startup.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_startup.h File Reference

This file contains definitions for Secure Engine STARTUP module functionalities. More...

Go to the source code of this file.

Functions

__root SE_ErrorStatus SE_CORE_Startup (void)
Secure Engine Core Startup function. It is the initialization function for Secure Engine Core binary. Initialize all variables defined in the binary. More...

Detailed Description

This file contains definitions for Secure Engine STARTUP module functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_user_application.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_user_application.c File Reference

Secure Engine USER APPLICATION module. This file is a placeholder for the code dedicated to the user application. These services are used by the application. More...

#include "se_user_application.h"
#include "se_low_level.h"
#include "string.h"

Functions

SE_ErrorStatus SE_APPLI_GetActiveFwInfo (SE_APP_ActiveFwInfo_t *p_FwInfo)
Service called by the User Application to retrieve the Active Firmware Info. More...

Detailed Description

Secure Engine USER APPLICATION module. This file is a placeholder for the code dedicated to the user application. These services are used by the application.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_user_application.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Data Structures | Functions
se_user_application.h File Reference
#include "se_def.h"

Go to the source code of this file.

Data Structures

struct SE_APP_ActiveFwInfo_t
Firmware Information structure definition. This structure is used to retrieve some information about the active Firmware. More...

Functions

SE_ErrorStatus SE_APPLI_GetActiveFwInfo (SE_APP_ActiveFwInfo_t *p_FwInfo)
Service called by the User Application to retrieve the Active Firmware Info. More...

Detailed Description

Author
MCD Application Team This file is a placeholder for the code dedicated to the user application. These services are used by the application.
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_utils.c File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions | Variables
se_utils.c File Reference

Secure Engine UTILS module. This file provides set of firmware functions to manage SE Utils functionalities. More...

#include "stddef.h"
#include "se_low_level.h"
#include "se_utils.h"

Functions

void | SE_SetSystemCoreClock (uint32_t uSystemCoreClock)
Set Secure Engine SystemCoreClock variable. More...
uint32_t | HAL_GetTick (void)
Provide a tick value in millisecond. More...
void | HAL_Delay (uint32_t Delay)
This function provides minimum delay (in milliseconds) based on variable incremented. More...

Variables

static uint32_t m_uSE_SystemCoreClock

Detailed Description

Secure Engine UTILS module. This file provides set of firmware functions to manage SE Utils functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_utils.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
Functions
se_utils.h File Reference

This file contains definitions for Secure Engine UTILS module functionalities. More...

#include "se_def.h"

Go to the source code of this file.

Functions

void SE_SetSystemCoreClock (uint32_t uSystemCoreClock)
Set Secure Engine SystemCoreClock variable. More...

Detailed Description

This file contains definitions for Secure Engine UTILS module functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Interface Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Interface
Interface Directory Reference


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Interface/se_low_level_template.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Interface
se_low_level_template.h
1
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef SE_LOW_LEVEL_H
22 #define SE_LOW_LEVEL_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* Includes ------------------------------------------------------------------*/
29 #include "se_def.h"
30
31 /* Tip: To avoid modifying this file each time you need to switch between these
32 devices, you can define the device in your toolchain compiler preprocessor.
33 */
34 #if !defined (USE_HAL_DRIVER)
35 /*
36 * Comment the line below if you will not use the peripherals drivers.
37 * In this case, these drivers will not be included and the application code will
38 * be based on direct access to peripherals registers
39 */
40 #define USE_HAL_DRIVER */
41 #endif /* USE_HAL_DRIVER */
42
43 #if defined (USE_HAL_DRIVER)
44 /* #include "stm32seriexx_hal.h" as example L4 series */
45 #include "stm32l4xx_hal.h"
46 #endif /* USE_HAL_DRIVER */
47
48
67 /* == Code isolation : FIREWALL example ==*/
72 #define ENTER_PROTECTED_AREA() CLEAR_BIT(FIREWALL->CR, FW_CR_FPA)
73
77 #define EXIT_PROTECTED_AREA() __HAL_FIREWALL_PREARM_ENABLE()
78
79
80 /* == Code isolation : MPU example ==*/
85 /* #define SFU_ISOLATE_SE_WITH_MPU */
86
102 SE_ErrorStatus SE_LL_CRC_Config(void);
103 SE_ErrorStatus SE_LL_CRC_Init(void);
104 SE_ErrorStatus SE_LL_CRC_DeInit(void);
105 uint32_t SE_LL_CRC_Calculate(uint32_t pBuffer[], uint32_t uBufferLength);
106
114 SE_ErrorStatus SE_LL_FLASH_Erase(void *pStart, uint32_t Length);
115 SE_ErrorStatus SE_LL_FLASH_Write(void *pDestination, const void *pSource, uint32_t Length);
116 SE_ErrorStatus SE_LL_FLASH_Read(void *pDestination, const void *pSource, uint32_t Length);
117 void FLASH_IRQHandler(void);
118
135 #ifdef __cplusplus
136 }
137 #endif
138
139 #endif /* SE_LOW_LEVEL_H */
140
141 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
142
SE_LL_CRC_Init
SE_ErrorStatus SE_LL_CRC_Init(void)
Wrapper to HAL CRC initilization function.
Definition: se_low_level_template.c:72
FLASH_IRQHandler
void FLASH_IRQHandler(void)
Flash IRQ Handler.
Definition: se_low_level_template.c:148
SE_LL_FLASH_Erase
SE_ErrorStatus SE_LL_FLASH_Erase(void *pStart, uint32_t Length)
This function does an erase of nb pages in user flash area.
Definition: se_low_level_template.c:112
SE_LL_FLASH_Write
SE_ErrorStatus SE_LL_FLASH_Write(void *pDestination, const void *pSource, uint32_t Length)
Write in Flash protected area.
Definition: se_low_level_template.c:126
se_def.h
This file references the definitions for SE functionalities.
SE_LL_CRC_DeInit
SE_ErrorStatus SE_LL_CRC_DeInit(void)
Wrapper to HAL CRC de-initilization function.
Definition: se_low_level_template.c:82
SE_LL_CRC_Calculate
uint32_t SE_LL_CRC_Calculate(uint32_t pBuffer[], uint32_t uBufferLength)
Wrapper to HAL CRC Calculate function.
Definition: se_low_level_template.c:93
SE_LL_CRC_Config
SE_ErrorStatus SE_LL_CRC_Config(void)
Set CRC configuration and call HAL CRC initialization function.
Definition: se_low_level_template.c:62
SE_LL_FLASH_Read
SE_ErrorStatus SE_LL_FLASH_Read(void *pDestination, const void *pSource, uint32_t Length)
Read in Flash protected area.
Definition: se_low_level_template.c:138
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Key Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Key
Key Directory Reference

Files

file se_key.h [code]
This file contains definitions for Secure Engine KEY module functionalities.


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Key/se_key.h File Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Key
Functions
se_key.h File Reference

This file contains definitions for Secure Engine KEY module functionalities. More...

#include <stdint.h>

Go to the source code of this file.

Functions

void | SE_ReadKey (uint8_t *pKey)
Function to retrieve the symmetric key. More...
void | SE_ReadKey_Pub (uint8_t *pPubKey)
Function to retrieve the public asymmetric key. More...
void | SE_ReadKey_Pairing (uint8_t *pPairingKey)
Function to retrieve the external token pairing keys. More...

Detailed Description

This file contains definitions for Secure Engine KEY module functionalities.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under Ultimate Liberty license SLA0044, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: www.st.com/SLA0044


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Utilities
Utilities Directory Reference

Directories

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Utilities
  • KeysAndImages
KeysAndImages Directory Reference


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/win Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Utilities
  • KeysAndImages
  • win
win Directory Reference


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/win/prepareimage Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Utilities
  • KeysAndImages
  • win
  • prepareimage
prepareimage Directory Reference

Directories

Generated on Fri Jun 28 2019 10:23:42 for Secure Engine by doxygen 1.8.14


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/win/prepareimage/Include Directory Reference

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Utilities
  • KeysAndImages
  • win
  • prepareimage
  • Include
Include Directory Reference


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Utilities/KeysAndImages/win/prepareimage/Include/pyconfig.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Utilities
  • KeysAndImages
  • win
  • prepareimage
  • Include
pyconfig.h
1 #ifndef Py_CONFIG_H
2 #define Py_CONFIG_H
3
4 /* pyconfig.h. NOT Generated automatically by configure.
5
6 This is a manually maintained version used for the Watcom,
7 Borland and Microsoft Visual C++ compilers. It is a
8 standard part of the Python distribution.
9
10 WINDOWS DEFINES:
11 The code specific to Windows should be wrapped around one of
12 the following #defines
13
14 MS_WIN64 - Code specific to the MS Win64 API
15 MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all supported APIs)
16 MS_WINDOWS - Code specific to Windows, but all versions.
17 Py_ENABLE_SHARED - Code if the Python core is built as a DLL.
18
19 Also note that neither "_M_IX86" or "_MSC_VER" should be used for
20 any purpose other than "Windows Intel x86 specific" and "Microsoft
21 compiler specific". Therefore, these should be very rare.
22
23
24 NOTE: The following symbols are deprecated:
25 NT, USE_DL_EXPORT, USE_DL_IMPORT, DL_EXPORT, DL_IMPORT
26 MS_CORE_DLL.
27
28 WIN32 is still required for the locale module.
29
30 */
31
32 /* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */
33 #ifdef USE_DL_EXPORT
34 # define Py_BUILD_CORE
35 #endif /* USE_DL_EXPORT */
36
37 /* Visual Studio 2005 introduces deprecation warnings for
38 "insecure" and POSIX functions. The insecure functions should
39 be replaced by *_s versions (according to Microsoft); the
40 POSIX functions by _* versions (which, according to Microsoft,
41 would be ISO C conforming). Neither renaming is feasible, so
42 we just silence the warnings. */
43
44 #ifndef _CRT_SECURE_NO_DEPRECATE
45 #define _CRT_SECURE_NO_DEPRECATE 1
46 #endif
47 #ifndef _CRT_NONSTDC_NO_DEPRECATE
48 #define _CRT_NONSTDC_NO_DEPRECATE 1
49 #endif
50
51 #define HAVE_IO_H
52 #define HAVE_SYS_UTIME_H
53 #define HAVE_TEMPNAM
54 #define HAVE_TMPFILE
55 #define HAVE_TMPNAM
56 #define HAVE_CLOCK
57 #define HAVE_STRERROR
58
59 #include <io.h>
60
61 #define HAVE_HYPOT
62 #define HAVE_STRFTIME
63 #define DONT_HAVE_SIG_ALARM
64 #define DONT_HAVE_SIG_PAUSE
65 #define LONG_BIT 32
66 #define WORD_BIT 32
67
68 #define MS_WIN32 /* only support win32 and greater. */
69 #define MS_WINDOWS
70 #ifndef PYTHONPATH
71 # define PYTHONPATH L".\\DLLs;.\\lib"
72 #endif
73 #define NT_THREADS
74 #define WITH_THREAD
75 #ifndef NETSCAPE_PI
76 #define USE_SOCKET
77 #endif
78
79
80 /* Compiler specific defines */
81
82 /* ------------------------------------------------------------------------*/
83 /* Microsoft C defines _MSC_VER */
84 #ifdef _MSC_VER
85
86 /* We want COMPILER to expand to a string containing _MSC_VER's *value*.
87 * This is horridly tricky, because the stringization operator only works
88 * on macro arguments, and doesn't evaluate macros passed *as* arguments.
89 * Attempts simpler than the following appear doomed to produce "_MSC_VER"
90 * literally in the string.
91 */
92 #define _Py_PASTE_VERSION(SUFFIX) \
93 ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]")
94 /* e.g., this produces, after compile-time string catenation,
95 * ("[MSC v.1200 32 bit (Intel)]")
96 *
97 * _Py_STRINGIZE(_MSC_VER) expands to
98 * _Py_STRINGIZE1((_MSC_VER)) expands to
99 * _Py_STRINGIZE2(_MSC_VER) but as this call is the result of token-pasting
100 * it's scanned again for macros and so further expands to (under MSVC 6)
101 * _Py_STRINGIZE2(1200) which then expands to
102 * "1200"
103 */
104 #define _Py_STRINGIZE(X) _Py_STRINGIZE1((X))
105 #define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X
106 #define _Py_STRINGIZE2(X) #X
107
108 /* MSVC defines _WINxx to differentiate the windows platform types
109
110 Note that for compatibility reasons _WIN32 is defined on Win32
111 *and* on Win64. For the same reasons, in Python, MS_WIN32 is
112 defined on Win32 *and* Win64. Win32 only code must therefore be
113 guarded as follows:
114 #if defined(MS_WIN32) && !defined(MS_WIN64)
115 */
116 #ifdef _WIN64
117 #define MS_WIN64
118 #endif
119
120 /* set the COMPILER */
121 #ifdef MS_WIN64
122 #if defined(_M_X64) || defined(_M_AMD64)
123 #if defined(__INTEL_COMPILER)
124 #define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 64 bit (amd64) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
125 #else
126 #define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)")
127 #endif /* __INTEL_COMPILER */
128 #define PYD_PLATFORM_TAG "win_amd64"
129 #else
130 #define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
131 #endif
132 #endif /* MS_WIN64 */
133
134 /* set the version macros for the windows headers */
135 /* Python 3.5+ requires Windows Vista or greater */
136 #define Py_WINVER 0x0600 /* _WIN32_WINNT_VISTA */
137 #define Py_NTDDI NTDDI_VISTA
138
139 /* We only set these values when building Python - we don't want to force
140 these values on extensions, as that will affect the prototypes and
141 structures exposed in the Windows headers. Even when building Python, we
142 allow a single source file to override this - they may need access to
143 structures etc so it can optionally use new Windows features if it
144 determines at runtime they are available.
145 */
146 #if defined(Py_BUILD_CORE) || defined(Py_BUILD_CORE_BUILTIN) || defined(Py_BUILD_CORE_MODULE)
147 #ifndef NTDDI_VERSION
148 #define NTDDI_VERSION Py_NTDDI
149 #endif
150 #ifndef WINVER
151 #define WINVER Py_WINVER
152 #endif
153 #ifndef _WIN32_WINNT
154 #define _WIN32_WINNT Py_WINVER
155 #endif
156 #endif
157
158 /* _W64 is not defined for VC6 or eVC4 */
159 #ifndef _W64
160 #define _W64
161 #endif
162
163 /* Define like size_t, omitting the "unsigned" */
164 #ifdef MS_WIN64
165 typedef __int64 ssize_t;
166 #else
167 typedef _W64 int ssize_t;
168 #endif
169 #define HAVE_SSIZE_T 1
170
171 #if defined(MS_WIN32) && !defined(MS_WIN64)
172 #if defined(_M_IX86)
173 #if defined(__INTEL_COMPILER)
174 #define COMPILER ("[ICC v." _Py_STRINGIZE(__INTEL_COMPILER) " 32 bit (Intel) with MSC v." _Py_STRINGIZE(_MSC_VER) " CRT]")
175 #else
176 #define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
177 #endif /* __INTEL_COMPILER */
178 #define PYD_PLATFORM_TAG "win32"
179 #elif defined(_M_ARM)
180 #define COMPILER _Py_PASTE_VERSION("32 bit (ARM)")
181 #define PYD_PLATFORM_TAG "win_arm"
182 #else
183 #define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
184 #endif
185 #endif /* MS_WIN32 && !MS_WIN64 */
186
187 typedef int pid_t;
188
189 #include <float.h>
190 #define Py_IS_NAN _isnan
191 #define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
192 #define Py_IS_FINITE(X) _finite(X)
193 #define copysign _copysign
194
195 /* VS 2010 and above already defines hypot as _hypot */
196 #if _MSC_VER < 1600
197 #define hypot _hypot
198 #endif
199
200 /* VS 2015 defines these names with a leading underscore */
201 #if _MSC_VER >= 1900
202 #define timezone _timezone
203 #define daylight _daylight
204 #define tzname _tzname
205 #endif
206
207 /* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/
208 #if _MSC_VER >= 1400 && _MSC_VER < 1600
209 #define HAVE_SXS 1
210 #endif
211
212 /* define some ANSI types that are not defined in earlier Win headers */
213 #if _MSC_VER >= 1200
214 /* This file only exists in VC 6.0 or higher */
215 #include <basetsd.h>
216 #endif
217
218 #endif /* _MSC_VER */
219
220 /* ------------------------------------------------------------------------*/
221 /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
222 #if defined(__GNUC__) && defined(_WIN32)
223 /* XXX These defines are likely incomplete, but should be easy to fix.
224 They should be complete enough to build extension modules. */
225 /* Suggested by Rene Liebscher <R.Liebscher@gmx.de> to avoid a GCC 2.91.*
226 bug that requires structure imports. More recent versions of the
227 compiler don't exhibit this bug.
228 */
229 #if (__GNUC__==2) && (__GNUC_MINOR__<=91)
230 #warning "Please use an up-to-date version of gcc! (>2.91 recommended)"
231 #endif
232
233 #define COMPILER "[gcc]"
234 #define hypot _hypot
235 #define PY_LONG_LONG long long
236 #define PY_LLONG_MIN LLONG_MIN
237 #define PY_LLONG_MAX LLONG_MAX
238 #define PY_ULLONG_MAX ULLONG_MAX
239 #endif /* GNUC */
240
241 /* ------------------------------------------------------------------------*/
242 /* lcc-win32 defines __LCC__ */
243 #if defined(__LCC__)
244 /* XXX These defines are likely incomplete, but should be easy to fix.
245 They should be complete enough to build extension modules. */
246
247 #define COMPILER "[lcc-win32]"
248 typedef int pid_t;
249 /* __declspec() is supported here too - do nothing to get the defaults */
250
251 #endif /* LCC */
252
253 /* ------------------------------------------------------------------------*/
254 /* End of compilers - finish up */
255
256 #ifndef NO_STDIO_H
257 # include <stdio.h>
258 #endif
259
260 /* 64 bit ints are usually spelt __int64 unless compiler has overridden */
261 #ifndef PY_LONG_LONG
262 # define PY_LONG_LONG __int64
263 # define PY_LLONG_MAX _I64_MAX
264 # define PY_LLONG_MIN _I64_MIN
265 # define PY_ULLONG_MAX _UI64_MAX
266 #endif
267
268 /* For Windows the Python core is in a DLL by default. Test
269 Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
270 #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED)
271 # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */
272 # define MS_COREDLL /* deprecated old symbol */
273 #endif /* !MS_NO_COREDLL && ... */
274
275 /* All windows compilers that use this header support __declspec */
276 #define HAVE_DECLSPEC_DLL
277
278 /* For an MSVC DLL, we can nominate the .lib files used by extensions */
279 #ifdef MS_COREDLL
280 # if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
281 /* not building the core - must be an ext */
282 # if defined(_MSC_VER)
283 /* So MSVC users need not specify the .lib
284 file in their Makefile (other compilers are
285 generally taken care of by distutils.) */
286 # if defined(_DEBUG)
287 # pragma comment(lib,"python37_d.lib")
288 # elif defined(Py_LIMITED_API)
289 # pragma comment(lib,"python3.lib")
290 # else
291 # pragma comment(lib,"python37.lib")
292 # endif /* _DEBUG */
293 # endif /* _MSC_VER */
294 # endif /* Py_BUILD_CORE */
295 #endif /* MS_COREDLL */
296
297 #if defined(MS_WIN64)
298 /* maintain "win32" sys.platform for backward compatibility of Python code,
299 the Win64 API should be close enough to the Win32 API to make this
300 preferable */
301 # define PLATFORM "win32"
302 # define SIZEOF_VOID_P 8
303 # define SIZEOF_TIME_T 8
304 # define SIZEOF_OFF_T 4
305 # define SIZEOF_FPOS_T 8
306 # define SIZEOF_HKEY 8
307 # define SIZEOF_SIZE_T 8
308 /* configure.ac defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
309 sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
310 On Win64 the second condition is not true, but if fpos_t replaces off_t
311 then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
312 should define this. */
313 # define HAVE_LARGEFILE_SUPPORT
314 #elif defined(MS_WIN32)
315 # define PLATFORM "win32"
316 # define HAVE_LARGEFILE_SUPPORT
317 # define SIZEOF_VOID_P 4
318 # define SIZEOF_OFF_T 4
319 # define SIZEOF_FPOS_T 8
320 # define SIZEOF_HKEY 4
321 # define SIZEOF_SIZE_T 4
322 /* MS VS2005 changes time_t to a 64-bit type on all platforms */
323 # if defined(_MSC_VER) && _MSC_VER >= 1400
324 # define SIZEOF_TIME_T 8
325 # else
326 # define SIZEOF_TIME_T 4
327 # endif
328 #endif
329
330 #ifdef _DEBUG
331 # define Py_DEBUG
332 #endif
333
334
335 #ifdef MS_WIN32
336
337 #define SIZEOF_SHORT 2
338 #define SIZEOF_INT 4
339 #define SIZEOF_LONG 4
340 #define SIZEOF_LONG_LONG 8
341 #define SIZEOF_DOUBLE 8
342 #define SIZEOF_FLOAT 4
343
344 /* VC 7.1 has them and VC 6.0 does not. VC 6.0 has a version number of 1200.
345 Microsoft eMbedded Visual C++ 4.0 has a version number of 1201 and doesn't
346 define these.
347 If some compiler does not provide them, modify the #if appropriately. */
348 #if defined(_MSC_VER)
349 #if _MSC_VER > 1300
350 #define HAVE_UINTPTR_T 1
351 #define HAVE_INTPTR_T 1
352 #else
353 /* VC6, VS 2002 and eVC4 don't support the C99 LL suffix for 64-bit integer literals */
354 #define Py_LL(x) x##I64
355 #endif /* _MSC_VER > 1300 */
356 #endif /* _MSC_VER */
357
358 #endif
359
360 /* define signed and unsigned exact-width 32-bit and 64-bit types, used in the
361 implementation of Python integers. */
362 #define PY_UINT32_T uint32_t
363 #define PY_UINT64_T uint64_t
364 #define PY_INT32_T int32_t
365 #define PY_INT64_T int64_t
366
367 /* Fairly standard from here! */
368
369 /* Define to 1 if you have the `copysign' function. */
370 #define HAVE_COPYSIGN 1
371
372 /* Define to 1 if you have the `round' function. */
373 #if _MSC_VER >= 1800
374 #define HAVE_ROUND 1
375 #endif
376
377 /* Define to 1 if you have the `isinf' macro. */
378 #define HAVE_DECL_ISINF 1
379
380 /* Define to 1 if you have the `isnan' function. */
381 #define HAVE_DECL_ISNAN 1
382
383 /* Define if on AIX 3.
384 System headers sometimes define this.
385 We just want to avoid a redefinition error message. */
386 #ifndef _ALL_SOURCE
387 /* #undef _ALL_SOURCE */
388 #endif
389
390 /* Define to empty if the keyword does not work. */
391 /* #define const */
392
393 /* Define to 1 if you have the <conio.h> header file. */
394 #define HAVE_CONIO_H 1
395
396 /* Define to 1 if you have the <direct.h> header file. */
397 #define HAVE_DIRECT_H 1
398
399 /* Define if you have dirent.h. */
400 /* #define DIRENT 1 */
401
402 /* Define to the type of elements in the array set by `getgroups'.
403 Usually this is either `int' or `gid_t'. */
404 /* #undef GETGROUPS_T */
405
406 /* Define to `int' if <sys/types.h> doesn't define. */
407 /* #undef gid_t */
408
409 /* Define if your struct tm has tm_zone. */
410 /* #undef HAVE_TM_ZONE */
411
412 /* Define if you don't have tm_zone but do have the external array
413 tzname. */
414 #define HAVE_TZNAME
415
416 /* Define to `int' if <sys/types.h> doesn't define. */
417 /* #undef mode_t */
418
419 /* Define if you don't have dirent.h, but have ndir.h. */
420 /* #undef NDIR */
421
422 /* Define to `long' if <sys/types.h> doesn't define. */
423 /* #undef off_t */
424
425 /* Define to `int' if <sys/types.h> doesn't define. */
426 /* #undef pid_t */
427
428 /* Define if the system does not provide POSIX.1 features except
429 with this defined. */
430 /* #undef _POSIX_1_SOURCE */
431
432 /* Define if you need to in order for stat and other things to work. */
433 /* #undef _POSIX_SOURCE */
434
435 /* Define as the return type of signal handlers (int or void). */
436 #define RETSIGTYPE void
437
438 /* Define to `unsigned' if <sys/types.h> doesn't define. */
439 /* #undef size_t */
440
441 /* Define if you have the ANSI C header files. */
442 #define STDC_HEADERS 1
443
444 /* Define if you don't have dirent.h, but have sys/dir.h. */
445 /* #undef SYSDIR */
446
447 /* Define if you don't have dirent.h, but have sys/ndir.h. */
448 /* #undef SYSNDIR */
449
450 /* Define if you can safely include both <sys/time.h> and <time.h>. */
451 /* #undef TIME_WITH_SYS_TIME */
452
453 /* Define if your <sys/time.h> declares struct tm. */
454 /* #define TM_IN_SYS_TIME 1 */
455
456 /* Define to `int' if <sys/types.h> doesn't define. */
457 /* #undef uid_t */
458
459 /* Define if the closedir function returns void instead of int. */
460 /* #undef VOID_CLOSEDIR */
461
462 /* Define if getpgrp() must be called as getpgrp(0)
463 and (consequently) setpgrp() as setpgrp(0, 0). */
464 /* #undef GETPGRP_HAVE_ARGS */
465
466 /* Define this if your time.h defines altzone */
467 /* #define HAVE_ALTZONE */
468
469 /* Define if you have the putenv function. */
470 #define HAVE_PUTENV
471
472 /* Define if your compiler supports function prototypes */
473 #define HAVE_PROTOTYPES
474
475 /* Define if you can safely include both <sys/select.h> and <sys/time.h>
476 (which you can't on SCO ODT 3.0). */
477 /* #undef SYS_SELECT_WITH_SYS_TIME */
478
479 /* Define if you want documentation strings in extension modules */
480 #define WITH_DOC_STRINGS 1
481
482 /* Define if you want to compile in rudimentary thread support */
483 /* #undef WITH_THREAD */
484
485 /* Define if you want to use the GNU readline library */
486 /* #define WITH_READLINE 1 */
487
488 /* Use Python's own small-block memory-allocator. */
489 #define WITH_PYMALLOC 1
490
491 /* Define if you have clock. */
492 /* #define HAVE_CLOCK */
493
494 /* Define when any dynamic module loading is enabled */
495 #define HAVE_DYNAMIC_LOADING
496
497 /* Define if you have ftime. */
498 #define HAVE_FTIME
499
500 /* Define if you have getpeername. */
501 #define HAVE_GETPEERNAME
502
503 /* Define if you have getpgrp. */
504 /* #undef HAVE_GETPGRP */
505
506 /* Define if you have getpid. */
507 #define HAVE_GETPID
508
509 /* Define if you have gettimeofday. */
510 /* #undef HAVE_GETTIMEOFDAY */
511
512 /* Define if you have getwd. */
513 /* #undef HAVE_GETWD */
514
515 /* Define if you have lstat. */
516 /* #undef HAVE_LSTAT */
517
518 /* Define if you have the mktime function. */
519 #define HAVE_MKTIME
520
521 /* Define if you have nice. */
522 /* #undef HAVE_NICE */
523
524 /* Define if you have readlink. */
525 /* #undef HAVE_READLINK */
526
527 /* Define if you have setpgid. */
528 /* #undef HAVE_SETPGID */
529
530 /* Define if you have setpgrp. */
531 /* #undef HAVE_SETPGRP */
532
533 /* Define if you have setsid. */
534 /* #undef HAVE_SETSID */
535
536 /* Define if you have setvbuf. */
537 #define HAVE_SETVBUF
538
539 /* Define if you have siginterrupt. */
540 /* #undef HAVE_SIGINTERRUPT */
541
542 /* Define if you have symlink. */
543 /* #undef HAVE_SYMLINK */
544
545 /* Define if you have tcgetpgrp. */
546 /* #undef HAVE_TCGETPGRP */
547
548 /* Define if you have tcsetpgrp. */
549 /* #undef HAVE_TCSETPGRP */
550
551 /* Define if you have times. */
552 /* #undef HAVE_TIMES */
553
554 /* Define if you have uname. */
555 /* #undef HAVE_UNAME */
556
557 /* Define if you have waitpid. */
558 /* #undef HAVE_WAITPID */
559
560 /* Define to 1 if you have the `wcsftime' function. */
561 #if defined(_MSC_VER) && _MSC_VER >= 1310
562 #define HAVE_WCSFTIME 1
563 #endif
564
565 /* Define to 1 if you have the `wcscoll' function. */
566 #define HAVE_WCSCOLL 1
567
568 /* Define to 1 if you have the `wcsxfrm' function. */
569 #define HAVE_WCSXFRM 1
570
571 /* Define if the zlib library has inflateCopy */
572 #define HAVE_ZLIB_COPY 1
573
574 /* Define if you have the <dlfcn.h> header file. */
575 /* #undef HAVE_DLFCN_H */
576
577 /* Define to 1 if you have the <errno.h> header file. */
578 #define HAVE_ERRNO_H 1
579
580 /* Define if you have the <fcntl.h> header file. */
581 #define HAVE_FCNTL_H 1
582
583 /* Define to 1 if you have the <process.h> header file. */
584 #define HAVE_PROCESS_H 1
585
586 /* Define to 1 if you have the <signal.h> header file. */
587 #define HAVE_SIGNAL_H 1
588
589 /* Define if you have the <stdarg.h> prototypes. */
590 #define HAVE_STDARG_PROTOTYPES
591
592 /* Define if you have the <stddef.h> header file. */
593 #define HAVE_STDDEF_H 1
594
595 /* Define if you have the <sys/audioio.h> header file. */
596 /* #undef HAVE_SYS_AUDIOIO_H */
597
598 /* Define if you have the <sys/param.h> header file. */
599 /* #define HAVE_SYS_PARAM_H 1 */
600
601 /* Define if you have the <sys/select.h> header file. */
602 /* #define HAVE_SYS_SELECT_H 1 */
603
604 /* Define to 1 if you have the <sys/stat.h> header file. */
605 #define HAVE_SYS_STAT_H 1
606
607 /* Define if you have the <sys/time.h> header file. */
608 /* #define HAVE_SYS_TIME_H 1 */
609
610 /* Define if you have the <sys/times.h> header file. */
611 /* #define HAVE_SYS_TIMES_H 1 */
612
613 /* Define to 1 if you have the <sys/types.h> header file. */
614 #define HAVE_SYS_TYPES_H 1
615
616 /* Define if you have the <sys/un.h> header file. */
617 /* #define HAVE_SYS_UN_H 1 */
618
619 /* Define if you have the <sys/utime.h> header file. */
620 /* #define HAVE_SYS_UTIME_H 1 */
621
622 /* Define if you have the <sys/utsname.h> header file. */
623 /* #define HAVE_SYS_UTSNAME_H 1 */
624
625 /* Define if you have the <unistd.h> header file. */
626 /* #define HAVE_UNISTD_H 1 */
627
628 /* Define if you have the <utime.h> header file. */
629 /* #define HAVE_UTIME_H 1 */
630
631 /* Define if the compiler provides a wchar.h header file. */
632 #define HAVE_WCHAR_H 1
633
634 /* The size of `wchar_t', as computed by sizeof. */
635 #define SIZEOF_WCHAR_T 2
636
637 /* The size of `_Bool', as computed by sizeof. */
638 #define SIZEOF__BOOL 1
639
640 /* The size of `pid_t', as computed by sizeof. */
641 #define SIZEOF_PID_T SIZEOF_INT
642
643 /* Define if you have the dl library (-ldl). */
644 /* #undef HAVE_LIBDL */
645
646 /* Define if you have the mpc library (-lmpc). */
647 /* #undef HAVE_LIBMPC */
648
649 /* Define if you have the nsl library (-lnsl). */
650 #define HAVE_LIBNSL 1
651
652 /* Define if you have the seq library (-lseq). */
653 /* #undef HAVE_LIBSEQ */
654
655 /* Define if you have the socket library (-lsocket). */
656 #define HAVE_LIBSOCKET 1
657
658 /* Define if you have the sun library (-lsun). */
659 /* #undef HAVE_LIBSUN */
660
661 /* Define if you have the termcap library (-ltermcap). */
662 /* #undef HAVE_LIBTERMCAP */
663
664 /* Define if you have the termlib library (-ltermlib). */
665 /* #undef HAVE_LIBTERMLIB */
666
667 /* Define if you have the thread library (-lthread). */
668 /* #undef HAVE_LIBTHREAD */
669
670 /* WinSock does not use a bitmask in select, and uses
671 socket handles greater than FD_SETSIZE */
672 #define Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE
673
674 /* Define if C doubles are 64-bit IEEE 754 binary format, stored with the
675 least significant byte first */
676 #define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
677
678 /* Define to 1 if you have the `erf' function. */
679 #define HAVE_ERF 1
680
681 /* Define to 1 if you have the `erfc' function. */
682 #define HAVE_ERFC 1
683
684 /* Define if you have the 'inet_pton' function. */
685 #define HAVE_INET_PTON 1
686
687 /* framework name */
688 #define _PYTHONFRAMEWORK ""
689
690 /* Define if libssl has X509_VERIFY_PARAM_set1_host and related function */
691 #define HAVE_X509_VERIFY_PARAM_SET1_HOST 1
692
693 #endif /* !Py_CONFIG_H */


Secure Engine: Globals

Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:

- _ -

  • __iar_data_init3() : se_startup.c
  • __IS_CALLER_SE_IF : se_callgate.c
  • __IS_SE_LOCKED_SERVICES : se_callgate.c
  • __IS_SFU_RESERVED : se_interface_common.h

- b -

  • BusFault_Handler() : se_exception.c

- e -

  • eBootInfoStatus : se_bootinfo.c

- h -

  • HAL_Delay() : se_utils.c
  • HAL_GetTick() : se_utils.c
  • HardFault_Handler() : se_exception.c

- i -

  • IS_SE_CRYPTO_AES_GCM_NONCE_SIZE : se_crypto_common.h
  • IS_SE_CRYPTO_AES_GCM_TAG_SIZE : se_crypto_common.h
  • IS_SE_INFO_STATUS : se_bootinfo.c

- m -

  • m_uSE_SystemCoreClock : se_utils.c
  • m_xSE_AESGCMCtx : se_crypto_common.c
  • MemManage_Handler() : se_exception.c

- p -

  • primask_bit : se_interface_common.c

- s -

  • SE_APP_GET_ACTIVE_FW_INFO : se_callgate.h
  • SE_APP_GetActiveFwInfo() : se_interface_application.c
  • SE_APPLI_GetActiveFwInfo() : se_user_application.c
  • SE_AuthenticateFW_Append() : se_interface_bootloader.c
  • SE_AuthenticateFW_Finish() : se_interface_bootloader.c
  • SE_AuthenticateFW_Init() : se_interface_bootloader.c
  • SE_BOOT_INFO_ERR : se_def_core.h
  • SE_BOOT_INFO_ERR_FACTORY_RESET : se_def_core.h
  • SE_BOOT_INFO_READ_ALL_ID : se_callgate.h
  • SE_BOOT_INFO_WRITE_ALL_ID : se_callgate.h
  • SE_CallGate() : se_callgate.c
  • SE_CallGateService() : se_callgate.c
  • SE_CORE_Startup() : se_startup.c
  • SE_CRYPTO_AES_GCM_Decrypt_Append() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Decrypt_Finish() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Decrypt_Init() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Encrypt_Append() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Encrypt_Finish() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Encrypt_Init() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Header_Append() : se_crypto_common.c
  • SE_CRYPTO_HL_AUTHENTICATE_METADATA : se_callgate.h
  • SE_CRYPTO_LL_AUTHENTICATE_FW_APPEND_ID : se_callgate.h
  • SE_CRYPTO_LL_AUTHENTICATE_FW_FINISH_ID : se_callgate.h
  • SE_CRYPTO_LL_AUTHENTICATE_FW_INIT_ID : se_callgate.h
  • SE_CRYPTO_LL_DECRYPT_APPEND_ID : se_callgate.h
  • SE_CRYPTO_LL_DECRYPT_FINISH_ID : se_callgate.h
  • SE_CRYPTO_LL_DECRYPT_INIT_ID : se_callgate.h
  • SE_Decrypt_Append() : se_interface_bootloader.c
  • SE_Decrypt_Finish() : se_interface_bootloader.c
  • SE_Decrypt_Init() : se_interface_bootloader.c
  • SE_EnterSecureMode() : se_interface_common.c
  • SE_ERR_FLASH_READ : se_def_core.h
  • SE_ErrorStatus : se_def_core.h
  • SE_ExitSecureMode() : se_interface_common.c
  • SE_FunctionIDTypeDef : se_callgate.h
  • SE_IMG_ERASE : se_callgate.h
  • SE_IMG_Erase() : se_fwimg.c
  • SE_IMG_READ : se_callgate.h
  • SE_IMG_Read() : se_fwimg.c
  • SE_IMG_WRITE : se_callgate.h
  • SE_IMG_Write() : se_fwimg.c
  • SE_INFO_BootInfoAreaDeInit() : se_bootinfo.c
  • SE_INFO_BootInfoAreaFactoryReset() : se_bootinfo.c
  • SE_INFO_BootInfoAreaInit() : se_bootinfo.c
  • SE_INFO_NONE : se_bootinfo.c
  • SE_INFO_NOT_ACCESSED : se_bootinfo.h
  • SE_INFO_NOT_FOUND : se_bootinfo.h
  • SE_INFO_NOT_VALID : se_bootinfo.h
  • SE_INFO_ReadBootInfo() : se_interface_bootloader.c
  • SE_INFO_ReadBootInfoArea() : se_bootinfo.c
  • SE_INFO_RECOVERED : se_bootinfo.h
  • SE_INFO_StatusTypedef : se_bootinfo.h
  • SE_INFO_VALID : se_bootinfo.h
  • SE_INFO_WriteBootInfo() : se_interface_bootloader.c
  • SE_INFO_WriteBootInfoArea() : se_bootinfo.c
  • SE_Init() : se_interface_bootloader.c
  • SE_INIT_ERR : se_def_core.h
  • SE_INIT_ID : se_callgate.h
  • SE_KO : se_def_core.h
  • SE_LL_CRC_Check() : se_bootinfo.c
  • SE_LOCK_RESTRICT_SERVICES : se_callgate.h
  • SE_LockRestrictServices() : se_interface_bootloader.c
  • SE_LockStatus : se_callgate.c
  • SE_MDW_VERSION : se_interface_common.h
  • SE_MDW_VERSION_MAIN : se_interface_common.h
  • SE_MDW_VERSION_RC : se_interface_common.h
  • SE_MDW_VERSION_SUB1 : se_interface_common.h
  • SE_MDW_VERSION_SUB2 : se_interface_common.h
  • SE_MW_ADDON_KMS_MSB : se_callgate.h
  • SE_MW_ADDON_MSB_MASK : se_callgate.h
  • SE_NMI_ExceptionHandler() : se_exception.c
  • SE_OK : se_def_core.h
  • SE_ReadKey() : se_key.h
  • SE_ReadKey_Pairing() : se_key.h
  • SE_ReadKey_Pub() : se_key.h
  • SE_SetSystemCoreClock() : se_utils.c
  • SE_SFU_IMG_Erase() : se_interface_bootloader.c
  • SE_SFU_IMG_Read() : se_interface_bootloader.c
  • SE_SFU_IMG_Write() : se_interface_bootloader.c
  • SE_SIGNATURE_ERR : se_def_core.h
  • SE_SP_SMUGGLE() : se_callgate.c
  • SE_Startup() : se_interface_bootloader.c
  • SE_StatusTypeDef : se_def_core.h
  • SE_VerifyFwRawHeaderTag() : se_interface_bootloader.c
  • SET_CALLGATE : se_interface_common.h

- x -

  • xBootInfo : se_bootinfo.c
  • xBootInfoBackUp : se_bootinfo.c


Secure Engine: Globals

- _ -

  • __iar_data_init3() : se_startup.c

- b -

  • BusFault_Handler() : se_exception.c

- h -

  • HAL_Delay() : se_utils.c
  • HAL_GetTick() : se_utils.c
  • HardFault_Handler() : se_exception.c

- m -

  • MemManage_Handler() : se_exception.c

- s -

  • SE_APP_GetActiveFwInfo() : se_interface_application.c
  • SE_APPLI_GetActiveFwInfo() : se_user_application.c
  • SE_AuthenticateFW_Append() : se_interface_bootloader.c
  • SE_AuthenticateFW_Finish() : se_interface_bootloader.c
  • SE_AuthenticateFW_Init() : se_interface_bootloader.c
  • SE_CallGate() : se_callgate.c
  • SE_CallGateService() : se_callgate.c
  • SE_CORE_Startup() : se_startup.c
  • SE_CRYPTO_AES_GCM_Decrypt_Append() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Decrypt_Finish() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Decrypt_Init() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Encrypt_Append() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Encrypt_Finish() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Encrypt_Init() : se_crypto_common.c
  • SE_CRYPTO_AES_GCM_Header_Append() : se_crypto_common.c
  • SE_Decrypt_Append() : se_interface_bootloader.c
  • SE_Decrypt_Finish() : se_interface_bootloader.c
  • SE_Decrypt_Init() : se_interface_bootloader.c
  • SE_EnterSecureMode() : se_interface_common.c
  • SE_ExitSecureMode() : se_interface_common.c
  • SE_IMG_Erase() : se_fwimg.c
  • SE_IMG_Read() : se_fwimg.c
  • SE_IMG_Write() : se_fwimg.c
  • SE_INFO_BootInfoAreaDeInit() : se_bootinfo.c
  • SE_INFO_BootInfoAreaFactoryReset() : se_bootinfo.c
  • SE_INFO_BootInfoAreaInit() : se_bootinfo.c
  • SE_INFO_ReadBootInfo() : se_interface_bootloader.c
  • SE_INFO_ReadBootInfoArea() : se_bootinfo.c
  • SE_INFO_WriteBootInfo() : se_interface_bootloader.c
  • SE_INFO_WriteBootInfoArea() : se_bootinfo.c
  • SE_Init() : se_interface_bootloader.c
  • SE_LL_CRC_Check() : se_bootinfo.c
  • SE_LockRestrictServices() : se_interface_bootloader.c
  • SE_NMI_ExceptionHandler() : se_exception.c
  • SE_ReadKey() : se_key.h
  • SE_ReadKey_Pairing() : se_key.h
  • SE_ReadKey_Pub() : se_key.h
  • SE_SetSystemCoreClock() : se_utils.c
  • SE_SFU_IMG_Erase() : se_interface_bootloader.c
  • SE_SFU_IMG_Read() : se_interface_bootloader.c
  • SE_SFU_IMG_Write() : se_interface_bootloader.c
  • SE_SP_SMUGGLE() : se_callgate.c
  • SE_Startup() : se_interface_bootloader.c
  • SE_VerifyFwRawHeaderTag() : se_interface_bootloader.c


Secure Engine: Globals

  • eBootInfoStatus : se_bootinfo.c
  • m_uSE_SystemCoreClock : se_utils.c
  • m_xSE_AESGCMCtx : se_crypto_common.c
  • primask_bit : se_interface_common.c
  • xBootInfo : se_bootinfo.c
  • xBootInfoBackUp : se_bootinfo.c


Secure Engine: Globals

  • SE_FunctionIDTypeDef : se_callgate.h
  • SE_StatusTypeDef : se_def_core.h


Secure Engine: Globals

  • SE_ErrorStatus : se_def_core.h
  • SE_INFO_StatusTypedef : se_bootinfo.h
  • SE_LockStatus : se_callgate.c


Secure Engine: Globals

  • SE_INFO_NOT_ACCESSED : se_bootinfo.h
  • SE_INFO_NOT_FOUND : se_bootinfo.h
  • SE_INFO_NOT_VALID : se_bootinfo.h
  • SE_INFO_RECOVERED : se_bootinfo.h
  • SE_INFO_VALID : se_bootinfo.h


Secure Engine: Globals

- _ -

  • __IS_CALLER_SE_IF : se_callgate.c
  • __IS_SE_LOCKED_SERVICES : se_callgate.c
  • __IS_SFU_RESERVED : se_interface_common.h

- i -

  • IS_SE_CRYPTO_AES_GCM_NONCE_SIZE : se_crypto_common.h
  • IS_SE_CRYPTO_AES_GCM_TAG_SIZE : se_crypto_common.h
  • IS_SE_INFO_STATUS : se_bootinfo.c

- s -

  • SE_APP_GET_ACTIVE_FW_INFO : se_callgate.h
  • SE_BOOT_INFO_ERR : se_def_core.h
  • SE_BOOT_INFO_ERR_FACTORY_RESET : se_def_core.h
  • SE_BOOT_INFO_READ_ALL_ID : se_callgate.h
  • SE_BOOT_INFO_WRITE_ALL_ID : se_callgate.h
  • SE_CRYPTO_HL_AUTHENTICATE_METADATA : se_callgate.h
  • SE_CRYPTO_LL_AUTHENTICATE_FW_APPEND_ID : se_callgate.h
  • SE_CRYPTO_LL_AUTHENTICATE_FW_FINISH_ID : se_callgate.h
  • SE_CRYPTO_LL_AUTHENTICATE_FW_INIT_ID : se_callgate.h
  • SE_CRYPTO_LL_DECRYPT_APPEND_ID : se_callgate.h
  • SE_CRYPTO_LL_DECRYPT_FINISH_ID : se_callgate.h
  • SE_CRYPTO_LL_DECRYPT_INIT_ID : se_callgate.h
  • SE_ERR_FLASH_READ : se_def_core.h
  • SE_IMG_ERASE : se_callgate.h
  • SE_IMG_READ : se_callgate.h
  • SE_IMG_WRITE : se_callgate.h
  • SE_INFO_NONE : se_bootinfo.c
  • SE_INIT_ERR : se_def_core.h
  • SE_INIT_ID : se_callgate.h
  • SE_KO : se_def_core.h
  • SE_LOCK_RESTRICT_SERVICES : se_callgate.h
  • SE_MDW_VERSION : se_interface_common.h
  • SE_MDW_VERSION_MAIN : se_interface_common.h
  • SE_MDW_VERSION_RC : se_interface_common.h
  • SE_MDW_VERSION_SUB1 : se_interface_common.h
  • SE_MDW_VERSION_SUB2 : se_interface_common.h
  • SE_MW_ADDON_KMS_MSB : se_callgate.h
  • SE_MW_ADDON_MSB_MASK : se_callgate.h
  • SE_OK : se_def_core.h
  • SE_SIGNATURE_ERR : se_def_core.h
  • SET_CALLGATE : se_interface_common.h


Secure Engine: Data Structure Index

Data Structure Index
a | e | p | s
a
e
s
SE_FwRawHeaderTypeDef
SE_GCMInitTypeDef
AES_CBC (keys) ECDSA256P1 (keys) SE_APP_ActiveFwInfo_t
AES_GCM (keys)
p
SE_BootInfoTypeDef
PAIRING (keys)
a | e | p | s


Secure Engine: Main Page

Secure Engine Documentation


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_bootinfo.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_bootinfo.h
Go to the documentation of this file.
1
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef SE_BOOTINFO_H
22 #define SE_BOOTINFO_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* Includes ------------------------------------------------------------------*/
29 #include "se_def.h"
30
50 typedef enum
51 {
52 SE_INFO_NOT_ACCESSED = 0U,
53 SE_INFO_VALID,
54 SE_INFO_RECOVERED,
55 SE_INFO_NOT_FOUND,
56 SE_INFO_NOT_VALID,
57 } SE_INFO_StatusTypedef;
58
62 typedef struct
63 {
64 uint32_t LastExecStatus;
66 uint32_t LastExecError;
68 uint32_t ConsecutiveBootOnErrorCounter;
71 uint32_t CRC32;
74 } SE_BootInfoTypeDef;
75
87 SE_ErrorStatus SE_INFO_BootInfoAreaInit(SE_INFO_StatusTypedef *peBootInfoStatus);
88 SE_ErrorStatus SE_INFO_BootInfoAreaDeInit(void);
89
97 SE_ErrorStatus SE_INFO_BootInfoAreaFactoryReset(void);
98 SE_ErrorStatus SE_INFO_ReadBootInfoArea(SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus);
99 SE_ErrorStatus SE_INFO_WriteBootInfoArea(SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus);
120 #ifdef __cplusplus
121 }
122 #endif
123
124 #endif /* SE_BOOTINFO_H */
125
126 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
127
SE_INFO_RECOVERED
Definition: se_bootinfo.h:54
SE_INFO_NOT_ACCESSED
Definition: se_bootinfo.h:52
SE_INFO_StatusTypedef
SE_INFO_StatusTypedef
Specific the BootInfoArea status.
Definition: se_bootinfo.h:50
SE_BootInfoTypeDef::ConsecutiveBootOnErrorCounter
uint32_t ConsecutiveBootOnErrorCounter
Definition: se_bootinfo.h:68
SE_INFO_ReadBootInfoArea
SE_ErrorStatus SE_INFO_ReadBootInfoArea(SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus)
Read the xBootInfo area and return the BootInfoArea and the related status.
Definition: se_bootinfo.c:289
SE_BootInfoTypeDef::LastExecError
uint32_t LastExecError
Definition: se_bootinfo.h:66
SE_BootInfoTypeDef::LastExecStatus
uint32_t LastExecStatus
Definition: se_bootinfo.h:64
SE_INFO_BootInfoAreaInit
SE_ErrorStatus SE_INFO_BootInfoAreaInit(SE_INFO_StatusTypedef *peBootInfoStatus)
Initialize the global variable used by this module and the BootInfoArea Hardware (CRC, etc.).
Definition: se_bootinfo.c:151
SE_BootInfoTypeDef::CRC32
uint32_t CRC32
Definition: se_bootinfo.h:71
SE_INFO_NOT_VALID
Definition: se_bootinfo.h:56
SE_INFO_NOT_FOUND
Definition: se_bootinfo.h:55
SE_INFO_VALID
Definition: se_bootinfo.h:53
SE_INFO_BootInfoAreaFactoryReset
SE_ErrorStatus SE_INFO_BootInfoAreaFactoryReset(void)
Reset the BootInfo shared Area to factory value.
Definition: se_bootinfo.c:238
SE_INFO_WriteBootInfoArea
SE_ErrorStatus SE_INFO_WriteBootInfoArea(SE_BootInfoTypeDef *pxBootInfo, SE_INFO_StatusTypedef *peBootInfoStatus)
Write the passed BootInfo pointer into the xBootInfo area and return related status.
Definition: se_bootinfo.c:339
se_def.h
This file references the definitions for SE functionalities.
SE_BootInfoTypeDef
Specifies the BootInfo data structure.
Definition: se_bootinfo.h:62
SE_INFO_BootInfoAreaDeInit
SE_ErrorStatus SE_INFO_BootInfoAreaDeInit(void)
DeInitialize the BootInfoArea structure cleaning the SRAM, and the xBootInfo area access and the rela...
Definition: se_bootinfo.c:212
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54
Generated on Fri Jun 28 2019 10:23:41 for Secure Engine by doxygen 1.8.14


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_callgate.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_callgate.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_CALLGATE_H
23 #define SE_CALLGATE_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30 #include "se_def.h"
31
32
53 /*Generic functions*/
54 #define SE_INIT_ID (0x00UL)
56 /* CRYPTO Low level functions for bootloader only */
57 #define SE_CRYPTO_LL_DECRYPT_INIT_ID (0x04UL)
58 #define SE_CRYPTO_LL_DECRYPT_APPEND_ID (0x05UL)
59 #define SE_CRYPTO_LL_DECRYPT_FINISH_ID (0x06UL)
60 #define SE_CRYPTO_LL_AUTHENTICATE_FW_INIT_ID (0x07UL)
61 #define SE_CRYPTO_LL_AUTHENTICATE_FW_APPEND_ID (0x08UL)
62 #define SE_CRYPTO_LL_AUTHENTICATE_FW_FINISH_ID (0x09UL)
64 /* CRYPTO High level functions for bootloader only */
65 #define SE_CRYPTO_HL_AUTHENTICATE_METADATA (0x10UL)
67 /* Next ranges are kept for future use (additional crypto schemes, additional user code) */
68 #define SE_APP_GET_ACTIVE_FW_INFO (0x20UL)
71 /* BootInfo access functions (bootloader only) */
72 #define SE_BOOT_INFO_READ_ALL_ID (0x80UL)
73 #define SE_BOOT_INFO_WRITE_ALL_ID (0x81UL)
75 /* SE IMG interface (bootloader only) */
76 #define SE_IMG_READ (0x92UL)
77 #define SE_IMG_WRITE (0x93UL)
78 #define SE_IMG_ERASE (0x94UL)
80 /* LOCK service to be used by the bootloader only */
81 #define SE_LOCK_RESTRICT_SERVICES (0x100UL)
83 /* Secure Engine add-on middle wares */
84 #define SE_MW_ADDON_MSB_MASK (0x70000000U)
85 #define SE_MW_ADDON_KMS_MSB (0x10000000U)
88 typedef uint32_t SE_FunctionIDTypeDef;
101 SE_ErrorStatus SE_CallGate(SE_FunctionIDTypeDef eID, SE_StatusTypeDef *peSE_Status, ...);
102
119 #ifdef __cplusplus
120 }
121 #endif
122
123 #endif /* SE_CALLGATE_H */
124
125 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
se_def.h
This file references the definitions for SE functionalities.
Generated on Fri Jun 28 2019 10:23:41 for Secure Engine by doxygen 1.8.14


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_crypto_common.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_crypto_common.h
Go to the documentation of this file.
1
22 /* Define to prevent recursive inclusion -------------------------------------*/
23 #ifndef SE_CRYPTO_COMMON_H
24 #define SE_CRYPTO_COMMON_H
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 /* Includes ------------------------------------------------------------------*/
31 #include "se_def.h"
32
62 typedef struct
63 {
64 uint8_t *pNonce;
65 int32_t NonceSize;
66 uint8_t *pTag;
68 int32_t TagSize;
69 int32_t HeaderSize;
70 int32_t PayloadSize;
71 } SE_GCMInitTypeDef;
72
90 #define IS_SE_CRYPTO_AES_GCM_NONCE_SIZE(SIZE) ((SIZE) == SE_NONCE_LEN)
91 #define IS_SE_CRYPTO_AES_GCM_TAG_SIZE(SIZE) ((SIZE) == SE_TAG_LEN)
115 /*Low level functions*/
116 SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Init(const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit);
117 SE_ErrorStatus SE_CRYPTO_AES_GCM_Header_Append(const uint8_t *pInputBuffer, int32_t InputSize);
118 SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Append(const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer,
119 int32_t *pOutputSize);
120 SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Finish(uint8_t *pOutputBuffer, int32_t *pOutputSize);
121 SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Init(const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit);
122 SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Append(const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer,
123 int32_t *pOutputSize);
124 SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Finish(uint8_t *pOutputBuffer, int32_t *pOutputSize);
125
126 /*High level functions*/
127
156 #ifdef __cplusplus
157 }
158 #endif
159
160 #endif /* SE_CRYPTO_COMMON_H */
161
162 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
163
SE_GCMInitTypeDef::TagSize
int32_t TagSize
Definition: se_crypto_common.h:68
SE_CRYPTO_AES_GCM_Encrypt_Append
SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Append(const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Encrypt Append function. It is a wrapper of AES_GCM_Encrypt_Append function inc...
Definition: se_crypto_common.c:166
SE_GCMInitTypeDef::NonceSize
int32_t NonceSize
Definition: se_crypto_common.h:65
SE_GCMInitTypeDef::pTag
uint8_t * pTag
Definition: se_crypto_common.h:66
SE_CRYPTO_AES_GCM_Header_Append
SE_ErrorStatus SE_CRYPTO_AES_GCM_Header_Append(const uint8_t *pInputBuffer, int32_t InputSize)
Secure Engine AES GCM Header Append function. It is a wrapper of AES_GCM_Header_Append function inclu...
Definition: se_crypto_common.c:132
SE_CRYPTO_AES_GCM_Decrypt_Finish
SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Finish(uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Decrypt Finish function. It is a wrapper of AES_GCM_Decrypt_Finish function inc...
Definition: se_crypto_common.c:315
SE_GCMInitTypeDef::pNonce
uint8_t * pNonce
Definition: se_crypto_common.h:64
SE_CRYPTO_AES_GCM_Decrypt_Append
SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Append(const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Decrypt Append function. It is a wrapper of AES_GCM_Decrypt_Append function inc...
Definition: se_crypto_common.c:283
SE_GCMInitTypeDef
Secure Engine AES GCM structure definition.
Definition: se_crypto_common.h:62
SE_GCMInitTypeDef::PayloadSize
int32_t PayloadSize
Definition: se_crypto_common.h:70
se_def.h
This file references the definitions for SE functionalities.
SE_CRYPTO_AES_GCM_Encrypt_Finish
SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Finish(uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine AES GCM Encrypt Finish function. It is a wrapper of AES_GCM_Encrypt_Finish function inc...
Definition: se_crypto_common.c:198
SE_CRYPTO_AES_GCM_Decrypt_Init
SE_ErrorStatus SE_CRYPTO_AES_GCM_Decrypt_Init(const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit)
Secure Engine AES GCM Decrypt Init function. It is a wrapper of AES_GCM_Decrypt_Init function include...
Definition: se_crypto_common.c:229
SE_GCMInitTypeDef::HeaderSize
int32_t HeaderSize
Definition: se_crypto_common.h:69
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54
SE_CRYPTO_AES_GCM_Encrypt_Init
SE_ErrorStatus SE_CRYPTO_AES_GCM_Encrypt_Init(const uint8_t *pKey, SE_GCMInitTypeDef *pxSE_GCMInit)
Secure Engine AES GCM Encrypt Init function. It is a wrapper of AES_GCM_Encrypt_Init function include...
Definition: se_crypto_common.c:82
Generated on Fri Jun 28 2019 10:23:41 for Secure Engine by doxygen 1.8.14


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_def.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_def.h
Go to the documentation of this file.
1
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef SE_DEF_H
22 #define SE_DEF_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* Includes ------------------------------------------------------------------*/
29 #include <stdint.h>
30 #include "se_def_core.h"
31 #include "se_def_metadata.h" /* This is the instantiation of se_def_metadata_template.h in the SE_CoreBin project */
32
58 #ifdef __cplusplus
59 }
60 #endif
61
62 #endif /* SE_DEF_H */
63
64 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
65
se_def_core.h
This file contains core definitions for SE functionalities.
Generated on Fri Jun 28 2019 10:23:41 for Secure Engine by doxygen 1.8.14


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_def_core.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_def_core.h
Go to the documentation of this file.
1
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef SE_DEF_CORE_H
22 #define SE_DEF_CORE_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /* Includes ------------------------------------------------------------------*/
29
54 typedef enum
55 {
56 SE_ERROR = 0x00018799U,
57 SE_SUCCESS = 0x0012310FU
58 } SE_ErrorStatus;
59
64 #define SE_OK (0x0012e223UL)
65 #define SE_KO (0x0013023dUL)
66 #define SE_INIT_ERR (0x00130ce5UL)
67 #define SE_BOOT_INFO_ERR (0x00135705UL)
68 #define SE_BOOT_INFO_ERR_FACTORY_RESET (0x0013b424UL)
70 #define SE_SIGNATURE_ERR (0x00146ac1UL)
71 #define SE_ERR_FLASH_READ (0x0014b817UL)
73 typedef uint32_t SE_StatusTypeDef;
99 #ifdef __cplusplus
100 }
101 #endif
102
103 #endif /* SE_DEF_CORE_H */
104
105 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
106
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_fwimg.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_fwimg.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_FWIMG_H
23 #define SE_FWIMG_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
44 SE_ErrorStatus SE_IMG_Erase(void *pDestination, uint32_t Length);
45 SE_ErrorStatus SE_IMG_Read(void *pDestination, const void *pSource, uint32_t Length);
46 SE_ErrorStatus SE_IMG_Write(void *pDestination, const void *pSource, uint32_t Length);
47
64 #ifdef __cplusplus
65 }
66 #endif
67
68 #endif /* SE_FWIMG_H */
69 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
SE_IMG_Erase
SE_ErrorStatus SE_IMG_Erase(void *pDestination, uint32_t Length)
Erase a Flash protected area.
Definition: se_fwimg.c:111
SE_IMG_Read
SE_ErrorStatus SE_IMG_Read(void *pDestination, const void *pSource, uint32_t Length)
Read from Flash protected area.
Definition: se_fwimg.c:84
SE_IMG_Write
SE_ErrorStatus SE_IMG_Write(void *pDestination, const void *pSource, uint32_t Length)
Write in Flash protected area.
Definition: se_fwimg.c:55
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_application.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_interface_application.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_INTERFACE_APPLICATION_H
23 #define SE_INTERFACE_APPLICATION_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30
31 #include "se_def.h"
32 #include "se_user_application.h"
33
51 /*
52 * The functions below are demonstrating how the user application can use some SE services.
53 */
54
55 SE_ErrorStatus SE_APP_GetActiveFwInfo(SE_StatusTypeDef *peSE_Status, SE_APP_ActiveFwInfo_t *p_FwInfo);
56 #ifdef SFU_ISOLATE_SE_WITH_MPU
57 void SE_APP_SVC_Handler(uint32_t *args);
58 #endif /* SFU_ISOLATE_SE_WITH_MPU */
59
76 #ifdef __cplusplus
77 }
78 #endif
79
80 #endif /* SE_INTERFACE_APPLICATION_H */
81
82 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
83
SE_APP_ActiveFwInfo_t
Firmware Information structure definition. This structure is used to retrieve some information about ...
Definition: se_user_application.h:53
SE_StatusTypeDef
uint32_t SE_StatusTypeDef
Definition: se_def_core.h:74
se_user_application.h
SE_APP_GetActiveFwInfo
__root SE_ErrorStatus SE_APP_GetActiveFwInfo(SE_StatusTypeDef *peSE_Status, SE_APP_ActiveFwInfo_t *p_FwInfo)
Service called by the User Application to retrieve the Active Firmware Info.
Definition: se_interface_application.c:80
se_def.h
This file references the definitions for SE functionalities.
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_bootloader.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_interface_bootloader.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_INTERFACE_BOOTLOADER_H
23 #define SE_INTERFACE_BOOTLOADER_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30 #include "se_def.h"
31 #include "se_bootinfo.h"
32
49 /* SE Initialization functions */
50 SE_ErrorStatus SE_Init(SE_StatusTypeDef *peSE_Status, uint32_t uSystemCoreClock);
51 SE_ErrorStatus SE_Startup(void);
52
53 /* BootInfo handlers */
54 SE_ErrorStatus SE_INFO_ReadBootInfo(SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo);
55 SE_ErrorStatus SE_INFO_WriteBootInfo(SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo);
56
57 /* Lock function to prevent the user-app from running bootloader reserved code */
58 SE_ErrorStatus SE_LockRestrictServices(SE_StatusTypeDef *pSE_Status);
59
60 /* Images handling functions */
61 SE_ErrorStatus SE_SFU_IMG_Erase(SE_StatusTypeDef *pSE_Status, void *pDestination, uint32_t Length);
62 SE_ErrorStatus SE_SFU_IMG_Read(SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length);
63 SE_ErrorStatus SE_SFU_IMG_Write(SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length);
64 SE_ErrorStatus SE_VerifyFwRawHeaderTag(SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxFwRawHeader);
65
66 /* Crypto-agnostic functions */
67 SE_ErrorStatus SE_Decrypt_Init(SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType);
68 SE_ErrorStatus SE_Decrypt_Append(SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize,
69 uint8_t *pOutputBuffer, int32_t *pOutputSize);
70 SE_ErrorStatus SE_Decrypt_Finish(SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize);
71 SE_ErrorStatus SE_AuthenticateFW_Init(SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata,
72 int32_t SE_FwType);
73 SE_ErrorStatus SE_AuthenticateFW_Append(SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize,
74 uint8_t *pOutputBuffer, int32_t *pOutputSize);
75 SE_ErrorStatus SE_AuthenticateFW_Finish(SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize);
76
93 #ifdef __cplusplus
94 }
95 #endif
96
97 #endif /* SE_INTERFACE_BOOTLOADER_H */
98
99 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
SE_Startup
SE_ErrorStatus SE_Startup(void)
Secure Engine Startup function. This function initializes the SE Core binary. This function must be c...
Definition: se_interface_bootloader.c:124
SE_SFU_IMG_Erase
SE_ErrorStatus SE_SFU_IMG_Erase(SE_StatusTypeDef *pSE_Status, void *pDestination, uint32_t Length)
call by SFU to erase a flash protected area
Definition: se_interface_bootloader.c:352
SE_FwRawHeaderTypeDef
Secure Engine crypto structure definition There must be a Firmware Header structure definition This s...
Definition: se_def_metadata_template.h:84
SE_INFO_WriteBootInfo
SE_ErrorStatus SE_INFO_WriteBootInfo(SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo)
call by SFU to write Info Boot inside the protected area.
Definition: se_interface_bootloader.c:200
SE_Init
SE_ErrorStatus SE_Init(SE_StatusTypeDef *peSE_Status, uint32_t uSystemCoreClock)
Secure Engine initialization function. This function initialize all the internals module of the Secur...
Definition: se_interface_bootloader.c:89
SE_AuthenticateFW_Finish
SE_ErrorStatus SE_AuthenticateFW_Finish(SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Firmware Authentication Finish function. It is a wrapper of AuthenticateFW_Finish funct...
Definition: se_interface_bootloader.c:637
SE_LockRestrictServices
SE_ErrorStatus SE_LockRestrictServices(SE_StatusTypeDef *pSE_Status)
call by SFU to lock part of Secure Engine services
Definition: se_interface_bootloader.c:239
SE_VerifyFwRawHeaderTag
SE_ErrorStatus SE_VerifyFwRawHeaderTag(SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxFwRawHeader)
Secure Engine Verify Raw Fw Header Tag. It verifies the signature of a raw header file...
Definition: se_interface_bootloader.c:682
SE_INFO_ReadBootInfo
SE_ErrorStatus SE_INFO_ReadBootInfo(SE_StatusTypeDef *peSE_Status, SE_BootInfoTypeDef *pxSE_BootInfo)
call by SFU to read Info Boot inside the protected area.
Definition: se_interface_bootloader.c:160
SE_AuthenticateFW_Append
SE_ErrorStatus SE_AuthenticateFW_Append(SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Firmware Authentication Append function. It is a wrapper of AuthenticateFW_Append funct...
Definition: se_interface_bootloader.c:590
SE_StatusTypeDef
uint32_t SE_StatusTypeDef
Definition: se_def_core.h:74
SE_AuthenticateFW_Init
SE_ErrorStatus SE_AuthenticateFW_Init(SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType)
Secure Engine Firmware Authentication Init function. It is a wrapper of AuthenticateFW_Init function ...
Definition: se_interface_bootloader.c:536
SE_Decrypt_Append
SE_ErrorStatus SE_Decrypt_Append(SE_StatusTypeDef *peSE_Status, const uint8_t *pInputBuffer, int32_t InputSize, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Decrypt Append function. It is a wrapper of Decrypt_Append function included in the pro...
Definition: se_interface_bootloader.c:445
SE_Decrypt_Init
SE_ErrorStatus SE_Decrypt_Init(SE_StatusTypeDef *peSE_Status, SE_FwRawHeaderTypeDef *pxSE_Metadata, int32_t SE_FwType)
Secure Engine Decrypt Init function. It is a wrapper of Decrypt_Init function included in the protect...
Definition: se_interface_bootloader.c:393
SE_SFU_IMG_Write
SE_ErrorStatus SE_SFU_IMG_Write(SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length)
call by SFU to write a flash protected area
Definition: se_interface_bootloader.c:316
se_bootinfo.h
This file contains definitions for SE BootInfo functionalities.
SE_Decrypt_Finish
SE_ErrorStatus SE_Decrypt_Finish(SE_StatusTypeDef *peSE_Status, uint8_t *pOutputBuffer, int32_t *pOutputSize)
Secure Engine Decrypt Finish function. It is a wrapper of Decrypt_Finish function included in the pro...
Definition: se_interface_bootloader.c:491
se_def.h
This file references the definitions for SE functionalities.
SE_SFU_IMG_Read
SE_ErrorStatus SE_SFU_IMG_Read(SE_StatusTypeDef *pSE_Status, void *pDestination, const void *pSource, uint32_t Length)
call by SFU to read flash protected area
Definition: se_interface_bootloader.c:274
SE_BootInfoTypeDef
Specifies the BootInfo data structure.
Definition: se_bootinfo.h:62
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_interface_common.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_interface_common.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_INTERFACE_COMMON_H
23 #define SE_INTERFACE_COMMON_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30 #if defined (__ICCARM__) || defined(__GNUC__)
31 #include "mapping_export.h"
32 #elif defined(__CC_ARM)
33 #include "mapping_sbsfu.h"
34 #endif /* (__ICCARM__) || (__GNUC__) */
35 #include "se_def.h"
55 #define SE_MDW_VERSION_MAIN (0x01U)
56 #define SE_MDW_VERSION_SUB1 (0x00U)
57 #define SE_MDW_VERSION_SUB2 (0x00U)
58 #define SE_MDW_VERSION_RC (0x00U)
59 #define SE_MDW_VERSION ((SE_MDW_VERSION_MAIN << 24U)\
60 |(SE_MDW_VERSION_SUB1 << 16U)\
61 |(SE_MDW_VERSION_SUB2 << 8U )\
62 |(SE_MDW_VERSION_RC))
76 #define __IS_SFU_RESERVED() \
77 do{ \
78 if ((__get_LR())< SB_REGION_ROM_START){\
79 return SE_ERROR;}\
80 if ((__get_LR())> SB_REGION_ROM_END){\
81 return SE_ERROR;}\
82 }while(0)
83
89 #define SET_CALLGATE() \
90 SE_ErrorStatus(*SE_CallGatePtr)(SE_FunctionIDTypeDef ID, SE_StatusTypeDef *peSE_Status, \
91 ...); \
92 SE_CallGatePtr = (SE_ErrorStatus(*)(SE_FunctionIDTypeDef, SE_StatusTypeDef *, \
93 ...))((uint32_t) SE_CALLGATE_REGION_ROM_START + 1U);
94
109 void SE_EnterSecureMode(void);
110 void SE_ExitSecureMode(void);
111
116 #if defined(SFU_ISOLATE_SE_WITH_MPU)
117
123 uint32_t SE_IsUnprivileged(void);
124 void SE_SysCall(SE_ErrorStatus *e_ret_status, uint32_t syscall, SE_StatusTypeDef *peSE_Status, void *params);
125 void SE_SVC_Handler(uint32_t *args);
129 #endif /* SFU_ISOLATE_SE_WITH_MPU */
130
131
149 #ifdef __cplusplus
150 }
151 #endif
152
153 #endif /* SE_INTERFACE_COMMON_H */
154
155 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
156
SE_EnterSecureMode
void SE_EnterSecureMode(void)
SE Enter Secure Mode.
Definition: se_interface_common.c:79
SE_ExitSecureMode
void SE_ExitSecureMode(void)
SE Exit Secure Mode.
Definition: se_interface_common.c:93
SE_StatusTypeDef
uint32_t SE_StatusTypeDef
Definition: se_def_core.h:74
se_def.h
This file references the definitions for SE functionalities.
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Key/se_key.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Key
se_key.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_KEY_H
23 #define SE_KEY_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30 #include <stdint.h>
31
53 void SE_ReadKey(uint8_t *pKey);
59 void SE_ReadKey_Pub(uint8_t *pPubKey);
65 void SE_ReadKey_Pairing(uint8_t *pPairingKey);
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif /* SE_KEY_H */
83
84 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
85
SE_ReadKey_Pub
void SE_ReadKey_Pub(uint8_t *pPubKey)
Function to retrieve the public asymmetric key.
SE_ReadKey_Pairing
void SE_ReadKey_Pairing(uint8_t *pPairingKey)
Function to retrieve the external token pairing keys.
SE_ReadKey
void SE_ReadKey(uint8_t *pKey)
Function to retrieve the symmetric key.


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_startup.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_startup.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_STARTUP_H
23 #define SE_STARTUP_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30
46 SE_ErrorStatus SE_CORE_Startup(void);
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif /* SE_STARTUP_H */
68
69 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
70
SE_CORE_Startup
__root SE_ErrorStatus SE_CORE_Startup(void)
Secure Engine Core Startup function. It is the initialization function for Secure Engine Core binary...
Definition: se_startup.c:67
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_user_application.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_user_application.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_USER_APPLICATION_H
23 #define SE_USER_APPLICATION_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30 #include "se_def.h"
31
53 typedef struct
54 {
55 uint16_t ActiveFwVersion;
56 uint32_t ActiveFwSize;
57 } SE_APP_ActiveFwInfo_t;
58
67 SE_ErrorStatus SE_APPLI_GetActiveFwInfo(SE_APP_ActiveFwInfo_t *p_FwInfo);
68
86 #ifdef __cplusplus
87 }
88 #endif
89
90 #endif /* SE_USER_APPLICATION_H */
91
92 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
93
SE_APP_ActiveFwInfo_t
Firmware Information structure definition. This structure is used to retrieve some information about ...
Definition: se_user_application.h:53
SE_APPLI_GetActiveFwInfo
SE_ErrorStatus SE_APPLI_GetActiveFwInfo(SE_APP_ActiveFwInfo_t *p_FwInfo)
Service called by the User Application to retrieve the Active Firmware Info.
Definition: se_user_application.c:51
SE_APP_ActiveFwInfo_t::ActiveFwVersion
uint16_t ActiveFwVersion
Definition: se_user_application.h:55
se_def.h
This file references the definitions for SE functionalities.
SE_APP_ActiveFwInfo_t::ActiveFwSize
uint32_t ActiveFwSize
Definition: se_user_application.h:56
SE_ErrorStatus
SE_ErrorStatus
Secure Engine Error definition.
Definition: se_def_core.h:54


Secure Engine: C:/git/sbsfu_master/Firmware/Middlewares/ST/STM32_Secure_Engine/Core/se_utils.h Source File

  • Firmware
  • Middlewares
  • ST
  • STM32_Secure_Engine
  • Core
se_utils.h
Go to the documentation of this file.
1
21 /* Define to prevent recursive inclusion -------------------------------------*/
22 #ifndef SE_UTILS_H
23 #define SE_UTILS_H
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28
29 /* Includes ------------------------------------------------------------------*/
30 #include "se_def.h"
31
47 void SE_SetSystemCoreClock(uint32_t uSystemCoreClock);
48
65 #ifdef __cplusplus
66 }
67 #endif
68
69 #endif /* SE_UTILS_H */
70
71 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
72
SE_SetSystemCoreClock
void SE_SetSystemCoreClock(uint32_t uSystemCoreClock)
Set Secure Engine SystemCoreClock variable.
Definition: se_utils.c:57
se_def.h
This file references the definitions for SE functionalities.