Header for Sahara Descriptor-chain building Functions. More...
Defines | |
#define | SAH_HDR_SKHA_SET_MODE_IV_KEY 0x10880000 |
#define | SAH_HDR_SKHA_SET_MODE_ENC_DEC 0x108D0000 |
#define | SAH_HDR_SKHA_ENC_DEC 0x90850000 |
#define | SAH_HDR_SKHA_READ_CONTEXT_IV 0x10820000 |
#define | SAH_HDR_MDHA_SET_MODE_MD_KEY 0x20880000 |
#define | SAH_HDR_MDHA_SET_MODE_HASH 0x208D0000 |
#define | SAH_HDR_MDHA_HASH 0xA0850000 |
#define | SAH_HDR_MDHA_STORE_DIGEST 0x20820000 |
#define | SAH_HDR_RNG_GENERATE 0x308C0000 |
#define | SAH_HDR_PKHA_LD_N_E 0xC0800000 |
#define | SAH_HDR_PKHA_LD_A_EX_ST_B 0x408D0000 |
#define | SAH_HDR_PKHA_LD_N_EX_ST_B 0x408E0000 |
#define | SAH_HDR_PKHA_LD_A_B 0xC0830000 |
#define | SAH_HDR_PKHA_LD_A0_A1 0x40840000 |
#define | SAH_HDR_PKHA_LD_A2_A3 0xC0850000 |
#define | SAH_HDR_PKHA_LD_B0_B1 0xC0860000 |
#define | SAH_HDR_PKHA_LD_B2_B3 0x40870000 |
#define | SAH_HDR_PKHA_ST_A_B 0x40820000 |
#define | SAH_HDR_PKHA_ST_A0_A1 0x40880000 |
#define | SAH_HDR_PKHA_ST_A2_A3 0xC0890000 |
#define | SAH_HDR_PKHA_ST_B0_B1 0xC08A0000 |
#define | SAH_HDR_PKHA_ST_B2_B3 0x408B0000 |
#define | SAH_HDR_PKHA_EX_ST_B1 0xC08C0000 |
#define | SAH_HDR_ARC4_SET_MODE_SBOX 0x90890000 |
#define | SAH_HDR_ARC4_READ_SBOX 0x90860000 |
#define | SAH_HDR_ARC4_SET_MODE_KEY 0x90830000 |
#define | SAH_HDR_PKHA_LD_A3_B0 0x40810000 |
#define | SAH_HDR_PKHA_ST_B1_B2 0xC08F0000 |
#define | SAH_HDR_SKHA_CBC_ICV 0x10840000 |
#define | SAH_HDR_MDHA_ICV_CHECK 0xA08A0000 |
#define | SAH_HDR_LLO 0x01000000 |
#define | DESC_IN_IN(hdr, len1, ptr1, len2, ptr2) |
#define | DESC_D_D(hdr, len1, ptr1, len2, ptr2) |
#define | DESC_IN_KEY(hdr, len1, ptr1, key2) |
#define | DESC_IN_OUT(hdr, len1, ptr1, len2, ptr2) |
#define | DESC_IN_KEYOUT(hdr, len1, ptr1, key2) |
#define | DESC_KEY_OUT(hdr, key1, len2, ptr2) |
#define | DESC_OUT_OUT(hdr, len1, ptr1, len2, ptr2) |
#define | DESC_OUT_IN(hdr, len1, ptr1, len2, ptr2) |
#define | sah_insert_skha_modulus_128 0x00001e00 |
#define | sah_insert_rng_gen_seed 0x80000001 |
#define | sah_insert_pkha_soft_err_false 0x80000200 |
Functions | |
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_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_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_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_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_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_in_keyout_desc (uint32_t header, const uint8_t *in, uint32_t in_length, fsl_shw_sko_t *key_info, 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 *out, uint32_t out_length, const uint8_t *in, uint32_t in_length, const sah_Mem_Util *mu, sah_Head_Desc **desc_chain) |
fsl_shw_return_t | sah_validate_uco (fsl_shw_uco_t *uco) |
Header for Sahara Descriptor-chain building Functions.
#define DESC_D_D | ( | hdr, | |||
len1, | |||||
ptr1, | |||||
len2, | |||||
ptr2 | ) |
{ \ ret = sah_add_two_d_desc(hdr, ptr1, len1, ptr2, len2, \ user_ctx->mem_util, &desc_chain); \ if (ret != FSL_RETURN_OK_S) { \ goto out; \ } \ }
Add Descriptor with two vectors
#define DESC_IN_IN | ( | hdr, | |||
len1, | |||||
ptr1, | |||||
len2, | |||||
ptr2 | ) |
{ \ ret = sah_add_two_in_desc(hdr, ptr1, len1, ptr2, len2, \ user_ctx->mem_util, &desc_chain); \ if (ret != FSL_RETURN_OK_S) { \ goto out; \ } \ }
Add Descriptor with two inputs
Referenced by fsl_shw_add_entropy(), fsl_shw_auth_decrypt(), fsl_shw_gen_encrypt(), fsl_shw_hash(), and fsl_shw_hmac().
#define DESC_IN_KEY | ( | hdr, | |||
len1, | |||||
ptr1, | |||||
key2 | ) |
{ \ ret = sah_add_in_key_desc(hdr, ptr1, len1, key2, \ user_ctx->mem_util, &desc_chain); \ if (ret != FSL_RETURN_OK_S) { \ goto out; \ } \ }
Add Descriptor with input and a key
Referenced by fsl_shw_auth_decrypt(), fsl_shw_gen_encrypt(), and fsl_shw_hmac().
#define DESC_IN_KEYOUT | ( | hdr, | |||
len1, | |||||
ptr1, | |||||
key2 | ) |
{ \ ret = sah_add_in_keyout_desc(hdr, ptr1, len1, key2, \ user_ctx->mem_util, &desc_chain); \ if (ret != FSL_RETURN_OK_S) { \ goto out; \ } \ }
Add Descriptor with input and a key output
#define DESC_IN_OUT | ( | hdr, | |||
len1, | |||||
ptr1, | |||||
len2, | |||||
ptr2 | ) |
{ \ ret = sah_add_in_out_desc(hdr, ptr1, len1, ptr2, len2, \ user_ctx->mem_util, &desc_chain); \ if (ret != FSL_RETURN_OK_S) { \ goto out; \ } \ }
Add Descriptor with input and an output
Referenced by fsl_shw_auth_decrypt(), fsl_shw_gen_encrypt(), fsl_shw_hash(), and fsl_shw_hmac().
#define DESC_KEY_OUT | ( | hdr, | |||
key1, | |||||
len2, | |||||
ptr2 | ) |
{ \ ret = sah_add_key_out_desc(hdr, key1, ptr2, len2, \ user_ctx->mem_util, &desc_chain); \ if (ret != FSL_RETURN_OK_S) { \ goto out; \ } \ }
Add Descriptor with a key and an output
Referenced by fsl_shw_establish_key(), and fsl_shw_hmac_precompute().
#define DESC_OUT_IN | ( | hdr, | |||
len1, | |||||
ptr1, | |||||
len2, | |||||
ptr2 | ) |
{ \ ret = sah_add_out_in_desc(hdr, ptr1, len1, ptr2, len2, \ user_ctx->mem_util, &desc_chain); \ if (ret != FSL_RETURN_OK_S) { \ goto out; \ } \ }
Add Descriptor with output then input pointers
#define DESC_OUT_OUT | ( | hdr, | |||
len1, | |||||
ptr1, | |||||
len2, | |||||
ptr2 | ) |
{ \ ret = sah_add_two_out_desc(hdr, ptr1, len1, ptr2, len2, \ user_ctx->mem_util, &desc_chain); \ if (ret != FSL_RETURN_OK_S) { \ goto out; \ } \ }
Add Descriptor with two outputs
Referenced by fsl_shw_auth_decrypt(), fsl_shw_gen_encrypt(), and fsl_shw_get_random().
#define SAH_HDR_ARC4_READ_SBOX 0x90860000 |
Header value for Sahara Descriptor 34
#define SAH_HDR_ARC4_SET_MODE_KEY 0x90830000 |
Header value for Sahara Descriptor 35
#define SAH_HDR_ARC4_SET_MODE_SBOX 0x90890000 |
Header value for Sahara Descriptor 33
#define SAH_HDR_LLO 0x01000000 |
Header bit indicating "Link-List optimization"
#define SAH_HDR_MDHA_HASH 0xA0850000 |
Header value for Sahara Descriptor 10
Referenced by fsl_shw_hash(), and fsl_shw_hmac().
#define SAH_HDR_MDHA_ICV_CHECK 0xA08A0000 |
Header value for Sahara Descriptor 39
#define SAH_HDR_MDHA_SET_MODE_HASH 0x208D0000 |
Header value for Sahara Descriptor 8
Referenced by fsl_shw_hash(), and fsl_shw_hmac_precompute().
#define SAH_HDR_MDHA_SET_MODE_MD_KEY 0x20880000 |
Header value for Sahara Descriptor 6
Referenced by fsl_shw_hash(), and fsl_shw_hmac().
#define SAH_HDR_MDHA_STORE_DIGEST 0x20820000 |
Header value for Sahara Descriptor 11
Referenced by fsl_shw_hash(), and fsl_shw_hmac().
#define SAH_HDR_PKHA_EX_ST_B1 0xC08C0000 |
Header value for Sahara Descriptor 32
#define SAH_HDR_PKHA_LD_A0_A1 0x40840000 |
Header value for Sahara Descriptor 23
#define SAH_HDR_PKHA_LD_A2_A3 0xC0850000 |
Header value for Sahara Descriptor 24
#define SAH_HDR_PKHA_LD_A3_B0 0x40810000 |
Header value for Sahara Descriptor 36
#define SAH_HDR_PKHA_LD_A_B 0xC0830000 |
Header value for Sahara Descriptor 22
#define SAH_HDR_PKHA_LD_A_EX_ST_B 0x408D0000 |
Header value for Sahara Descriptor 20
#define SAH_HDR_PKHA_LD_B0_B1 0xC0860000 |
Header value for Sahara Descriptor 25
#define SAH_HDR_PKHA_LD_B2_B3 0x40870000 |
Header value for Sahara Descriptor 26
#define SAH_HDR_PKHA_LD_N_E 0xC0800000 |
Header value for Sahara Descriptor 19
#define SAH_HDR_PKHA_LD_N_EX_ST_B 0x408E0000 |
Header value for Sahara Descriptor 21
#define SAH_HDR_PKHA_ST_A0_A1 0x40880000 |
Header value for Sahara Descriptor 28
#define SAH_HDR_PKHA_ST_A2_A3 0xC0890000 |
Header value for Sahara Descriptor 29
#define SAH_HDR_PKHA_ST_A_B 0x40820000 |
Header value for Sahara Descriptor 27
#define SAH_HDR_PKHA_ST_B0_B1 0xC08A0000 |
Header value for Sahara Descriptor 30
#define SAH_HDR_PKHA_ST_B1_B2 0xC08F0000 |
Header value for Sahara Descriptor 37
#define SAH_HDR_PKHA_ST_B2_B3 0x408B0000 |
Header value for Sahara Descriptor 31
#define SAH_HDR_RNG_GENERATE 0x308C0000 |
Header value for Sahara Descriptor 18
Referenced by fsl_shw_add_entropy(), fsl_shw_establish_key(), and fsl_shw_get_random().
#define SAH_HDR_SKHA_CBC_ICV 0x10840000 |
Header value for Sahara Descriptor 38
Referenced by add_assoc_preamble().
#define SAH_HDR_SKHA_ENC_DEC 0x90850000 |
Header value for Sahara Descriptor 4
Referenced by add_assoc_preamble(), fsl_shw_auth_decrypt(), and fsl_shw_gen_encrypt().
#define SAH_HDR_SKHA_READ_CONTEXT_IV 0x10820000 |
Header value for Sahara Descriptor 5
Referenced by fsl_shw_auth_decrypt(), and fsl_shw_gen_encrypt().
#define SAH_HDR_SKHA_SET_MODE_ENC_DEC 0x108D0000 |
Header value for Sahara Descriptor 2
Referenced by fsl_shw_auth_decrypt(), and fsl_shw_gen_encrypt().
#define SAH_HDR_SKHA_SET_MODE_IV_KEY 0x10880000 |
Header value for Sahara Descriptor 1
Referenced by fsl_shw_auth_decrypt(), and fsl_shw_gen_encrypt().
#define sah_insert_pkha_soft_err_false 0x80000200 |
#define sah_insert_rng_gen_seed 0x80000001 |
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 | |||
) |
Add a descriptor with an input and key pointer
References FSL_RETURN_OK_S, sah_add_in_key_desc(), and SAH_USES_LINK_DATA.
Referenced by sah_add_in_key_desc().
fsl_shw_return_t sah_add_in_keyout_desc | ( | uint32_t | header, | |
const uint8_t * | in, | |||
uint32_t | in_length, | |||
fsl_shw_sko_t * | key_info, | |||
const sah_Mem_Util * | mu, | |||
sah_Head_Desc ** | desc_chain | |||
) |
Add a descriptor with an input and key output pointer
References sah_Link::flags, FSL_RETURN_OK_S, sah_add_in_keyout_desc(), SAH_OUTPUT_LINK, and SAH_USES_LINK_DATA.
Referenced by sah_add_in_keyout_desc().
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 | |||
) |
Add a descriptor with an input and output pointer
References FSL_RETURN_OK_S, sah_add_in_out_desc(), SAH_OUTPUT_LINK, and SAH_USES_LINK_DATA.
Referenced by sah_add_in_out_desc().
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 | |||
) |
Add a descriptor with two key pointers
References FSL_RETURN_OK_S, and sah_add_key_key_desc().
Referenced by sah_add_key_key_desc().
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 | |||
) |
Add a descriptor with a key and an output pointer
References FSL_RETURN_OK_S, sah_add_key_out_desc(), SAH_OUTPUT_LINK, and SAH_USES_LINK_DATA.
Referenced by sah_add_key_out_desc().
fsl_shw_return_t sah_add_out_in_desc | ( | uint32_t | header, | |
uint8_t * | out, | |||
uint32_t | out_length, | |||
const uint8_t * | in, | |||
uint32_t | in_length, | |||
const sah_Mem_Util * | mu, | |||
sah_Head_Desc ** | desc_chain | |||
) |
Add a descriptor with an output and input pointer
References FSL_RETURN_OK_S, sah_add_out_in_desc(), SAH_OUTPUT_LINK, and SAH_USES_LINK_DATA.
Referenced by sah_add_out_in_desc().
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 | |||
) |
Add a descriptor with two 'data' pointers
Add descriptor where neither link needs sync
header | The Sahara header value for the descriptor. | |
in1 | The first input buffer (or NULL) | |
in1_length | Size of in1 | |
[out] | in2 | The second input buffer (or NULL) |
in2_length | Size of in2 | |
mu | Memory functions | |
[in,out] | desc_chain | Chain to start or append to |
References FSL_RETURN_OK_S, sah_add_two_d_desc(), and SAH_USES_LINK_DATA.
Referenced by sah_add_two_d_desc().
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 | |||
) |
Add a descriptor with two input pointers
References FSL_RETURN_OK_S, sah_add_two_in_desc(), and SAH_USES_LINK_DATA.
Referenced by sah_add_two_in_desc().
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 | |||
) |
Add a descriptor with two output pointers
References FSL_RETURN_OK_S, sah_add_two_out_desc(), SAH_OUTPUT_LINK, and SAH_USES_LINK_DATA.
Referenced by sah_add_two_out_desc().
fsl_shw_return_t sah_validate_uco | ( | fsl_shw_uco_t * | uco | ) |
Verify that supplied User Context Object is valid
References fsl_shw_uco_t::callback, fsl_shw_uco_t::flags, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_ERROR_S, FSL_RETURN_INTERNAL_ERROR_S, FSL_RETURN_MEMORY_ERROR_S, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_OK_S, FSL_UCO_BLOCKING_MODE, FSL_UCO_CALLBACK_MODE, fsl_shw_uco_t::mem_util, fsl_shw_uco_t::pool_size, sah_validate_uco(), and fsl_shw_uco_t::sahara_openfd.
Referenced by fsl_shw_add_entropy(), fsl_shw_get_random(), fsl_shw_get_results(), sah_register(), and sah_validate_uco().
© Freescale Semiconductor, Inc., 2007.
All rights reserved. Freescale Confidential Proprietary NDA Required |
![]() |