Miscellaneous Functions
Functions |
fsl_shw_pco_t * | fsl_shw_get_capabilities (fsl_shw_uco_t *user_ctx) |
fsl_shw_return_t | fsl_shw_register_user (fsl_shw_uco_t *user_ctx) |
fsl_shw_return_t | fsl_shw_deregister_user (fsl_shw_uco_t *user_ctx) |
fsl_shw_return_t | fsl_shw_get_results (fsl_shw_uco_t *user_ctx, uint16_t result_size, fsl_shw_result_t results[], uint16_t *result_count) |
void * | fsl_shw_smalloc (fsl_shw_uco_t *user_ctx, uint32_t size, const uint8_t *UMID, uint32_t permissions) |
fsl_shw_return_t | fsl_shw_sfree (fsl_shw_uco_t *user_ctx, void *address) |
fsl_shw_return_t | fsl_shw_diminish_perms (fsl_shw_uco_t *user_ctx, void *address, uint32_t permissions) |
fsl_shw_return_t | do_scc_encrypt_region (fsl_shw_uco_t *user_ctx, void *partition_base, uint32_t offset_bytes, uint32_t byte_count, uint8_t *black_data, uint32_t *IV, fsl_shw_cypher_mode_t cypher_mode) |
fsl_shw_return_t | do_scc_decrypt_region (fsl_shw_uco_t *user_ctx, void *partition_base, uint32_t offset_bytes, uint32_t byte_count, const uint8_t *black_data, uint32_t *IV, fsl_shw_cypher_mode_t cypher_mode) |
Detailed Description
These functions are neither Operational Functions nor Object-Manipulation Operations. Their behavior does not depend upon the flags in the fsl_shw_uco_t, yet they may involve more interaction with the library and the kernel than simply querying an object.
Function Documentation
Decrypt a region of secure memory using the hardware secret key.
- Parameters:
-
| user_ctx | User context |
| partition_base | Base address of the partition |
| offset_bytes | Offset of data from the partition base |
| byte_count | Length of the data to encrypt |
| black_data | Location to store the encrypted data |
| IV | IV to use for the encryption routine |
| cypher_mode | Cyphering mode to use, specified by type fsl_shw_cypher_mode_t |
- Returns:
- A return code of type fsl_shw_return_t.
Call the proper function to decrypt a region of encrypted secure memory
- Parameters:
-
| user_ctx | User context of the partition owner (NULL in kernel) |
| partition_base | Base address (physical) of the partition |
| offset_bytes | Offset from base address that the decrypted data shall be placed |
| byte_count | Length of the message (bytes) |
| black_data | Pointer to where the encrypted data is stored |
| IV | IV to use for decryption |
| cypher_mode | Cyphering mode to use, specified by type fsl_shw_cypher_mode_t |
- Returns:
- status
Call the proper function to decrypt a region of encrypted secure memory
- Parameters:
-
| user_ctx | User context of the partition owner (NULL in kernel) |
| partition_base | Base address (physical) of the partition |
| offset_bytes | Offset from base address that the decrypted data shall be placed |
| byte_count | Length of the message (bytes) |
| black_data | Pointer to where the encrypted data is stored |
| owner_id | |
- Returns:
- status
Encrypt a region of secure memory using the hardware secret key.
- Parameters:
-
| user_ctx | User context |
| partition_base | Base address of the partition |
| offset_bytes | Offset of data from the partition base |
| byte_count | Length of the data to encrypt |
| black_data | Location to store the encrypted data |
| IV | IV to use for the encryption routine |
| cypher_mode | Cyphering mode to use, specified by type fsl_shw_cypher_mode_t |
- Returns:
- A return code of type fsl_shw_return_t.
Call the proper function to encrypt a region of encrypted secure memory
- Parameters:
-
| user_ctx | User context of the partition owner (NULL in kernel) |
| partition_base | Base address (physical) of the partition |
| offset_bytes | Offset from base address of the data to be encrypted |
| byte_count | Length of the message (bytes) |
| black_data | Pointer to where the encrypted data is stored |
| IV | IV to use for encryption |
| cypher_mode | Cyphering mode to use, specified by type fsl_shw_cypher_mode_t |
- Returns:
- status
- Parameters:
-
| user_ctx | User context |
| partition_base | Base address of the partition |
| offset_bytes | Offset of data from the partition base |
| byte_count | Length of the data to encrypt |
| black_data | Location to store the encrypted data |
| IV | IV to use for the encryption routine |
| cypher_mode | Cyphering mode to use, specified by type fsl_shw_cypher_mode_t |
- Returns:
- A return code of type fsl_shw_return_t.
Call the proper function to encrypt a region of encrypted secure memory
- Parameters:
-
| user_ctx | User context of the partition owner (NULL in kernel) |
| partition_base | Base address (physical) of the partition |
| offset_bytes | Offset from base address of the data to be encrypted |
| byte_count | Length of the message (bytes) |
| black_data | Pointer to where the encrypted data is stored |
| IV | IV to use for encryption |
| cypher_mode | Cyphering mode to use, specified by type fsl_shw_cypher_mode_t |
- Returns:
- status
Destroy the association between the user and the provider of the API.
- Parameters:
-
| user_ctx | The user context which is no longer needed. |
- Returns:
- A return code of type fsl_shw_return_t.
Destroy the association between the the user and the provider of the API.
- Parameters:
-
| user_ctx | The user context which is no longer needed. |
- Returns:
- A return code of type fsl_shw_return_t.
Diminish the permissions of a block of secure memory. Note that permissions can only be revoked.
- Parameters:
-
| user_ctx | User context |
| address | Base address of the secure memory to work with |
| permissions | Permissions to initialize the partition with. Can be made by ORing flags from the fsl_shw_permission_t. |
- Returns:
- A return code of type fsl_shw_return_t.
Determine the hardware security capabilities of this platform.
Though a user context object is passed into this function, it will always act in a non-blocking manner.
- Parameters:
-
| user_ctx | The user context which will be used for the query. |
- Returns:
- A pointer to the capabilities object.
Retrieve results from earlier operations.
- Parameters:
-
| user_ctx | The user's context. |
| result_size | The number of array elements of results. |
[in,out] | results | Pointer to first of the (array of) locations to store results. |
[out] | result_count | Pointer to store the number of results which were returned. |
- Returns:
- A return code of type fsl_shw_return_t.
Create an association between the user and the provider of the API.
- Parameters:
-
| user_ctx | The user context which will be used for this association. |
- Returns:
- A return code of type fsl_shw_return_t.
Create an association between the the user and the provider of the API.
- Parameters:
-
| user_ctx | The user context which will be used for this association. |
- Returns:
- A return code of type fsl_shw_return_t.
Free a block of secure memory that was allocated with fsl_shw_smalloc
- Parameters:
-
| user_ctx | User context |
| address | Address of the block of secure memory to be released. |
- Returns:
- A return code of type fsl_shw_return_t.
void* fsl_shw_smalloc |
( |
fsl_shw_uco_t * |
user_ctx, |
|
|
uint32_t |
size, |
|
|
const uint8_t * |
UMID, |
|
|
uint32_t |
permissions | |
|
) |
| | |
Allocate a block of secure memory
- Parameters:
-
| user_ctx | User context |
| size | Memory size (octets). Note: currently only supports only single-partition sized blocks. |
| UMID | User Mode ID to use when registering the partition. |
| permissions | Permissions to initialize the partition with. Can be made by ORing flags from the fsl_shw_permission_t. |
- Returns:
- Address of the allocated memory. NULL if the call was not successful.