Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

sf_util.c File Reference


Detailed Description

Security Functions component API - Utility functions.

These are the 'Sahara api' functions which are used by the higher-level FSL SHW API to build and then execute descriptor chains.

Definition in file sf_util.c.

#include "sf_util.h"
#include <adaptor.h>

Go to the source code of this file.

Functions

fsl_shw_return_t sah_add_in_key_desc (uint32_t header, const uint8_t *in1, uint32_t in1_length, fsl_shw_sko_t *key_info, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_add_in_keyout_desc (uint32_t header, const uint8_t *in1, uint32_t in1_length, fsl_shw_sko_t *key_info, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_add_in_out_desc (uint32_t header, const uint8_t *in, uint32_t in_length, uint8_t *out, uint32_t out_length, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_add_key_key_desc (uint32_t header, fsl_shw_sko_t *key_info1, fsl_shw_sko_t *key_info2, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_add_key_out_desc (uint32_t header, const fsl_shw_sko_t *key_info, uint8_t *out, uint32_t out_length, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_add_out_in_desc (uint32_t header, uint8_t *out1, uint32_t out1_length, const uint8_t *in2, uint32_t in2_length, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_add_two_d_desc (uint32_t header, const uint8_t *in1, uint32_t in1_length, const uint8_t *in2, uint32_t in2_length, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_add_two_in_desc (uint32_t header, const uint8_t *in1, uint32_t in1_length, const uint8_t *in2, uint32_t in2_length, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_add_two_out_desc (uint32_t header, uint8_t *out1, uint32_t out1_length, uint8_t *out2, uint32_t out2_length, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain)
fsl_shw_return_t sah_Append_Desc (const sah_Mem_Util *mu, sah_Head_Desc **desc_head, const uint32_t header, sah_Link *link1, sah_Link *link2)
 Create and append descriptor chain, inserting header and links pointing to link1 and link2.
fsl_shw_return_t sah_Append_Link (const sah_Mem_Util *mu, sah_Link *link_head, uint8_t *p, const size_t length, const sah_Link_Flags flags)
 Allocate Memory for Link structure and append it to the end of the link chain.
static fsl_shw_return_t sah_Create_Desc (const sah_Mem_Util *mu, sah_Desc **desc, int head, uint32_t header, sah_Link *link1, sah_Link *link2)
fsl_shw_return_t sah_Create_Key_Link (const sah_Mem_Util *mu, sah_Link **link, fsl_shw_sko_t *key_info)
 Allocate Memory for Link structure and populate using key info object.
fsl_shw_return_t sah_Create_Link (const sah_Mem_Util *mu, sah_Link **link, uint8_t *p, const size_t length, const sah_Link_Flags flags)
 Allocate Memory for Link structure and populate using input parameters.
void sah_Descriptor_Chain_Destroy (const sah_Mem_Util *mu, sah_Head_Desc **desc_head)
 Destroy a descriptor chain and free memory of associated links.
fsl_shw_return_t sah_Descriptor_Chain_Execute (sah_Head_Desc *head, fsl_shw_uco_t *user_ctx)
 Execute a descriptor chain.
void sah_Destroy_Link (const sah_Mem_Util *mu, sah_Link *link)
void sah_Postprocess_Results (fsl_shw_uco_t *user_ctx, sah_results *result_info)
static fsl_shw_return_t sah_rework_link_chain (const sah_Mem_Util *mu, sah_Link *link)
 Reworks the link chain.
static fsl_shw_return_t sah_rework_links (const sah_Mem_Util *mu, sah_Head_Desc *head)
fsl_shw_return_t sah_validate_uco (fsl_shw_uco_t *uco)
 Verify the user context object.

Variables

const uint32_t sah_insert_mdha_algorithm []
const uint32_t sah_insert_skha_algorithm []
const uint32_t sah_insert_skha_mode []
const uint32_t sah_insert_skha_modulus []


Generated by  Doxygen 1.6.0   Back to index