Link Flags

Flags to show information about link data and link segments. More...

Data Structures

struct  sah_Queue
struct  sah_Desc
 Structure type for descriptors. More...
struct  sah_Head_Desc
 The first descriptor in a chain. More...
struct  sah_Link
 Structure type for links. More...
struct  fsl_sho_ibo_t
struct  sah_Mem_Util
 Structure for API memory utilities. More...
struct  fsl_shw_spo_t
struct  fsl_shw_uco_t
struct  fsl_shw_result_t
struct  fsl_shw_kso_t
struct  fsl_shw_sko_t
struct  fsl_shw_pco_t
 Platform Capability Object. More...
struct  fsl_shw_hco_t
struct  fsl_shw_hmco_t
struct  fsl_shw_scco_t
struct  fsl_shw_acco_t
struct  sah_results

Defines

#define SAH_OWNS_LINK_DATA   0x01
#define SAH_USES_LINK_DATA   0x02
#define SAH_OUTPUT_LINK   0x04
#define SAH_KEY_IS_HIDDEN   0x08
#define SAH_REWORKED_LINK   0x10
#define SAH_STORED_KEY_INFO   0x20
#define SAH_PREPHYS_DATA   0x40
#define SAH_LINK_INSERTED_LINK   0x80
#define SAH_IN_USER_KEYSTORE   0x100
#define fsl_shw_pco_get_version(pcobject, pcmajor, pcminor)
#define fsl_shw_pco_get_driver_version(pcobject, pcmajor, pcminor)
#define fsl_shw_pco_get_sym_algorithms(pcobject, pcalgorithms, pcacount)
#define fsl_shw_pco_get_sym_modes(pcobject, gsmodes, gsacount)
#define fsl_shw_pco_get_hash_algorithms(pcobject, gsalgorithms, gsacount)
#define fsl_shw_pco_check_sym_supported(pcobject, pcalg, pcmode)   ((pcobject)->sym_support[pcalg][pcmode])
#define fsl_shw_pco_check_auth_supported(pcobject, pcmode)   ((pcmode == FSL_ACC_MODE_CCM) ? 1 : 0)
#define fsl_shw_pco_check_black_key_supported(pcobject)   1
#define fsl_shw_pco_check_pk_supported(pcobject)   0
#define fsl_shw_pco_check_sw_keys_supported(pcobject)   0
#define fsl_shw_pco_get_scc_driver_version(pcobject, pcmajor, pcminor)
#define fsl_shw_pco_get_scm_version(pcobject)   ((pcobject)->scm_version)
#define fsl_shw_pco_get_smn_version(pcobject)   ((pcobject)->smn_version)
#define fsl_shw_pco_get_scm_block_size(pcobject)   ((pcobject)->block_size_bytes)
#define fsl_shw_pco_get_smn_size(pcobject, black_size, red_size)
#define fsl_shw_pco_check_spo_supported(pcobject)   ((pcobject)->scm_version == 2)
#define fsl_shw_pco_get_spo_size_bytes(pcobject)
#define fsl_shw_pco_get_spo_count(pcobject)
#define fsl_shw_uco_init(ucontext, usize)
#define fsl_shw_uco_set_reference(ucontext, uref)   (ucontext)->user_ref = uref
#define fsl_shw_uco_set_callback(ucontext, ucallback)   (ucontext)->callback = ucallback
#define fsl_shw_uco_set_flags(ucontext, uflags)   (ucontext)->flags |= (uflags)
#define fsl_shw_uco_clear_flags(ucontext, uflags)   (ucontext)->flags &= ~(uflags)
#define fsl_shw_ro_get_reference(robject)   (robject)->user_ref
#define fsl_shw_ro_get_status(robject)   (robject)->code
#define fsl_shw_sko_init(skobject, skalgorithm)
#define fsl_shw_sko_init_pf_key(skobject, skalgorithm, skhwkey)
#define fsl_shw_sko_set_key(skobject, skkey, skkeylen)
#define fsl_shw_sko_set_key_length(skobject, skkeylen)   (skobject)->key_length = skkeylen;
#define fsl_shw_sko_set_user_id(skobject, skuserid)   (skobject)->userid = (skuserid)
#define fsl_shw_sko_set_keystore(skobject, user_keystore)   (skobject)->keystore = (user_keystore)
#define fsl_shw_sko_set_established_info(skobject, skuserid, skhandle)
#define fsl_shw_sko_get_established_info(skobject, skhandle)   *(skhandle) = (skobject)->handle
#define fsl_shw_sko_get_algorithm(skobject, skalgorithm)   *(skalgorithm) = (skobject)->algorithm
#define fsl_shw_sko_get_key(skobject, skkey)
#define fsl_shw_sko_calculate_wrapped_size(wkeyinfo, wkeylen)
#define fsl_shw_sko_set_flags(skobject, skflags)   (skobject)->flags |= (skflags)
#define fsl_shw_sko_clear_flags(skobject, skflags)   (skobject)->flags &= ~(skflags)
#define fsl_shw_hco_init(hcobject, hcalgorithm)
#define fsl_shw_hco_get_digest(hcobject, hccontext, hcclength, hcmsglen)
#define fsl_shw_hco_get_info(hcobject, hcalgorithm)
#define fsl_shw_hco_set_digest(hcobject, hccontext, hcmsglen)
#define fsl_shw_hco_set_flags(hcobject, hcflags)   (hcobject)->flags |= (hcflags)
#define fsl_shw_hco_clear_flags(hcobject, hcflags)   (hcobject)->flags &= ~(hcflags)
#define fsl_shw_hmco_init(hcobject, hcalgorithm)   fsl_shw_hco_init(hcobject, hcalgorithm)
#define fsl_shw_hmco_set_flags(hcobject, hcflags)   (hcobject)->flags |= (hcflags)
#define fsl_shw_hmco_clear_flags(hcobject, hcflags)   (hcobject)->flags &= ~(hcflags)
#define fsl_shw_scco_init(scobject, scalg, scmode)
#define fsl_shw_scco_set_flags(scobject, scflags)   (scobject)->flags |= (scflags)
#define fsl_shw_scco_clear_flags(scobject, scflags)   (scobject)->flags &= ~(scflags)
#define fsl_shw_scco_set_context(scobject, sccontext)
#define fsl_shw_scco_get_context(scobject, sccontext)   copy_bytes(sccontext, (scobject)->context, (scobject)->block_size_bytes)
#define fsl_shw_scco_set_counter_info(scobject, sccounter, scmodulus)
#define fsl_shw_scco_get_counter_info(scobject, sccounter, scmodulus)
#define fsl_shw_acco_init(acobject, acmode)
#define fsl_shw_acco_set_flags(acobject, acflags)   (acobject)->flags |= (acflags)
#define fsl_shw_acco_clear_flags(acobject, acflags)   (acobject)->flags &= ~(acflags)
#define fsl_shw_acco_set_ccm(acobject, acalg, accounter, acmaclen)
#define fsl_shw_ccm_nist_format_ctr_and_iv(acobject, act, acad, acq, acN, acQ)
#define fsl_shw_ccm_nist_update_ctr_and_iv(acobject, acN, acQ)
#define SAH_OWNS_LINK_DATA   0x01
#define SAH_USES_LINK_DATA   0x02
#define SAH_OUTPUT_LINK   0x04
#define SAH_KEY_IS_HIDDEN   0x08
#define SAH_REWORKED_LINK   0x10
#define SAH_STORED_KEY_INFO   0x20
#define SAH_PREPHYS_DATA   0x40
#define SAH_LINK_INSERTED_LINK   0x80
#define SAH_IN_USER_KEYSTORE   0x100
#define fsl_shw_pco_get_version(pcobject, pcmajor, pcminor)
#define fsl_shw_pco_get_driver_version(pcobject, pcmajor, pcminor)
#define fsl_shw_pco_get_sym_algorithms(pcobject, pcalgorithms, pcacount)
#define fsl_shw_pco_get_sym_modes(pcobject, gsmodes, gsacount)
#define fsl_shw_pco_get_hash_algorithms(pcobject, gsalgorithms, gsacount)
#define fsl_shw_pco_check_sym_supported(pcobject, pcalg, pcmode)   ((pcobject)->sym_support[pcalg][pcmode])
#define fsl_shw_pco_check_auth_supported(pcobject, pcmode)   ((pcmode == FSL_ACC_MODE_CCM) ? 1 : 0)
#define fsl_shw_pco_check_black_key_supported(pcobject)   1
#define fsl_shw_pco_check_pk_supported(pcobject)   0
#define fsl_shw_pco_check_sw_keys_supported(pcobject)   0
#define fsl_shw_pco_get_scc_driver_version(pcobject, pcmajor, pcminor)
#define fsl_shw_pco_get_scm_version(pcobject)   ((pcobject)->scm_version)
#define fsl_shw_pco_get_smn_version(pcobject)   ((pcobject)->smn_version)
#define fsl_shw_pco_get_scm_block_size(pcobject)   ((pcobject)->block_size_bytes)
#define fsl_shw_pco_get_smn_size(pcobject, black_size, red_size)
#define fsl_shw_pco_check_spo_supported(pcobject)   ((pcobject)->scm_version == 2)
#define fsl_shw_pco_get_spo_size_bytes(pcobject)
#define fsl_shw_pco_get_spo_count(pcobject)
#define fsl_shw_uco_init(ucontext, usize)
#define fsl_shw_uco_set_reference(ucontext, uref)   (ucontext)->user_ref = uref
#define fsl_shw_uco_set_callback(ucontext, ucallback)   (ucontext)->callback = ucallback
#define fsl_shw_uco_set_flags(ucontext, uflags)   (ucontext)->flags |= (uflags)
#define fsl_shw_uco_clear_flags(ucontext, uflags)   (ucontext)->flags &= ~(uflags)
#define fsl_shw_ro_get_reference(robject)   (robject)->user_ref
#define fsl_shw_ro_get_status(robject)   (robject)->code
#define fsl_shw_sko_init(skobject, skalgorithm)
#define fsl_shw_sko_init_pf_key(skobject, skalgorithm, skhwkey)
#define fsl_shw_sko_set_key(skobject, skkey, skkeylen)
#define fsl_shw_sko_set_key_length(skobject, skkeylen)   (skobject)->key_length = skkeylen;
#define fsl_shw_sko_set_user_id(skobject, skuserid)   (skobject)->userid = (skuserid)
#define fsl_shw_sko_set_keystore(skobject, user_keystore)   (skobject)->keystore = (user_keystore)
#define fsl_shw_sko_set_established_info(skobject, skuserid, skhandle)
#define fsl_shw_sko_get_established_info(skobject, skhandle)   *(skhandle) = (skobject)->handle
#define fsl_shw_sko_get_algorithm(skobject, skalgorithm)   *(skalgorithm) = (skobject)->algorithm
#define fsl_shw_sko_get_key(skobject, skkey)
#define fsl_shw_sko_calculate_wrapped_size(wkeyinfo, wkeylen)
#define fsl_shw_sko_set_flags(skobject, skflags)   (skobject)->flags |= (skflags)
#define fsl_shw_sko_clear_flags(skobject, skflags)   (skobject)->flags &= ~(skflags)
#define fsl_shw_hco_init(hcobject, hcalgorithm)
#define fsl_shw_hco_get_digest(hcobject, hccontext, hcclength, hcmsglen)
#define fsl_shw_hco_get_info(hcobject, hcalgorithm)
#define fsl_shw_hco_set_digest(hcobject, hccontext, hcmsglen)
#define fsl_shw_hco_set_flags(hcobject, hcflags)   (hcobject)->flags |= (hcflags)
#define fsl_shw_hco_clear_flags(hcobject, hcflags)   (hcobject)->flags &= ~(hcflags)
#define fsl_shw_hmco_init(hcobject, hcalgorithm)   fsl_shw_hco_init(hcobject, hcalgorithm)
#define fsl_shw_hmco_set_flags(hcobject, hcflags)   (hcobject)->flags |= (hcflags)
#define fsl_shw_hmco_clear_flags(hcobject, hcflags)   (hcobject)->flags &= ~(hcflags)
#define fsl_shw_scco_init(scobject, scalg, scmode)
#define fsl_shw_scco_set_flags(scobject, scflags)   (scobject)->flags |= (scflags)
#define fsl_shw_scco_clear_flags(scobject, scflags)   (scobject)->flags &= ~(scflags)
#define fsl_shw_scco_set_context(scobject, sccontext)
#define fsl_shw_scco_get_context(scobject, sccontext)   copy_bytes(sccontext, (scobject)->context, (scobject)->block_size_bytes)
#define fsl_shw_scco_set_counter_info(scobject, sccounter, scmodulus)
#define fsl_shw_scco_get_counter_info(scobject, sccounter, scmodulus)
#define fsl_shw_acco_init(acobject, acmode)
#define fsl_shw_acco_set_flags(acobject, acflags)   (acobject)->flags |= (acflags)
#define fsl_shw_acco_clear_flags(acobject, acflags)   (acobject)->flags &= ~(acflags)
#define fsl_shw_acco_set_ccm(acobject, acalg, accounter, acmaclen)
#define fsl_shw_ccm_nist_format_ctr_and_iv(acobject, act, acad, acq, acN, acQ)
#define fsl_shw_ccm_nist_update_ctr_and_iv(acobject, acN, acQ)

Typedefs

typedef uint32_t sah_Link_Flags
typedef uint8_t * sah_Int
typedef uint8_t * sah_Oct_Str
typedef struct sah_Queue sah_Queue
typedef enum
fsl_shw_user_ctx_flags_t 
fsl_shw_user_ctx_flags_t
typedef enum fsl_shw_return_t fsl_shw_return_t
typedef enum fsl_shw_key_alg_t fsl_shw_key_alg_t
typedef enum fsl_shw_sym_mode_t fsl_shw_sym_mode_t
typedef enum fsl_shw_hash_alg_t fsl_shw_hash_alg_t
typedef enum fsl_shw_acc_mode_t fsl_shw_acc_mode_t
typedef enum
fsl_shw_hash_ctx_flags_t 
fsl_shw_hash_ctx_flags_t
typedef enum
fsl_shw_hmac_ctx_flags_t 
fsl_shw_hmac_ctx_flags_t
typedef enum
fsl_shw_sym_ctx_flags_t 
fsl_shw_sym_ctx_flags_t
typedef enum fsl_shw_key_flags_t fsl_shw_key_flags_t
typedef uint64_t key_userid_t
typedef enum
fsl_shw_auth_ctx_flags_t 
fsl_shw_auth_ctx_flags_t
typedef enum fsl_shw_key_wrap_t fsl_shw_key_wrap_t
typedef enum fsl_shw_ctr_mod_t fsl_shw_ctr_mod_t
typedef enum fsl_shw_permission_t fsl_shw_permission_t
typedef struct sah_Desc sah_Desc
typedef struct sah_Head_Desc sah_Head_Desc
typedef struct sah_Link sah_Link
typedef struct fsl_sho_ibo_t fsl_sho_ibo_t
typedef struct sah_Mem_Util sah_Mem_Util
typedef struct fsl_shw_spo_t fsl_shw_spo_t
typedef struct fsl_shw_uco_t fsl_shw_uco_t
typedef struct fsl_shw_result_t fsl_shw_result_t
typedef struct fsl_shw_kso_t fsl_shw_kso_t
typedef struct fsl_shw_sko_t fsl_shw_sko_t
typedef struct fsl_shw_pco_t fsl_shw_pco_t
typedef struct fsl_shw_hco_t fsl_shw_hco_t
typedef struct fsl_shw_hmco_t fsl_shw_hmco_t
typedef struct fsl_shw_scco_t fsl_shw_scco_t
typedef struct fsl_shw_acco_t fsl_shw_acco_t
typedef struct sah_results sah_results
typedef enum
fsl_shw_partition_status_t 
fsl_shw_partition_status_t
typedef uint32_t sah_Link_Flags
typedef uint8_t * sah_Int
typedef uint8_t * sah_Oct_Str
typedef struct sah_Queue sah_Queue
typedef enum
fsl_shw_user_ctx_flags_t 
fsl_shw_user_ctx_flags_t
typedef enum fsl_shw_return_t fsl_shw_return_t
typedef enum fsl_shw_key_alg_t fsl_shw_key_alg_t
typedef enum fsl_shw_sym_mode_t fsl_shw_sym_mode_t
typedef enum fsl_shw_hash_alg_t fsl_shw_hash_alg_t
typedef enum fsl_shw_acc_mode_t fsl_shw_acc_mode_t
typedef enum
fsl_shw_hash_ctx_flags_t 
fsl_shw_hash_ctx_flags_t
typedef enum
fsl_shw_hmac_ctx_flags_t 
fsl_shw_hmac_ctx_flags_t
typedef enum
fsl_shw_sym_ctx_flags_t 
fsl_shw_sym_ctx_flags_t
typedef enum fsl_shw_key_flags_t fsl_shw_key_flags_t
typedef uint64_t key_userid_t
typedef enum
fsl_shw_auth_ctx_flags_t 
fsl_shw_auth_ctx_flags_t
typedef enum fsl_shw_key_wrap_t fsl_shw_key_wrap_t
typedef enum fsl_shw_ctr_mod_t fsl_shw_ctr_mod_t
typedef enum fsl_shw_permission_t fsl_shw_permission_t
typedef struct sah_Desc sah_Desc
typedef struct sah_Head_Desc sah_Head_Desc
typedef struct sah_Link sah_Link
typedef struct fsl_sho_ibo_t fsl_sho_ibo_t
typedef struct sah_Mem_Util sah_Mem_Util
typedef struct fsl_shw_spo_t fsl_shw_spo_t
typedef struct fsl_shw_uco_t fsl_shw_uco_t
typedef struct fsl_shw_result_t fsl_shw_result_t
typedef struct fsl_shw_kso_t fsl_shw_kso_t
typedef struct fsl_shw_sko_t fsl_shw_sko_t
typedef struct fsl_shw_pco_t fsl_shw_pco_t
typedef struct fsl_shw_hco_t fsl_shw_hco_t
typedef struct fsl_shw_hmco_t fsl_shw_hmco_t
typedef struct fsl_shw_scco_t fsl_shw_scco_t
typedef struct fsl_shw_acco_t fsl_shw_acco_t
typedef struct sah_results sah_results
typedef enum
fsl_shw_partition_status_t 
fsl_shw_partition_status_t

Enumerations

enum  fsl_shw_user_ctx_flags_t {
  FSL_UCO_BLOCKING_MODE = 0x01,
  FSL_UCO_CALLBACK_MODE = 0x02,
  FSL_UCO_SAVE_DESC_CHAIN = 0x04,
  FSL_UCO_CALLBACK_SETUP_COMPLETE = 0x08,
  FSL_UCO_CHAIN_PREPHYSICALIZED = 0x10,
  FSL_UCO_CONTEXT_CHANGED = 0x20,
  FSL_UCO_USERMODE_USER = 0x40,
  FSL_UCO_BLOCKING_MODE,
  FSL_UCO_CALLBACK_MODE,
  FSL_UCO_SAVE_DESC_CHAIN,
  FSL_UCO_CALLBACK_SETUP_COMPLETE,
  FSL_UCO_CHAIN_PREPHYSICALIZED,
  FSL_UCO_CONTEXT_CHANGED,
  FSL_UCO_USERMODE_USER,
  FSL_UCO_BLOCKING_MODE = 0x01,
  FSL_UCO_CALLBACK_MODE = 0x02,
  FSL_UCO_SAVE_DESC_CHAIN = 0x04,
  FSL_UCO_CALLBACK_SETUP_COMPLETE = 0x08,
  FSL_UCO_CHAIN_PREPHYSICALIZED = 0x10,
  FSL_UCO_CONTEXT_CHANGED = 0x20,
  FSL_UCO_USERMODE_USER = 0x40,
  FSL_UCO_BLOCKING_MODE,
  FSL_UCO_CALLBACK_MODE,
  FSL_UCO_SAVE_DESC_CHAIN,
  FSL_UCO_CALLBACK_SETUP_COMPLETE,
  FSL_UCO_CHAIN_PREPHYSICALIZED,
  FSL_UCO_CONTEXT_CHANGED,
  FSL_UCO_USERMODE_USER,
  FSL_UCO_BLOCKING_MODE = 0x01,
  FSL_UCO_CALLBACK_MODE = 0x02,
  FSL_UCO_SAVE_DESC_CHAIN = 0x04,
  FSL_UCO_CALLBACK_SETUP_COMPLETE = 0x08,
  FSL_UCO_CHAIN_PREPHYSICALIZED = 0x10,
  FSL_UCO_CONTEXT_CHANGED = 0x20,
  FSL_UCO_USERMODE_USER = 0x40
}
enum  fsl_shw_return_t {
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S,
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S,
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S,
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S,
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S
}
enum  fsl_shw_key_alg_t {
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_PK_PRIVATE,
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_PK_PRIVATE
}
enum  fsl_shw_sym_mode_t {
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR
}
enum  fsl_shw_hash_alg_t {
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256
}
enum  fsl_shw_acc_mode_t {
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL,
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL,
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL,
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL,
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL
}
enum  fsl_shw_hash_ctx_flags_t {
  FSL_HASH_FLAGS_INIT = 0x01,
  FSL_HASH_FLAGS_SAVE = 0x02,
  FSL_HASH_FLAGS_LOAD = 0x04,
  FSL_HASH_FLAGS_FINALIZE = 0x08,
  FSL_HASH_FLAGS_INIT = 1,
  FSL_HASH_FLAGS_SAVE = 2,
  FSL_HASH_FLAGS_LOAD = 4,
  FSL_HASH_FLAGS_FINALIZE = 8,
  FSL_HASH_FLAGS_INIT = 0x01,
  FSL_HASH_FLAGS_SAVE = 0x02,
  FSL_HASH_FLAGS_LOAD = 0x04,
  FSL_HASH_FLAGS_FINALIZE = 0x08,
  FSL_HASH_FLAGS_INIT = 1,
  FSL_HASH_FLAGS_SAVE = 2,
  FSL_HASH_FLAGS_LOAD = 4,
  FSL_HASH_FLAGS_FINALIZE = 8,
  FSL_HASH_FLAGS_INIT = 0x01,
  FSL_HASH_FLAGS_SAVE = 0x02,
  FSL_HASH_FLAGS_LOAD = 0x04,
  FSL_HASH_FLAGS_FINALIZE = 0x08
}
enum  fsl_shw_hmac_ctx_flags_t { ,
  FSL_HMAC_FLAGS_INIT = 1,
  FSL_HMAC_FLAGS_SAVE = 2,
  FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16,
  FSL_HMAC_FLAGS_INIT = 1,
  FSL_HMAC_FLAGS_SAVE = 2,
  FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16,
  FSL_HMAC_FLAGS_INIT = 1,
  FSL_HMAC_FLAGS_SAVE = 2,
  FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16,
  FSL_HMAC_FLAGS_INIT = 1,
  FSL_HMAC_FLAGS_SAVE = 2,
  FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16
}
enum  fsl_shw_sym_ctx_flags_t { ,
  FSL_SYM_CTX_INIT = 1,
  FSL_SYM_CTX_LOAD = 2,
  FSL_SYM_CTX_SAVE = 4,
  FSL_SYM_CTX_PROTECT = 8,
  FSL_SYM_CTX_INIT = 1,
  FSL_SYM_CTX_LOAD = 2,
  FSL_SYM_CTX_SAVE = 4,
  FSL_SYM_CTX_PROTECT = 8,
  FSL_SYM_CTX_INIT = 1,
  FSL_SYM_CTX_LOAD = 2,
  FSL_SYM_CTX_SAVE = 4,
  FSL_SYM_CTX_PROTECT = 8,
  FSL_SYM_CTX_INIT = 1,
  FSL_SYM_CTX_LOAD = 2,
  FSL_SYM_CTX_SAVE = 4,
  FSL_SYM_CTX_PROTECT = 8
}
enum  fsl_shw_key_flags_t {
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_USE_SECRET_KEY = 8,
  FSL_SKO_KEY_SW_KEY = 16,
  FSL_SKO_KEY_SELECT_PF_KEY = 32,
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_KEY_SW_KEY = 8,
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_KEY_SW_KEY = 8,
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_KEY_SW_KEY = 8,
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_KEY_SW_KEY = 8
}
enum  fsl_shw_auth_ctx_flags_t { ,
  FSL_ACCO_CTX_INIT = 1,
  FSL_ACCO_CTX_LOAD = 2,
  FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 16,
  FSL_ACCO_CTX_INIT = 1,
  FSL_ACCO_CTX_LOAD = 2,
  FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 0x10,
  FSL_ACCO_CTX_INIT = 1,
  FSL_ACCO_CTX_LOAD = 2,
  FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 16,
  FSL_ACCO_CTX_INIT = 1,
  FSL_ACCO_CTX_LOAD = 2,
  FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 0x10
}
enum  fsl_shw_key_wrap_t { ,
  FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT,
  FSL_KEY_WRAP_UNWRAP,
  FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT,
  FSL_KEY_WRAP_UNWRAP,
  FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT,
  FSL_KEY_WRAP_UNWRAP,
  FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT,
  FSL_KEY_WRAP_UNWRAP
}
enum  fsl_shw_ctr_mod_t { ,
  FSL_CTR_MOD_8,
  FSL_CTR_MOD_16,
  FSL_CTR_MOD_24,
  FSL_CTR_MOD_32,
  FSL_CTR_MOD_40,
  FSL_CTR_MOD_48,
  FSL_CTR_MOD_56,
  FSL_CTR_MOD_64,
  FSL_CTR_MOD_72,
  FSL_CTR_MOD_80,
  FSL_CTR_MOD_88,
  FSL_CTR_MOD_96,
  FSL_CTR_MOD_104,
  FSL_CTR_MOD_112,
  FSL_CTR_MOD_120,
  FSL_CTR_MOD_128,
  FSL_CTR_MOD_8,
  FSL_CTR_MOD_16,
  FSL_CTR_MOD_24,
  FSL_CTR_MOD_32,
  FSL_CTR_MOD_40,
  FSL_CTR_MOD_48,
  FSL_CTR_MOD_56,
  FSL_CTR_MOD_64,
  FSL_CTR_MOD_72,
  FSL_CTR_MOD_80,
  FSL_CTR_MOD_88,
  FSL_CTR_MOD_96,
  FSL_CTR_MOD_104,
  FSL_CTR_MOD_112,
  FSL_CTR_MOD_120,
  FSL_CTR_MOD_128,
  FSL_CTR_MOD_8,
  FSL_CTR_MOD_16,
  FSL_CTR_MOD_24,
  FSL_CTR_MOD_32,
  FSL_CTR_MOD_40,
  FSL_CTR_MOD_48,
  FSL_CTR_MOD_56,
  FSL_CTR_MOD_64,
  FSL_CTR_MOD_72,
  FSL_CTR_MOD_80,
  FSL_CTR_MOD_88,
  FSL_CTR_MOD_96,
  FSL_CTR_MOD_104,
  FSL_CTR_MOD_112,
  FSL_CTR_MOD_120,
  FSL_CTR_MOD_128,
  FSL_CTR_MOD_8,
  FSL_CTR_MOD_16,
  FSL_CTR_MOD_24,
  FSL_CTR_MOD_32,
  FSL_CTR_MOD_40,
  FSL_CTR_MOD_48,
  FSL_CTR_MOD_56,
  FSL_CTR_MOD_64,
  FSL_CTR_MOD_72,
  FSL_CTR_MOD_80,
  FSL_CTR_MOD_88,
  FSL_CTR_MOD_96,
  FSL_CTR_MOD_104,
  FSL_CTR_MOD_112,
  FSL_CTR_MOD_120,
  FSL_CTR_MOD_128
}
enum  fsl_shw_permission_t { ,
  FSL_PERM_NO_ZEROIZE,
  FSL_PERM_TRUSTED_KEY_READ,
  FSL_PERM_HD_S,
  FSL_PERM_HD_R,
  FSL_PERM_HD_W,
  FSL_PERM_HD_X,
  FSL_PERM_TH_R,
  FSL_PERM_TH_W,
  FSL_PERM_OT_R,
  FSL_PERM_OT_W,
  FSL_PERM_OT_X,
  FSL_PERM_NO_ZEROIZE = 0x80000000,
  FSL_PERM_TRUSTED_KEY_READ = 0x40000000,
  FSL_PERM_HD_S = 0x00000800,
  FSL_PERM_HD_R = 0x00000400,
  FSL_PERM_HD_W = 0x00000200,
  FSL_PERM_HD_X = 0x00000100,
  FSL_PERM_TH_R = 0x00000040,
  FSL_PERM_TH_W = 0x00000020,
  FSL_PERM_OT_R = 0x00000004,
  FSL_PERM_OT_W = 0x00000002,
  FSL_PERM_OT_X = 0x00000001,
  FSL_PERM_NO_ZEROIZE,
  FSL_PERM_TRUSTED_KEY_READ,
  FSL_PERM_HD_S,
  FSL_PERM_HD_R,
  FSL_PERM_HD_W,
  FSL_PERM_HD_X,
  FSL_PERM_TH_R,
  FSL_PERM_TH_W,
  FSL_PERM_OT_R,
  FSL_PERM_OT_W,
  FSL_PERM_OT_X,
  FSL_PERM_NO_ZEROIZE = 0x80000000,
  FSL_PERM_TRUSTED_KEY_READ = 0x40000000,
  FSL_PERM_HD_S = 0x00000800,
  FSL_PERM_HD_R = 0x00000400,
  FSL_PERM_HD_W = 0x00000200,
  FSL_PERM_HD_X = 0x00000100,
  FSL_PERM_TH_R = 0x00000040,
  FSL_PERM_TH_W = 0x00000020,
  FSL_PERM_OT_R = 0x00000004,
  FSL_PERM_OT_W = 0x00000002,
  FSL_PERM_OT_X = 0x00000001
}
enum  fsl_shw_cypher_mode_t {
  FSL_SHW_CYPHER_MODE_ECB = 1,
  FSL_SHW_CYPHER_MODE_CBC = 2,
  FSL_SHW_CYPHER_MODE_ECB,
  FSL_SHW_CYPHER_MODE_CBC,
  FSL_SHW_CYPHER_MODE_ECB = 1,
  FSL_SHW_CYPHER_MODE_CBC = 2,
  FSL_SHW_CYPHER_MODE_ECB,
  FSL_SHW_CYPHER_MODE_CBC,
  FSL_SHW_CYPHER_MODE_ECB = 1,
  FSL_SHW_CYPHER_MODE_CBC = 2
}
enum  fsl_shw_pf_key_t {
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND,
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND,
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND,
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND,
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND
}
enum  fsl_shw_tamper_t {
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO,
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO,
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO,
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO,
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO
}
enum  fsl_shw_partition_status_t {
  FSL_PART_S_UNUSABLE,
  FSL_PART_S_UNAVAILABLE,
  FSL_PART_S_AVAILABLE,
  FSL_PART_S_ALLOCATED,
  FSL_PART_S_ENGAGED,
  FSL_PART_S_UNUSABLE,
  FSL_PART_S_UNAVAILABLE,
  FSL_PART_S_AVAILABLE,
  FSL_PART_S_ALLOCATED,
  FSL_PART_S_ENGAGED,
  FSL_PART_S_UNUSABLE,
  FSL_PART_S_UNAVAILABLE,
  FSL_PART_S_AVAILABLE,
  FSL_PART_S_ALLOCATED,
  FSL_PART_S_ENGAGED
}
enum  fsl_shw_user_ctx_flags_t {
  FSL_UCO_BLOCKING_MODE = 0x01,
  FSL_UCO_CALLBACK_MODE = 0x02,
  FSL_UCO_SAVE_DESC_CHAIN = 0x04,
  FSL_UCO_CALLBACK_SETUP_COMPLETE = 0x08,
  FSL_UCO_CHAIN_PREPHYSICALIZED = 0x10,
  FSL_UCO_CONTEXT_CHANGED = 0x20,
  FSL_UCO_USERMODE_USER = 0x40,
  FSL_UCO_BLOCKING_MODE,
  FSL_UCO_CALLBACK_MODE,
  FSL_UCO_SAVE_DESC_CHAIN,
  FSL_UCO_CALLBACK_SETUP_COMPLETE,
  FSL_UCO_CHAIN_PREPHYSICALIZED,
  FSL_UCO_CONTEXT_CHANGED,
  FSL_UCO_USERMODE_USER,
  FSL_UCO_BLOCKING_MODE = 0x01,
  FSL_UCO_CALLBACK_MODE = 0x02,
  FSL_UCO_SAVE_DESC_CHAIN = 0x04,
  FSL_UCO_CALLBACK_SETUP_COMPLETE = 0x08,
  FSL_UCO_CHAIN_PREPHYSICALIZED = 0x10,
  FSL_UCO_CONTEXT_CHANGED = 0x20,
  FSL_UCO_USERMODE_USER = 0x40,
  FSL_UCO_BLOCKING_MODE,
  FSL_UCO_CALLBACK_MODE,
  FSL_UCO_SAVE_DESC_CHAIN,
  FSL_UCO_CALLBACK_SETUP_COMPLETE,
  FSL_UCO_CHAIN_PREPHYSICALIZED,
  FSL_UCO_CONTEXT_CHANGED,
  FSL_UCO_USERMODE_USER,
  FSL_UCO_BLOCKING_MODE = 0x01,
  FSL_UCO_CALLBACK_MODE = 0x02,
  FSL_UCO_SAVE_DESC_CHAIN = 0x04,
  FSL_UCO_CALLBACK_SETUP_COMPLETE = 0x08,
  FSL_UCO_CHAIN_PREPHYSICALIZED = 0x10,
  FSL_UCO_CONTEXT_CHANGED = 0x20,
  FSL_UCO_USERMODE_USER = 0x40
}
enum  fsl_shw_return_t {
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S,
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S,
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S,
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S,
  FSL_RETURN_OK_S = 0,
  FSL_RETURN_ERROR_S,
  FSL_RETURN_NO_RESOURCE_S,
  FSL_RETURN_BAD_ALGORITHM_S,
  FSL_RETURN_BAD_MODE_S,
  FSL_RETURN_BAD_FLAG_S,
  FSL_RETURN_BAD_KEY_LENGTH_S,
  FSL_RETURN_BAD_KEY_PARITY_S,
  FSL_RETURN_BAD_DATA_LENGTH_S,
  FSL_RETURN_AUTH_FAILED_S,
  FSL_RETURN_MEMORY_ERROR_S,
  FSL_RETURN_INTERNAL_ERROR_S,
  FSL_RETURN_POINT_AT_INFINITY_S,
  FSL_RETURN_POINT_NOT_AT_INFINITY_S,
  FSL_RETURN_GCD_IS_ONE_S,
  FSL_RETURN_GCD_IS_NOT_ONE_S,
  FSL_RETURN_PRIME_S,
  FSL_RETURN_NOT_PRIME_S,
  FSL_RETURN_EVEN_MODULUS_ERROR_S,
  FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S,
  FSL_RETURN_BAD_EXPONENT_ERROR_S,
  FSL_RETURN_OSCILLATOR_ERROR_S,
  FSL_RETURN_STATISTICS_ERROR_S
}
enum  fsl_shw_key_alg_t {
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_PK_PRIVATE,
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_ALG_HMAC,
  FSL_KEY_ALG_AES,
  FSL_KEY_ALG_DES,
  FSL_KEY_ALG_TDES,
  FSL_KEY_ALG_ARC4,
  FSL_KEY_PK_PRIVATE
}
enum  fsl_shw_sym_mode_t {
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR,
  FSL_SYM_MODE_STREAM,
  FSL_SYM_MODE_ECB,
  FSL_SYM_MODE_CBC,
  FSL_SYM_MODE_CTR
}
enum  fsl_shw_hash_alg_t {
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256,
  FSL_HASH_ALG_MD5,
  FSL_HASH_ALG_SHA1,
  FSL_HASH_ALG_SHA224,
  FSL_HASH_ALG_SHA256
}
enum  fsl_shw_acc_mode_t {
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL,
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL,
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL,
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL,
  FSL_ACC_MODE_CCM,
  FSL_ACC_MODE_SSL
}
enum  fsl_shw_hash_ctx_flags_t {
  FSL_HASH_FLAGS_INIT = 0x01,
  FSL_HASH_FLAGS_SAVE = 0x02,
  FSL_HASH_FLAGS_LOAD = 0x04,
  FSL_HASH_FLAGS_FINALIZE = 0x08,
  FSL_HASH_FLAGS_INIT = 1,
  FSL_HASH_FLAGS_SAVE = 2,
  FSL_HASH_FLAGS_LOAD = 4,
  FSL_HASH_FLAGS_FINALIZE = 8,
  FSL_HASH_FLAGS_INIT = 0x01,
  FSL_HASH_FLAGS_SAVE = 0x02,
  FSL_HASH_FLAGS_LOAD = 0x04,
  FSL_HASH_FLAGS_FINALIZE = 0x08,
  FSL_HASH_FLAGS_INIT = 1,
  FSL_HASH_FLAGS_SAVE = 2,
  FSL_HASH_FLAGS_LOAD = 4,
  FSL_HASH_FLAGS_FINALIZE = 8,
  FSL_HASH_FLAGS_INIT = 0x01,
  FSL_HASH_FLAGS_SAVE = 0x02,
  FSL_HASH_FLAGS_LOAD = 0x04,
  FSL_HASH_FLAGS_FINALIZE = 0x08
}
enum  fsl_shw_hmac_ctx_flags_t { ,
  FSL_HMAC_FLAGS_INIT = 1,
  FSL_HMAC_FLAGS_SAVE = 2,
  FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16,
  FSL_HMAC_FLAGS_INIT = 1,
  FSL_HMAC_FLAGS_SAVE = 2,
  FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16,
  FSL_HMAC_FLAGS_INIT = 1,
  FSL_HMAC_FLAGS_SAVE = 2,
  FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16,
  FSL_HMAC_FLAGS_INIT = 1,
  FSL_HMAC_FLAGS_SAVE = 2,
  FSL_HMAC_FLAGS_LOAD = 4,
  FSL_HMAC_FLAGS_FINALIZE = 8,
  FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT = 16
}
enum  fsl_shw_sym_ctx_flags_t { ,
  FSL_SYM_CTX_INIT = 1,
  FSL_SYM_CTX_LOAD = 2,
  FSL_SYM_CTX_SAVE = 4,
  FSL_SYM_CTX_PROTECT = 8,
  FSL_SYM_CTX_INIT = 1,
  FSL_SYM_CTX_LOAD = 2,
  FSL_SYM_CTX_SAVE = 4,
  FSL_SYM_CTX_PROTECT = 8,
  FSL_SYM_CTX_INIT = 1,
  FSL_SYM_CTX_LOAD = 2,
  FSL_SYM_CTX_SAVE = 4,
  FSL_SYM_CTX_PROTECT = 8,
  FSL_SYM_CTX_INIT = 1,
  FSL_SYM_CTX_LOAD = 2,
  FSL_SYM_CTX_SAVE = 4,
  FSL_SYM_CTX_PROTECT = 8
}
enum  fsl_shw_key_flags_t {
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_USE_SECRET_KEY = 8,
  FSL_SKO_KEY_SW_KEY = 16,
  FSL_SKO_KEY_SELECT_PF_KEY = 32,
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_KEY_SW_KEY = 8,
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_KEY_SW_KEY = 8,
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_KEY_SW_KEY = 8,
  FSL_SKO_KEY_IGNORE_PARITY = 1,
  FSL_SKO_KEY_PRESENT = 2,
  FSL_SKO_KEY_ESTABLISHED = 4,
  FSL_SKO_KEY_SW_KEY = 8
}
enum  fsl_shw_auth_ctx_flags_t { ,
  FSL_ACCO_CTX_INIT = 1,
  FSL_ACCO_CTX_LOAD = 2,
  FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 16,
  FSL_ACCO_CTX_INIT = 1,
  FSL_ACCO_CTX_LOAD = 2,
  FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 0x10,
  FSL_ACCO_CTX_INIT = 1,
  FSL_ACCO_CTX_LOAD = 2,
  FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 16,
  FSL_ACCO_CTX_INIT = 1,
  FSL_ACCO_CTX_LOAD = 2,
  FSL_ACCO_CTX_SAVE = 4,
  FSL_ACCO_CTX_FINALIZE = 8,
  FSL_ACCO_NIST_CCM = 0x10
}
enum  fsl_shw_key_wrap_t { ,
  FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT,
  FSL_KEY_WRAP_UNWRAP,
  FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT,
  FSL_KEY_WRAP_UNWRAP,
  FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT,
  FSL_KEY_WRAP_UNWRAP,
  FSL_KEY_WRAP_CREATE,
  FSL_KEY_WRAP_ACCEPT,
  FSL_KEY_WRAP_UNWRAP
}
enum  fsl_shw_ctr_mod_t { ,
  FSL_CTR_MOD_8,
  FSL_CTR_MOD_16,
  FSL_CTR_MOD_24,
  FSL_CTR_MOD_32,
  FSL_CTR_MOD_40,
  FSL_CTR_MOD_48,
  FSL_CTR_MOD_56,
  FSL_CTR_MOD_64,
  FSL_CTR_MOD_72,
  FSL_CTR_MOD_80,
  FSL_CTR_MOD_88,
  FSL_CTR_MOD_96,
  FSL_CTR_MOD_104,
  FSL_CTR_MOD_112,
  FSL_CTR_MOD_120,
  FSL_CTR_MOD_128,
  FSL_CTR_MOD_8,
  FSL_CTR_MOD_16,
  FSL_CTR_MOD_24,
  FSL_CTR_MOD_32,
  FSL_CTR_MOD_40,
  FSL_CTR_MOD_48,
  FSL_CTR_MOD_56,
  FSL_CTR_MOD_64,
  FSL_CTR_MOD_72,
  FSL_CTR_MOD_80,
  FSL_CTR_MOD_88,
  FSL_CTR_MOD_96,
  FSL_CTR_MOD_104,
  FSL_CTR_MOD_112,
  FSL_CTR_MOD_120,
  FSL_CTR_MOD_128,
  FSL_CTR_MOD_8,
  FSL_CTR_MOD_16,
  FSL_CTR_MOD_24,
  FSL_CTR_MOD_32,
  FSL_CTR_MOD_40,
  FSL_CTR_MOD_48,
  FSL_CTR_MOD_56,
  FSL_CTR_MOD_64,
  FSL_CTR_MOD_72,
  FSL_CTR_MOD_80,
  FSL_CTR_MOD_88,
  FSL_CTR_MOD_96,
  FSL_CTR_MOD_104,
  FSL_CTR_MOD_112,
  FSL_CTR_MOD_120,
  FSL_CTR_MOD_128,
  FSL_CTR_MOD_8,
  FSL_CTR_MOD_16,
  FSL_CTR_MOD_24,
  FSL_CTR_MOD_32,
  FSL_CTR_MOD_40,
  FSL_CTR_MOD_48,
  FSL_CTR_MOD_56,
  FSL_CTR_MOD_64,
  FSL_CTR_MOD_72,
  FSL_CTR_MOD_80,
  FSL_CTR_MOD_88,
  FSL_CTR_MOD_96,
  FSL_CTR_MOD_104,
  FSL_CTR_MOD_112,
  FSL_CTR_MOD_120,
  FSL_CTR_MOD_128
}
enum  fsl_shw_permission_t { ,
  FSL_PERM_NO_ZEROIZE,
  FSL_PERM_TRUSTED_KEY_READ,
  FSL_PERM_HD_S,
  FSL_PERM_HD_R,
  FSL_PERM_HD_W,
  FSL_PERM_HD_X,
  FSL_PERM_TH_R,
  FSL_PERM_TH_W,
  FSL_PERM_OT_R,
  FSL_PERM_OT_W,
  FSL_PERM_OT_X,
  FSL_PERM_NO_ZEROIZE = 0x80000000,
  FSL_PERM_TRUSTED_KEY_READ = 0x40000000,
  FSL_PERM_HD_S = 0x00000800,
  FSL_PERM_HD_R = 0x00000400,
  FSL_PERM_HD_W = 0x00000200,
  FSL_PERM_HD_X = 0x00000100,
  FSL_PERM_TH_R = 0x00000040,
  FSL_PERM_TH_W = 0x00000020,
  FSL_PERM_OT_R = 0x00000004,
  FSL_PERM_OT_W = 0x00000002,
  FSL_PERM_OT_X = 0x00000001,
  FSL_PERM_NO_ZEROIZE,
  FSL_PERM_TRUSTED_KEY_READ,
  FSL_PERM_HD_S,
  FSL_PERM_HD_R,
  FSL_PERM_HD_W,
  FSL_PERM_HD_X,
  FSL_PERM_TH_R,
  FSL_PERM_TH_W,
  FSL_PERM_OT_R,
  FSL_PERM_OT_W,
  FSL_PERM_OT_X,
  FSL_PERM_NO_ZEROIZE = 0x80000000,
  FSL_PERM_TRUSTED_KEY_READ = 0x40000000,
  FSL_PERM_HD_S = 0x00000800,
  FSL_PERM_HD_R = 0x00000400,
  FSL_PERM_HD_W = 0x00000200,
  FSL_PERM_HD_X = 0x00000100,
  FSL_PERM_TH_R = 0x00000040,
  FSL_PERM_TH_W = 0x00000020,
  FSL_PERM_OT_R = 0x00000004,
  FSL_PERM_OT_W = 0x00000002,
  FSL_PERM_OT_X = 0x00000001
}
enum  fsl_shw_cypher_mode_t {
  FSL_SHW_CYPHER_MODE_ECB = 1,
  FSL_SHW_CYPHER_MODE_CBC = 2,
  FSL_SHW_CYPHER_MODE_ECB,
  FSL_SHW_CYPHER_MODE_CBC,
  FSL_SHW_CYPHER_MODE_ECB = 1,
  FSL_SHW_CYPHER_MODE_CBC = 2,
  FSL_SHW_CYPHER_MODE_ECB,
  FSL_SHW_CYPHER_MODE_CBC,
  FSL_SHW_CYPHER_MODE_ECB = 1,
  FSL_SHW_CYPHER_MODE_CBC = 2
}
enum  fsl_shw_pf_key_t {
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND,
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND,
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND,
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND,
  FSL_SHW_PF_KEY_IIM,
  FSL_SHW_PF_KEY_PRG,
  FSL_SHW_PF_KEY_IIM_PRG,
  FSL_SHW_PF_KEY_IIM_RND,
  FSL_SHW_PF_KEY_RND
}
enum  fsl_shw_tamper_t {
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO,
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO,
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO,
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO,
  FSL_SHW_TAMPER_NONE,
  FSL_SHW_TAMPER_WTD,
  FSL_SHW_TAMPER_ETBD,
  FSL_SHW_TAMPER_ETAD,
  FSL_SHW_TAMPER_EBD,
  FSL_SHW_TAMPER_SAD,
  FSL_SHW_TAMPER_TTD,
  FSL_SHW_TAMPER_CTD,
  FSL_SHW_TAMPER_VTD,
  FSL_SHW_TAMPER_MCO,
  FSL_SHW_TAMPER_TCO
}
enum  fsl_shw_partition_status_t {
  FSL_PART_S_UNUSABLE,
  FSL_PART_S_UNAVAILABLE,
  FSL_PART_S_AVAILABLE,
  FSL_PART_S_ALLOCATED,
  FSL_PART_S_ENGAGED,
  FSL_PART_S_UNUSABLE,
  FSL_PART_S_UNAVAILABLE,
  FSL_PART_S_AVAILABLE,
  FSL_PART_S_ALLOCATED,
  FSL_PART_S_ENGAGED,
  FSL_PART_S_UNUSABLE,
  FSL_PART_S_UNAVAILABLE,
  FSL_PART_S_AVAILABLE,
  FSL_PART_S_ALLOCATED,
  FSL_PART_S_ENGAGED
}

Functions

fsl_shw_pco_tfsl_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, unsigned result_size, fsl_shw_result_t results[], unsigned *result_count)
fsl_shw_return_t fsl_shw_establish_key (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_key_wrap_t establish_type, const uint8_t *key)
fsl_shw_return_t fsl_shw_extract_key (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, uint8_t *covered_key)
fsl_shw_return_t fsl_shw_release_key (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info)
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)
fsl_shw_return_t fsl_shw_symmetric_encrypt (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_scco_t *sym_ctx, uint32_t length, const uint8_t *pt, uint8_t *ct)
fsl_shw_return_t fsl_shw_symmetric_decrypt (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_scco_t *sym_ctx, uint32_t length, const uint8_t *ct, uint8_t *pt)
fsl_shw_return_t fsl_shw_hash (fsl_shw_uco_t *user_ctx, fsl_shw_hco_t *hash_ctx, const uint8_t *msg, uint32_t length, uint8_t *result, uint32_t result_len)
fsl_shw_return_t fsl_shw_hmac_precompute (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_hmco_t *hmac_ctx)
fsl_shw_return_t fsl_shw_hmac (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, fsl_shw_hmco_t *hmac_ctx, const uint8_t *msg, uint32_t length, uint8_t *result, uint32_t result_len)
fsl_shw_return_t fsl_shw_get_random (fsl_shw_uco_t *user_ctx, uint32_t length, uint8_t *data)
fsl_shw_return_t fsl_shw_add_entropy (fsl_shw_uco_t *user_ctx, uint32_t length, uint8_t *data)
fsl_shw_return_t fsl_shw_gen_encrypt (fsl_shw_uco_t *user_ctx, fsl_shw_acco_t *auth_ctx, fsl_shw_sko_t *cipher_key_info, fsl_shw_sko_t *auth_key_info, uint32_t auth_data_length, const uint8_t *auth_data, uint32_t payload_length, const uint8_t *payload, uint8_t *ct, uint8_t *auth_value)
fsl_shw_return_t fsl_shw_auth_decrypt (fsl_shw_uco_t *user_ctx, fsl_shw_acco_t *auth_ctx, fsl_shw_sko_t *cipher_key_info, fsl_shw_sko_t *auth_key_info, uint32_t auth_data_length, const uint8_t *auth_data, uint32_t payload_length, const uint8_t *ct, const uint8_t *auth_value, uint8_t *payload)
fsl_shw_return_t fsl_shw_read_key (fsl_shw_uco_t *user_ctx, fsl_shw_sko_t *key_info, uint8_t *key)

Variables

struct sah_Head_Deschead
struct sah_Head_Desctail
uint32_t len1
void * ptr1
uint32_t len2
void * ptr2
struct sah_Descnext
struct fsl_shw_uco_tuser_info
uint32_t user_ref
uint32_t uco_flags
uint32_t status
uint32_t error_status
uint32_t fault_address
uint32_t op_status
fsl_shw_return_t result
struct sah_Head_Descnext
struct sah_Head_Descprev
struct sah_Head_Descuser_desc
void * out1_ptr
void * out2_ptr
uint32_t out_len
uint8_t * data
struct sah_Linknext
sah_Link_Flags flags
key_userid_t ownerid
uint32_t slot
void *(* mu_malloc )(void *ref, size_t n)
sah_Head_Desc *(* mu_alloc_head_desc )(void *ref)
void(* mu_free )(void *ref, void *ptr)
void(* mu_free_head_desc )(void *ref, sah_Head_Desc *ptr)
void(* mu_free_desc )(void *ref, sah_Desc *ptr)
void(* mu_free_link )(void *ref, sah_Link *ptr)
void *(* mu_memcpy )(void *ref, void *dest, const void *src, size_t n)
void *(* mu_memset )(void *ref, void *ptr, int ch, size_t n)
void * kernel_base
struct fsl_shw_spo_tnext
sah_Mem_Utilmem_util
uint32_t user_ref
void(* callback )(struct fsl_shw_uco_t *uco)
uint32_t flags
unsigned pool_size
struct fsl_shw_uco_tnext
struct fsl_shw_kso_tkeystore
int scm_version
int smn_version
int block_size_bytes
int   red_ram_size_blocks
int   partition_count
uint8_t digest_length
uint8_t context_length
uint8_t context_register_length
uint32_t ongoing_context [9]
uint32_t inner_precompute [9]
uint32_t outer_precompute [9]
fsl_shw_acc_mode_t mode
uint8_t mac_length
unsigned q_length
fsl_shw_scco_t cipher_ctx_info
fsl_shw_hco_t   hash_ctx_info
union {
   fsl_shw_scco_t   CCM_ctx_info
   fsl_shw_hco_t   hash_ctx_info
auth_info
uint8_t unencrypted_mac [16]
unsigned * actual
fsl_shw_result_tresults
int   red_ram_size_blocks
int   partition_count
fsl_shw_hco_t   hash_ctx_info
union {
   fsl_shw_scco_t   CCM_ctx_info
   fsl_shw_hco_t   hash_ctx_info
auth_info

Detailed Description

Flags to show information about link data and link segments.


Define Documentation

#define fsl_shw_acco_clear_flags ( acobject,
acflags   )     (acobject)->flags &= ~(acflags)

Clear some flags in a Authentication-Cipher Context Object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
acobject Pointer to object to operate on.
acflags The flags to reset (one or more from fsl_shw_auth_ctx_flags_t ORed together).
#define fsl_shw_acco_clear_flags ( acobject,
acflags   )     (acobject)->flags &= ~(acflags)

Clear some flags in a Authentication-Cipher Context Object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
acobject Pointer to object to operate on.
acflags The flags to reset (one or more from fsl_shw_auth_ctx_flags_t ORed together).
#define fsl_shw_acco_init ( acobject,
acmode   ) 
Value:
{                                                                          \
       (acobject)->flags = 0;                                                 \
       (acobject)->mode = (acmode);                                           \
   }

Initialize a Authentication-Cipher Context.

Parameters:
acobject Pointer to object to operate on.
acmode The mode for this object (only FSL_ACC_MODE_CCM supported).
#define fsl_shw_acco_init ( acobject,
acmode   ) 
Value:
{                                                                          \
       (acobject)->flags = 0;                                                 \
       (acobject)->mode = (acmode);                                           \
   }

Initialize a Authentication-Cipher Context.

Parameters:
acobject Pointer to object to operate on.
acmode The mode for this object (only FSL_ACC_MODE_CCM supported).
#define fsl_shw_acco_set_ccm ( acobject,
acalg,
accounter,
acmaclen   ) 
Value:
{                                                                             \
      (acobject)->flags = 0;                                                  \
      (acobject)->mode = FSL_ACC_MODE_CCM;                                    \
      (acobject)->auth_info.CCM_ctx_info.block_size_bytes = 16;               \
      (acobject)->cipher_ctx_info.block_size_bytes = 16;                      \
      (acobject)->mac_length = acmaclen;                                      \
      fsl_shw_scco_set_counter_info(&(acobject)->cipher_ctx_info, accounter,  \
            FSL_CTR_MOD_128);                                                 \
}

Set up the Authentication-Cipher Object for CCM mode.

This will set the auth_object for CCM mode and save the ctr, and mac_length. This function can be called instead of fsl_shw_acco_init().

The paramater ctr is Counter Block 0, (counter value 0), which is for the MAC.

Parameters:
acobject Pointer to object to operate on.
acalg Cipher algorithm. Only AES is supported.
accounter The initial counter value.
acmaclen The number of octets used for the MAC. Valid values are 4, 6, 8, 10, 12, 14, and 16.
#define fsl_shw_acco_set_ccm ( acobject,
acalg,
accounter,
acmaclen   ) 
Value:
{                                                                             \
      (acobject)->flags = 0;                                                  \
      (acobject)->mode = FSL_ACC_MODE_CCM;                                    \
      (acobject)->auth_info.CCM_ctx_info.block_size_bytes = 16;               \
      (acobject)->cipher_ctx_info.block_size_bytes = 16;                      \
      (acobject)->mac_length = acmaclen;                                      \
      fsl_shw_scco_set_counter_info(&(acobject)->cipher_ctx_info, accounter,  \
            FSL_CTR_MOD_128);                                                 \
}

Set up the Authentication-Cipher Object for CCM mode.

This will set the auth_object for CCM mode and save the ctr, and mac_length. This function can be called instead of fsl_shw_acco_init().

The paramater ctr is Counter Block 0, (counter value 0), which is for the MAC.

Parameters:
acobject Pointer to object to operate on.
acalg Cipher algorithm. Only AES is supported.
accounter The initial counter value.
acmaclen The number of octets used for the MAC. Valid values are 4, 6, 8, 10, 12, 14, and 16.
#define fsl_shw_acco_set_flags ( acobject,
acflags   )     (acobject)->flags |= (acflags)

Set the flags for a Authentication-Cipher Context.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
acobject Pointer to object to operate on.
acflags The flags to set (one or more from fsl_shw_auth_ctx_flags_t ORed together).
#define fsl_shw_acco_set_flags ( acobject,
acflags   )     (acobject)->flags |= (acflags)

Set the flags for a Authentication-Cipher Context.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
acobject Pointer to object to operate on.
acflags The flags to set (one or more from fsl_shw_auth_ctx_flags_t ORed together).
#define fsl_shw_ccm_nist_format_ctr_and_iv ( acobject,
act,
acad,
acq,
acN,
acQ   ) 
Value:
{                                                                         \
        uint64_t Q = acQ;                                                     \
        uint8_t bflag = ((acad)?0x40:0) | ((((act)-2)/2)<<3) | ((acq)-1);     \
        unsigned i;                                                           \
        uint8_t* qptr = (acobject)->auth_info.CCM_ctx_info.context + 15;      \
        (acobject)->auth_info.CCM_ctx_info.block_size_bytes = 16;             \
        (acobject)->cipher_ctx_info.block_size_bytes = 16;                    \
        (acobject)->mode = FSL_ACC_MODE_CCM;                                  \
        (acobject)->flags  = FSL_ACCO_NIST_CCM;                               \
                                                                              \
        /* Store away the MAC length (after calculating actual value */       \
        (acobject)->mac_length = (act);                                       \
        /* Set Flag field in Block 0 */                                       \
        *((acobject)->auth_info.CCM_ctx_info.context) = bflag;                \
        /* Set Nonce field in Block 0 */                                      \
        copy_bytes((acobject)->auth_info.CCM_ctx_info.context+1, acN,         \
                   15-(acq));                                                 \
        /* Set Flag field in ctr */                                           \
        *((acobject)->cipher_ctx_info.context) = (acq)-1;                     \
        /* Update the Q (payload length) field of Block0 */                   \
        (acobject)->q_length = acq;                                           \
        for (i = 0; i < (acq); i++) {                                         \
            *qptr-- = Q & 0xFF;                                               \
            Q >>= 8;                                                          \
        }                                                                     \
        /* Set the Nonce field of the ctr */                                  \
        copy_bytes((acobject)->cipher_ctx_info.context+1, acN, 15-(acq));     \
        /* Clear the block counter field of the ctr */                        \
        memset((acobject)->cipher_ctx_info.context+16-(acq), 0, (acq)+1);     \
     }

Format the First Block (IV) & Initial Counter Value per NIST CCM.

This function will also set the IV and CTR values per Appendix A of NIST Special Publication 800-38C (May 2004). It will also perform the fsl_shw_acco_set_ccm() operation with information derived from this set of parameters.

Note this function assumes the algorithm is AES. It initializes the auth_object by setting the mode to FSL_ACC_MODE_CCM and setting the flags to be FSL_ACCO_NIST_CCM.

Parameters:
acobject Pointer to object to operate on.
act The number of octets used for the MAC. Valid values are 4, 6, 8, 10, 12, 14, and 16.
acad Number of octets of Associated Data (may be zero).
acq A value for the size of the length of q field. Valid values are 1-8.
acN The Nonce (packet number or other changing value). Must be (15 - q_length) octets long.
acQ The value of Q (size of the payload in octets).
#define fsl_shw_ccm_nist_format_ctr_and_iv ( acobject,
act,
acad,
acq,
acN,
acQ   ) 
Value:
{                                                                         \
        uint64_t Q = acQ;                                                     \
        uint8_t bflag = ((acad)?0x40:0) | ((((act)-2)/2)<<3) | ((acq)-1);     \
        unsigned i;                                                           \
        uint8_t* qptr = (acobject)->auth_info.CCM_ctx_info.context + 15;      \
        (acobject)->auth_info.CCM_ctx_info.block_size_bytes = 16;             \
        (acobject)->cipher_ctx_info.block_size_bytes = 16;                    \
        (acobject)->mode = FSL_ACC_MODE_CCM;                                  \
        (acobject)->flags  = FSL_ACCO_NIST_CCM;                               \
                                                                              \
        /* Store away the MAC length (after calculating actual value */       \
        (acobject)->mac_length = (act);                                       \
        /* Set Flag field in Block 0 */                                       \
        *((acobject)->auth_info.CCM_ctx_info.context) = bflag;                \
        /* Set Nonce field in Block 0 */                                      \
        copy_bytes((acobject)->auth_info.CCM_ctx_info.context+1, acN,         \
                   15-(acq));                                                 \
        /* Set Flag field in ctr */                                           \
        *((acobject)->cipher_ctx_info.context) = (acq)-1;                     \
        /* Update the Q (payload length) field of Block0 */                   \
        (acobject)->q_length = acq;                                           \
        for (i = 0; i < (acq); i++) {                                         \
            *qptr-- = Q & 0xFF;                                               \
            Q >>= 8;                                                          \
        }                                                                     \
        /* Set the Nonce field of the ctr */                                  \
        copy_bytes((acobject)->cipher_ctx_info.context+1, acN, 15-(acq));     \
        /* Clear the block counter field of the ctr */                        \
        memset((acobject)->cipher_ctx_info.context+16-(acq), 0, (acq)+1);     \
     }

Format the First Block (IV) & Initial Counter Value per NIST CCM.

This function will also set the IV and CTR values per Appendix A of NIST Special Publication 800-38C (May 2004). It will also perform the fsl_shw_acco_set_ccm() operation with information derived from this set of parameters.

Note this function assumes the algorithm is AES. It initializes the auth_object by setting the mode to FSL_ACC_MODE_CCM and setting the flags to be FSL_ACCO_NIST_CCM.

Parameters:
acobject Pointer to object to operate on.
act The number of octets used for the MAC. Valid values are 4, 6, 8, 10, 12, 14, and 16.
acad Number of octets of Associated Data (may be zero).
acq A value for the size of the length of q field. Valid values are 1-8.
acN The Nonce (packet number or other changing value). Must be (15 - q_length) octets long.
acQ The value of Q (size of the payload in octets).
#define fsl_shw_ccm_nist_update_ctr_and_iv ( acobject,
acN,
acQ   ) 
Value:
{                                                                        \
        uint64_t Q = acQ;                                                     \
        unsigned i;                                                           \
        uint8_t* qptr = (acobject)->auth_info.CCM_ctx_info.context + 15;      \
                                                                              \
        /* Update the Nonce field field of Block0 */                          \
        copy_bytes((acobject)->auth_info.CCM_ctx_info.context+1, acN,         \
               15 - (acobject)->q_length);                                    \
        /* Update the Q (payload length) field of Block0 */                   \
        for (i = 0; i < (acobject)->q_length; i++) {                          \
            *qptr-- = Q & 0xFF;                                               \
            Q >>= 8;                                                          \
        }                                                                     \
        /* Update the Nonce field of the ctr */                               \
        copy_bytes((acobject)->cipher_ctx_info.context+1, acN,                \
               15 - (acobject)->q_length);                                    \
     }

Update the First Block (IV) & Initial Counter Value per NIST CCM.

This function will set the IV and CTR values per Appendix A of NIST Special Publication 800-38C (May 2004).

Note this function assumes that fsl_shw_ccm_nist_format_ctr_and_iv() has previously been called on the auth_object.

Parameters:
acobject Pointer to object to operate on.
acN The Nonce (packet number or other changing value). Must be (15 - q_length) octets long.
acQ The value of Q (size of the payload in octets).
#define fsl_shw_ccm_nist_update_ctr_and_iv ( acobject,
acN,
acQ   ) 
Value:
{                                                                        \
        uint64_t Q = acQ;                                                     \
        unsigned i;                                                           \
        uint8_t* qptr = (acobject)->auth_info.CCM_ctx_info.context + 15;      \
                                                                              \
        /* Update the Nonce field field of Block0 */                          \
        copy_bytes((acobject)->auth_info.CCM_ctx_info.context+1, acN,         \
               15 - (acobject)->q_length);                                    \
        /* Update the Q (payload length) field of Block0 */                   \
        for (i = 0; i < (acobject)->q_length; i++) {                          \
            *qptr-- = Q & 0xFF;                                               \
            Q >>= 8;                                                          \
        }                                                                     \
        /* Update the Nonce field of the ctr */                               \
        copy_bytes((acobject)->cipher_ctx_info.context+1, acN,                \
               15 - (acobject)->q_length);                                    \
     }

Update the First Block (IV) & Initial Counter Value per NIST CCM.

This function will set the IV and CTR values per Appendix A of NIST Special Publication 800-38C (May 2004).

Note this function assumes that fsl_shw_ccm_nist_format_ctr_and_iv() has previously been called on the auth_object.

Parameters:
acobject Pointer to object to operate on.
acN The Nonce (packet number or other changing value). Must be (15 - q_length) octets long.
acQ The value of Q (size of the payload in octets).
#define fsl_shw_hco_clear_flags ( hcobject,
hcflags   )     (hcobject)->flags &= ~(hcflags)

Clear flags in a Hash Context Object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
hcobject The hash context to be operated on.
hcflags The flags to be reset in the context. These can be ORed members of fsl_shw_hash_ctx_flags_t.
#define fsl_shw_hco_clear_flags ( hcobject,
hcflags   )     (hcobject)->flags &= ~(hcflags)

Clear flags in a Hash Context Object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
hcobject The hash context to be operated on.
hcflags The flags to be reset in the context. These can be ORed members of fsl_shw_hash_ctx_flags_t.
#define fsl_shw_hco_get_digest ( hcobject,
hccontext,
hcclength,
hcmsglen   ) 
Value:
{                                                                             \
     copy_bytes(hccontext, (hcobject)->context, hcclength);                   \
         if ((hcobject)->algorithm == FSL_HASH_ALG_SHA224                     \
             || (hcobject)->algorithm == FSL_HASH_ALG_SHA256) {               \
             *(hcmsglen) = (hcobject)->context[8];                            \
         } else {                                                             \
             *(hcmsglen) = (hcobject)->context[5];                            \
         }                                                                    \
}

Get the current hash value and message length from the hash context object.

The algorithm must have already been specified. See fsl_shw_hco_init().

Parameters:
hcobject The hash context to query.
[out] hccontext Pointer to the location of length octets where to store a copy of the current value of the digest.
hcclength Number of octets of hash value to copy.
[out] hcmsglen Pointer to the location to store the number of octets already hashed.
#define fsl_shw_hco_get_digest ( hcobject,
hccontext,
hcclength,
hcmsglen   ) 
Value:
{                                                                             \
     copy_bytes(hccontext, (hcobject)->context, hcclength);                   \
         if ((hcobject)->algorithm == FSL_HASH_ALG_SHA224                     \
             || (hcobject)->algorithm == FSL_HASH_ALG_SHA256) {               \
             *(hcmsglen) = (hcobject)->context[8];                            \
         } else {                                                             \
             *(hcmsglen) = (hcobject)->context[5];                            \
         }                                                                    \
}

Get the current hash value and message length from the hash context object.

The algorithm must have already been specified. See fsl_shw_hco_init().

Parameters:
hcobject The hash context to query.
[out] hccontext Pointer to the location of length octets where to store a copy of the current value of the digest.
hcclength Number of octets of hash value to copy.
[out] hcmsglen Pointer to the location to store the number of octets already hashed.
#define fsl_shw_hco_get_info ( hcobject,
hcalgorithm   ) 
Value:
{                                                                             \
     *(hcalgorithm) = (hcobject)->algorithm;                                  \
}

Get the hash algorithm from the hash context object.

Parameters:
hcobject The hash context to query.
[out] hcalgorithm Pointer to where the algorithm is to be stored.
#define fsl_shw_hco_get_info ( hcobject,
hcalgorithm   ) 
Value:
{                                                                             \
     *(hcalgorithm) = (hcobject)->algorithm;                                  \
}

Get the hash algorithm from the hash context object.

Parameters:
hcobject The hash context to query.
[out] hcalgorithm Pointer to where the algorithm is to be stored.
#define fsl_shw_hco_init ( hcobject,
hcalgorithm   ) 
Value:
{                                                                             \
     (hcobject)->algorithm = hcalgorithm;                                     \
     (hcobject)->flags = 0;                                                   \
     switch (hcalgorithm) {                                                   \
     case FSL_HASH_ALG_MD5:                                                   \
         (hcobject)->digest_length = 16;                                      \
         (hcobject)->context_length = 16;                                     \
         (hcobject)->context_register_length = 24;                            \
         break;                                                               \
     case FSL_HASH_ALG_SHA1:                                                  \
         (hcobject)->digest_length = 20;                                      \
         (hcobject)->context_length = 20;                                     \
         (hcobject)->context_register_length = 24;                            \
         break;                                                               \
     case FSL_HASH_ALG_SHA224:                                                \
         (hcobject)->digest_length = 28;                                      \
         (hcobject)->context_length = 32;                                     \
         (hcobject)->context_register_length = 36;                            \
         break;                                                               \
     case FSL_HASH_ALG_SHA256:                                                \
         (hcobject)->digest_length = 32;                                      \
         (hcobject)->context_length = 32;                                     \
         (hcobject)->context_register_length = 36;                            \
         break;                                                               \
     default:                                                                 \
         /* error ! */                                                        \
         (hcobject)->digest_length = 1;                                       \
         (hcobject)->context_length = 1;                                      \
         (hcobject)->context_register_length = 1;                             \
         break;                                                               \
     }                                                                        \
}

Initialize a Hash Context Object.

This function must be called before performing any other operation with the Object. It sets the current message length and hash algorithm in the hash context object.

Parameters:
hcobject The hash context to operate upon.
hcalgorithm The hash algorithm to be used (FSL_HASH_ALG_MD5, FSL_HASH_ALG_SHA256, etc).
#define fsl_shw_hco_init ( hcobject,
hcalgorithm   ) 
Value:
{                                                                             \
     (hcobject)->algorithm = hcalgorithm;                                     \
     (hcobject)->flags = 0;                                                   \
     switch (hcalgorithm) {                                                   \
     case FSL_HASH_ALG_MD5:                                                   \
         (hcobject)->digest_length = 16;                                      \
         (hcobject)->context_length = 16;                                     \
         (hcobject)->context_register_length = 24;                            \
         break;                                                               \
     case FSL_HASH_ALG_SHA1:                                                  \
         (hcobject)->digest_length = 20;                                      \
         (hcobject)->context_length = 20;                                     \
         (hcobject)->context_register_length = 24;                            \
         break;                                                               \
     case FSL_HASH_ALG_SHA224:                                                \
         (hcobject)->digest_length = 28;                                      \
         (hcobject)->context_length = 32;                                     \
         (hcobject)->context_register_length = 36;                            \
         break;                                                               \
     case FSL_HASH_ALG_SHA256:                                                \
         (hcobject)->digest_length = 32;                                      \
         (hcobject)->context_length = 32;                                     \
         (hcobject)->context_register_length = 36;                            \
         break;                                                               \
     default:                                                                 \
         /* error ! */                                                        \
         (hcobject)->digest_length = 1;                                       \
         (hcobject)->context_length = 1;                                      \
         (hcobject)->context_register_length = 1;                             \
         break;                                                               \
     }                                                                        \
}

Initialize a Hash Context Object.

This function must be called before performing any other operation with the Object. It sets the current message length and hash algorithm in the hash context object.

Parameters:
hcobject The hash context to operate upon.
hcalgorithm The hash algorithm to be used (FSL_HASH_ALG_MD5, FSL_HASH_ALG_SHA256, etc).
#define fsl_shw_hco_set_digest ( hcobject,
hccontext,
hcmsglen   ) 
Value:
{                                                                             \
     copy_bytes((hcobject)->context, hccontext, (hcobject)->context_length);  \
     if (((hcobject)->algorithm == FSL_HASH_ALG_SHA224)                       \
         || ((hcobject)->algorithm == FSL_HASH_ALG_SHA256)) {                 \
         (hcobject)->context[8] = hcmsglen;                                   \
     } else {                                                                 \
         (hcobject)->context[5] = hcmsglen;                                   \
     }                                                                        \
}

Set the current hash value and message length in the hash context object.

The algorithm must have already been specified. See fsl_shw_hco_init().

Parameters:
hcobject The hash context to operate upon.
hccontext Pointer to buffer of appropriate length to copy into the hash context object.
hcmsglen The number of octets of the message which have already been hashed.
#define fsl_shw_hco_set_digest ( hcobject,
hccontext,
hcmsglen   ) 
Value:
{                                                                             \
     copy_bytes((hcobject)->context, hccontext, (hcobject)->context_length);  \
     if (((hcobject)->algorithm == FSL_HASH_ALG_SHA224)                       \
         || ((hcobject)->algorithm == FSL_HASH_ALG_SHA256)) {                 \
         (hcobject)->context[8] = hcmsglen;                                   \
     } else {                                                                 \
         (hcobject)->context[5] = hcmsglen;                                   \
     }                                                                        \
}

Set the current hash value and message length in the hash context object.

The algorithm must have already been specified. See fsl_shw_hco_init().

Parameters:
hcobject The hash context to operate upon.
hccontext Pointer to buffer of appropriate length to copy into the hash context object.
hcmsglen The number of octets of the message which have already been hashed.
#define fsl_shw_hco_set_flags ( hcobject,
hcflags   )     (hcobject)->flags |= (hcflags)

Set flags in a Hash Context Object.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
hcobject The hash context to be operated on.
hcflags The flags to be set in the context. These can be ORed members of fsl_shw_hash_ctx_flags_t.
#define fsl_shw_hco_set_flags ( hcobject,
hcflags   )     (hcobject)->flags |= (hcflags)

Set flags in a Hash Context Object.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
hcobject The hash context to be operated on.
hcflags The flags to be set in the context. These can be ORed members of fsl_shw_hash_ctx_flags_t.
#define fsl_shw_hmco_clear_flags ( hcobject,
hcflags   )     (hcobject)->flags &= ~(hcflags)

Clear flags in an HMAC Context Object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
hcobject The HMAC context to be operated on.
hcflags The flags to be reset in the context. These can be ORed members of fsl_shw_hmac_ctx_flags_t.
#define fsl_shw_hmco_clear_flags ( hcobject,
hcflags   )     (hcobject)->flags &= ~(hcflags)

Clear flags in an HMAC Context Object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
hcobject The HMAC context to be operated on.
hcflags The flags to be reset in the context. These can be ORed members of fsl_shw_hmac_ctx_flags_t.
#define fsl_shw_hmco_init ( hcobject,
hcalgorithm   )     fsl_shw_hco_init(hcobject, hcalgorithm)

Initialize an HMAC Context Object.

This function must be called before performing any other operation with the Object. It sets the current message length and hash algorithm in the HMAC context object.

Parameters:
hcobject The HMAC context to operate upon.
hcalgorithm The hash algorithm to be used (FSL_HASH_ALG_MD5, FSL_HASH_ALG_SHA256, etc).
#define fsl_shw_hmco_init ( hcobject,
hcalgorithm   )     fsl_shw_hco_init(hcobject, hcalgorithm)

Initialize an HMAC Context Object.

This function must be called before performing any other operation with the Object. It sets the current message length and hash algorithm in the HMAC context object.

Parameters:
hcobject The HMAC context to operate upon.
hcalgorithm The hash algorithm to be used (FSL_HASH_ALG_MD5, FSL_HASH_ALG_SHA256, etc).
#define fsl_shw_hmco_set_flags ( hcobject,
hcflags   )     (hcobject)->flags |= (hcflags)

Set flags in an HMAC Context Object.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
hcobject The HMAC context to be operated on.
hcflags The flags to be set in the context. These can be ORed members of fsl_shw_hmac_ctx_flags_t.
#define fsl_shw_hmco_set_flags ( hcobject,
hcflags   )     (hcobject)->flags |= (hcflags)

Set flags in an HMAC Context Object.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
hcobject The HMAC context to be operated on.
hcflags The flags to be set in the context. These can be ORed members of fsl_shw_hmac_ctx_flags_t.
#define fsl_shw_pco_check_auth_supported ( pcobject,
pcmode   )     ((pcmode == FSL_ACC_MODE_CCM) ? 1 : 0)

Determine whether a given Encryption-Authentication mode is supported.

Parameters:
pcobject The Platform Capababilities Object to query.
pcmode The Authentication mode.
Returns:
0 if mode is not supported, non-zero if supported.
#define fsl_shw_pco_check_auth_supported ( pcobject,
pcmode   )     ((pcmode == FSL_ACC_MODE_CCM) ? 1 : 0)

Determine whether a given Encryption-Authentication mode is supported.

Parameters:
pcobject The Platform Capababilities Object to query.
pcmode The Authentication mode.
Returns:
0 if mode is not supported, non-zero if supported.
#define fsl_shw_pco_check_black_key_supported ( pcobject   )     1

Determine whether Black Keys (key establishment / wrapping) is supported.

Parameters:
pcobject The Platform Capababilities Object to query.
Returns:
0 if wrapping is not supported, non-zero if supported.
#define fsl_shw_pco_check_black_key_supported ( pcobject   )     1

Determine whether Black Keys (key establishment / wrapping) is supported.

Parameters:
pcobject The Platform Capababilities Object to query.
Returns:
0 if wrapping is not supported, non-zero if supported.
#define fsl_shw_pco_check_pk_supported ( pcobject   )     0

Determine whether Programmed Key features are available

Parameters:
pc_info The Platform Capabilities Object to query.
Returns:
1 if Programmed Key features are available, otherwise zero.
#define fsl_shw_pco_check_pk_supported ( pcobject   )     0

Determine whether Programmed Key features are available

Parameters:
pc_info The Platform Capabilities Object to query.
Returns:
1 if Programmed Key features are available, otherwise zero.
#define fsl_shw_pco_check_spo_supported ( pcobject   )     ((pcobject)->scm_version == 2)

Determine whether Secure Partitions are supported

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
0 if secure partitions are not supported, non-zero if supported.
#define fsl_shw_pco_check_spo_supported ( pcobject   )     ((pcobject)->scm_version == 2)

Determine whether Secure Partitions are supported

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
0 if secure partitions are not supported, non-zero if supported.
#define fsl_shw_pco_check_sw_keys_supported ( pcobject   )     0

Determine whether Software Key features are available

Parameters:
pc_info The Platform Capabilities Object to query.
Returns:
1 if Software key features are available, otherwise zero.
#define fsl_shw_pco_check_sw_keys_supported ( pcobject   )     0

Determine whether Software Key features are available

Parameters:
pc_info The Platform Capabilities Object to query.
Returns:
1 if Software key features are available, otherwise zero.
#define fsl_shw_pco_check_sym_supported ( pcobject,
pcalg,
pcmode   )     ((pcobject)->sym_support[pcalg][pcmode])

Determine whether the combination of a given symmetric algorithm and a given mode is supported.

Parameters:
pcobject The Platform Capababilities Object to query.
pcalg A Symmetric Cipher algorithm.
pcmode A Symmetric Cipher mode.
Returns:
0 if combination is not supported, non-zero if supported.
#define fsl_shw_pco_check_sym_supported ( pcobject,
pcalg,
pcmode   )     ((pcobject)->sym_support[pcalg][pcmode])

Determine whether the combination of a given symmetric algorithm and a given mode is supported.

Parameters:
pcobject The Platform Capababilities Object to query.
pcalg A Symmetric Cipher algorithm.
pcmode A Symmetric Cipher mode.
Returns:
0 if combination is not supported, non-zero if supported.
#define fsl_shw_pco_get_driver_version ( pcobject,
pcmajor,
pcminor   ) 
Value:
{                                                                             \
    *(pcmajor) = (pcobject)->driver_major;                                    \
    *(pcminor) = (pcobject)->driver_minor;                                    \
}

Get underlying driver version.

Parameters:
pcobject The Platform Capababilities Object to query.
[out] pcmajor A pointer to where the major version of the driver is to be stored.
[out] pcminor A pointer to where the minor version of the driver is to be stored.
#define fsl_shw_pco_get_driver_version ( pcobject,
pcmajor,
pcminor   ) 
Value:
{                                                                             \
    *(pcmajor) = (pcobject)->driver_major;                                    \
    *(pcminor) = (pcobject)->driver_minor;                                    \
}

Get underlying driver version.

Parameters:
pcobject The Platform Capababilities Object to query.
[out] pcmajor A pointer to where the major version of the driver is to be stored.
[out] pcminor A pointer to where the minor version of the driver is to be stored.
#define fsl_shw_pco_get_hash_algorithms ( pcobject,
gsalgorithms,
gsacount   ) 
Value:
{                                                                             \
    *(gsalgorithms) = (pcobject)->hash_algorithms;                            \
    *(gsacount) = sizeof((pcobject)->hash_algorithms)/4;                      \
}

Get list of hash algorithms supported.

Parameters:
pcobject The Platform Capababilities Object to query.
[out] gsalgorithms A pointer which will be set to the list of algorithms.
[out] gsacount The number of algorithms in the list at algorithms.
#define fsl_shw_pco_get_hash_algorithms ( pcobject,
gsalgorithms,
gsacount   ) 
Value:
{                                                                             \
    *(gsalgorithms) = (pcobject)->hash_algorithms;                            \
    *(gsacount) = sizeof((pcobject)->hash_algorithms)/4;                      \
}

Get list of hash algorithms supported.

Parameters:
pcobject The Platform Capababilities Object to query.
[out] gsalgorithms A pointer which will be set to the list of algorithms.
[out] gsacount The number of algorithms in the list at algorithms.
#define fsl_shw_pco_get_scc_driver_version ( pcobject,
pcmajor,
pcminor   ) 
Value:
{                                                                             \
    *(pcmajor) = (pcobject)->scc_driver_major;                                \
    *(pcminor) = (pcobject)->scc_driver_minor;                                \
}

Get FSL SHW SCC driver version

Parameters:
pcobject The Platform Capabilities Object to query.
[out] pcmajor A pointer to where the major version of the SCC driver is to be stored.
[out] pcminor A pointer to where the minor version of the SCC driver is to be stored.
#define fsl_shw_pco_get_scc_driver_version ( pcobject,
pcmajor,
pcminor   ) 
Value:
{                                                                             \
    *(pcmajor) = (pcobject)->scc_driver_major;                                \
    *(pcminor) = (pcobject)->scc_driver_minor;                                \
}

Get FSL SHW SCC driver version

Parameters:
pcobject The Platform Capabilities Object to query.
[out] pcmajor A pointer to where the major version of the SCC driver is to be stored.
[out] pcminor A pointer to where the minor version of the SCC driver is to be stored.
#define fsl_shw_pco_get_scm_block_size ( pcobject   )     ((pcobject)->block_size_bytes)

Get the size of an SCM block, in bytes

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
The size of an SCM block, in bytes.
#define fsl_shw_pco_get_scm_block_size ( pcobject   )     ((pcobject)->block_size_bytes)

Get the size of an SCM block, in bytes

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
The size of an SCM block, in bytes.
#define fsl_shw_pco_get_scm_version ( pcobject   )     ((pcobject)->scm_version)

Get SCM hardware version

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
The SCM hardware version
#define fsl_shw_pco_get_scm_version ( pcobject   )     ((pcobject)->scm_version)

Get SCM hardware version

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
The SCM hardware version
#define fsl_shw_pco_get_smn_size ( pcobject,
black_size,
red_size   ) 
Value:
{                                                                             \
    if ((pcobject)->scm_version == 1) {                                       \
        *(black_size) = (pcobject)->scc_info.black_ram_size_blocks;           \
        *(red_size)   = (pcobject)->scc_info.red_ram_size_blocks;             \
    } else {                                                                  \
        *(black_size) = 0;                                                    \
        *(red_size)   = 0;                                                    \
    }                                                                         \
}

Get size of Black and Red RAM memory

Parameters:
pcobject The Platform Capabilities Object to query.
[out] black_size A pointer to where the size of the Black RAM, in blocks, is to be placed.
[out] red_size A pointer to where the size of the Red RAM, in blocks, is to be placed.
#define fsl_shw_pco_get_smn_size ( pcobject,
black_size,
red_size   ) 
Value:
{                                                                             \
    if ((pcobject)->scm_version == 1) {                                       \
        *(black_size) = (pcobject)->scc_info.black_ram_size_blocks;           \
        *(red_size)   = (pcobject)->scc_info.red_ram_size_blocks;             \
    } else {                                                                  \
        *(black_size) = 0;                                                    \
        *(red_size)   = 0;                                                    \
    }                                                                         \
}

Get size of Black and Red RAM memory

Parameters:
pcobject The Platform Capabilities Object to query.
[out] black_size A pointer to where the size of the Black RAM, in blocks, is to be placed.
[out] red_size A pointer to where the size of the Red RAM, in blocks, is to be placed.
#define fsl_shw_pco_get_smn_version ( pcobject   )     ((pcobject)->smn_version)

Get SMN hardware version

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
The SMN hardware version
#define fsl_shw_pco_get_smn_version ( pcobject   )     ((pcobject)->smn_version)

Get SMN hardware version

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
The SMN hardware version
#define fsl_shw_pco_get_spo_count ( pcobject   ) 
Value:
(((pcobject)->scm_version == 2) ?                                       \
        ((pcobject)->scc2_info.partition_count) : 0 )

Get the number of Secure Partitions on this platform

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
Number of partitions. 0 if Secure Paritions not supported. Note that this returns the total number of partitions, not all may be available to the user.
#define fsl_shw_pco_get_spo_count ( pcobject   ) 
Value:
(((pcobject)->scm_version == 2) ?                                       \
        ((pcobject)->scc2_info.partition_count) : 0 )

Get the number of Secure Partitions on this platform

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
Number of partitions. 0 if Secure Paritions not supported. Note that this returns the total number of partitions, not all may be available to the user.
#define fsl_shw_pco_get_spo_size_bytes ( pcobject   ) 
Value:
(((pcobject)->scm_version == 2) ?                                       \
        ((pcobject)->scc2_info.partition_size_bytes) : 0 )

Get the size of a Secure Partitions

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
Partition size, in bytes. 0 if Secure Partitions not supported.
#define fsl_shw_pco_get_spo_size_bytes ( pcobject   ) 
Value:
(((pcobject)->scm_version == 2) ?                                       \
        ((pcobject)->scc2_info.partition_size_bytes) : 0 )

Get the size of a Secure Partitions

Parameters:
pcobject The Platform Capabilities Object to query.
Returns:
Partition size, in bytes. 0 if Secure Partitions not supported.
#define fsl_shw_pco_get_sym_algorithms ( pcobject,
pcalgorithms,
pcacount   ) 
Value:
{                                                                             \
    *(pcalgorithms) = (pcobject)->sym_algorithms;                             \
    *(pcacount) = sizeof((pcobject)->sym_algorithms)/4;                       \
}

Get list of symmetric algorithms supported.

Parameters:
pcobject The Platform Capababilities Object to query.
[out] pcalgorithms A pointer to where to store the location of the list of algorithms.
[out] pcacount A pointer to where to store the number of algorithms in the list at algorithms.
#define fsl_shw_pco_get_sym_algorithms ( pcobject,
pcalgorithms,
pcacount   ) 
Value:
{                                                                             \
    *(pcalgorithms) = (pcobject)->sym_algorithms;                             \
    *(pcacount) = sizeof((pcobject)->sym_algorithms)/4;                       \
}

Get list of symmetric algorithms supported.

Parameters:
pcobject The Platform Capababilities Object to query.
[out] pcalgorithms A pointer to where to store the location of the list of algorithms.
[out] pcacount A pointer to where to store the number of algorithms in the list at algorithms.
#define fsl_shw_pco_get_sym_modes ( pcobject,
gsmodes,
gsacount   ) 
Value:
{                                                                             \
    *(gsmodes) = (pcobject)->sym_modes;                                       \
    *(gsacount) = sizeof((pcobject)->sym_modes)/4;                            \
}

Get list of symmetric modes supported.

Parameters:
pcobject The Platform Capababilities Object to query.
[out] gsmodes A pointer to where to store the location of the list of modes.
[out] gsacount A pointer to where to store the number of algorithms in the list at modes.
#define fsl_shw_pco_get_sym_modes ( pcobject,
gsmodes,
gsacount   ) 
Value:
{                                                                             \
    *(gsmodes) = (pcobject)->sym_modes;                                       \
    *(gsacount) = sizeof((pcobject)->sym_modes)/4;                            \
}

Get list of symmetric modes supported.

Parameters:
pcobject The Platform Capababilities Object to query.
[out] gsmodes A pointer to where to store the location of the list of modes.
[out] gsacount A pointer to where to store the number of algorithms in the list at modes.
#define fsl_shw_pco_get_version ( pcobject,
pcmajor,
pcminor   ) 
Value:
{                                                                             \
    *(pcmajor) = (pcobject)->api_major;                                       \
    *(pcminor) = (pcobject)->api_minor;                                       \
}

Get FSL SHW API version

Parameters:
pcobject The Platform Capababilities Object to query.
[out] pcmajor A pointer to where the major version of the API is to be stored.
[out] pcminor A pointer to where the minor version of the API is to be stored.
#define fsl_shw_pco_get_version ( pcobject,
pcmajor,
pcminor   ) 
Value:
{                                                                             \
    *(pcmajor) = (pcobject)->api_major;                                       \
    *(pcminor) = (pcobject)->api_minor;                                       \
}

Get FSL SHW API version

Parameters:
pcobject The Platform Capababilities Object to query.
[out] pcmajor A pointer to where the major version of the API is to be stored.
[out] pcminor A pointer to where the minor version of the API is to be stored.
#define fsl_shw_ro_get_reference ( robject   )     (robject)->user_ref

Retrieve the reference value from a Result Object.

Parameters:
robject The result object to query.
Returns:
The reference associated with the request.
#define fsl_shw_ro_get_reference ( robject   )     (robject)->user_ref

Retrieve the reference value from a Result Object.

Parameters:
robject The result object to query.
Returns:
The reference associated with the request.
#define fsl_shw_ro_get_status ( robject   )     (robject)->code

Retrieve the status code from a Result Object.

Parameters:
robject The result object to query.
Returns:
The status of the request.
#define fsl_shw_ro_get_status ( robject   )     (robject)->code

Retrieve the status code from a Result Object.

Parameters:
robject The result object to query.
Returns:
The status of the request.
#define fsl_shw_scco_clear_flags ( scobject,
scflags   )     (scobject)->flags &= ~(scflags)

Clear some flags in a Symmetric Cipher Context Object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
scobject The context object to operate on.
scflags The flags to reset (one or more values from fsl_shw_sym_ctx_flags_t ORed together).
#define fsl_shw_scco_clear_flags ( scobject,
scflags   )     (scobject)->flags &= ~(scflags)

Clear some flags in a Symmetric Cipher Context Object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
scobject The context object to operate on.
scflags The flags to reset (one or more values from fsl_shw_sym_ctx_flags_t ORed together).
#define fsl_shw_scco_get_context ( scobject,
sccontext   )     copy_bytes(sccontext, (scobject)->context, (scobject)->block_size_bytes)

Get the Context for a Symmetric Cipher Context.

This is to retrieve the context/IV for FSL_SYM_MODE_CBC mode, or to retrieve context (the S-Box and pointers) for ARC4. The full context will be copied.

Parameters:
scobject The context object to operate on.
[out] sccontext Pointer to location where context will be stored.
#define fsl_shw_scco_get_context ( scobject,
sccontext   )     copy_bytes(sccontext, (scobject)->context, (scobject)->block_size_bytes)

Get the Context for a Symmetric Cipher Context.

This is to retrieve the context/IV for FSL_SYM_MODE_CBC mode, or to retrieve context (the S-Box and pointers) for ARC4. The full context will be copied.

Parameters:
scobject The context object to operate on.
[out] sccontext Pointer to location where context will be stored.
#define fsl_shw_scco_get_counter_info ( scobject,
sccounter,
scmodulus   ) 
Value:
{                                                                     \
           if ((sccounter) != NULL) {                                        \
               copy_bytes(sccounter, (scobject)->context,                    \
                          (scobject)->block_size_bytes);                     \
           }                                                                 \
           if ((scmodulus) != NULL) {                                        \
               *(scmodulus) = (scobject)->modulus_exp;                       \
           }                                                                 \
       }

Get the Counter Value for a Symmetric Cipher Context.

This will retrieve the Counter Value is for CTR mode.

Parameters:
scobject The context object to query.
[out] sccounter Pointer to location to store the current counter value. The number of octets copied will be the block size for the algorithm.
[out] scmodulus Pointer to location to store the modulus.
#define fsl_shw_scco_get_counter_info ( scobject,
sccounter,
scmodulus   ) 
Value:
{                                                                     \
           if ((sccounter) != NULL) {                                        \
               copy_bytes(sccounter, (scobject)->context,                    \
                          (scobject)->block_size_bytes);                     \
           }                                                                 \
           if ((scmodulus) != NULL) {                                        \
               *(scmodulus) = (scobject)->modulus_exp;                       \
           }                                                                 \
       }

Get the Counter Value for a Symmetric Cipher Context.

This will retrieve the Counter Value is for CTR mode.

Parameters:
scobject The context object to query.
[out] sccounter Pointer to location to store the current counter value. The number of octets copied will be the block size for the algorithm.
[out] scmodulus Pointer to location to store the modulus.
#define fsl_shw_scco_init ( scobject,
scalg,
scmode   ) 
Value:
{                                                                             \
      register uint32_t bsb;   /* block-size bytes */                         \
                                                                              \
      switch (scalg) {                                                        \
      case FSL_KEY_ALG_AES:                                                   \
          bsb = 16;                                                           \
          break;                                                              \
      case FSL_KEY_ALG_DES:                                                   \
          /* fall through */                                                  \
      case FSL_KEY_ALG_TDES:                                                  \
          bsb = 8;                                                            \
          break;                                                              \
      case FSL_KEY_ALG_ARC4:                                                  \
          bsb = 259;                                                          \
          break;                                                              \
      case FSL_KEY_ALG_HMAC:                                                  \
          bsb = 1;  /* meaningless */                                         \
          break;                                                              \
      default:                                                                \
          bsb = 00;                                                           \
      }                                                                       \
      (scobject)->block_size_bytes = bsb;                                     \
      (scobject)->mode = scmode;                                              \
      (scobject)->flags = 0;                                                  \
}

Initialize a Symmetric Cipher Context Object.

This function must be called before performing any other operation with the Object. This will set the mode and algorithm and initialize the Object.

Parameters:
scobject The context object to operate on.
scalg The cipher algorithm this context will be used with.
scmode FSL_SYM_MODE_CBC, FSL_SYM_MODE_ECB, etc.
#define fsl_shw_scco_init ( scobject,
scalg,
scmode   ) 
Value:
{                                                                             \
      register uint32_t bsb;   /* block-size bytes */                         \
                                                                              \
      switch (scalg) {                                                        \
      case FSL_KEY_ALG_AES:                                                   \
          bsb = 16;                                                           \
          break;                                                              \
      case FSL_KEY_ALG_DES:                                                   \
          /* fall through */                                                  \
      case FSL_KEY_ALG_TDES:                                                  \
          bsb = 8;                                                            \
          break;                                                              \
      case FSL_KEY_ALG_ARC4:                                                  \
          bsb = 259;                                                          \
          break;                                                              \
      case FSL_KEY_ALG_HMAC:                                                  \
          bsb = 1;  /* meaningless */                                         \
          break;                                                              \
      default:                                                                \
          bsb = 00;                                                           \
      }                                                                       \
      (scobject)->block_size_bytes = bsb;                                     \
      (scobject)->mode = scmode;                                              \
      (scobject)->flags = 0;                                                  \
}

Initialize a Symmetric Cipher Context Object.

This function must be called before performing any other operation with the Object. This will set the mode and algorithm and initialize the Object.

Parameters:
scobject The context object to operate on.
scalg The cipher algorithm this context will be used with.
scmode FSL_SYM_MODE_CBC, FSL_SYM_MODE_ECB, etc.
#define fsl_shw_scco_set_context ( scobject,
sccontext   ) 
Value:
copy_bytes((scobject)->context, sccontext,                             \
                  (scobject)->block_size_bytes)

Set the Context (IV) for a Symmetric Cipher Context.

This is to set the context/IV for FSL_SYM_MODE_CBC mode, or to set the context (the S-Box and pointers) for ARC4. The full context size will be copied.

Parameters:
scobject The context object to operate on.
sccontext A pointer to the buffer which contains the context.
#define fsl_shw_scco_set_context ( scobject,
sccontext   ) 
Value:
copy_bytes((scobject)->context, sccontext,                             \
                  (scobject)->block_size_bytes)

Set the Context (IV) for a Symmetric Cipher Context.

This is to set the context/IV for FSL_SYM_MODE_CBC mode, or to set the context (the S-Box and pointers) for ARC4. The full context size will be copied.

Parameters:
scobject The context object to operate on.
sccontext A pointer to the buffer which contains the context.
#define fsl_shw_scco_set_counter_info ( scobject,
sccounter,
scmodulus   ) 
Value:
{                                                                     \
           if ((sccounter) != NULL) {                                        \
               copy_bytes((scobject)->context, sccounter,                    \
                          (scobject)->block_size_bytes);                     \
           }                                                                 \
           (scobject)->modulus_exp = scmodulus;                              \
       }

Set the Counter Value for a Symmetric Cipher Context.

This will set the Counter Value for CTR mode.

Parameters:
scobject The context object to operate on.
sccounter The starting counter value. The number of octets. copied will be the block size for the algorithm.
scmodulus The modulus for controlling the incrementing of the counter.
#define fsl_shw_scco_set_counter_info ( scobject,
sccounter,
scmodulus   ) 
Value:
{                                                                     \
           if ((sccounter) != NULL) {                                        \
               copy_bytes((scobject)->context, sccounter,                    \
                          (scobject)->block_size_bytes);                     \
           }                                                                 \
           (scobject)->modulus_exp = scmodulus;                              \
       }

Set the Counter Value for a Symmetric Cipher Context.

This will set the Counter Value for CTR mode.

Parameters:
scobject The context object to operate on.
sccounter The starting counter value. The number of octets. copied will be the block size for the algorithm.
scmodulus The modulus for controlling the incrementing of the counter.
#define fsl_shw_scco_set_flags ( scobject,
scflags   )     (scobject)->flags |= (scflags)

Set the flags for a Symmetric Cipher Context.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
scobject The context object to operate on.
scflags The flags to reset (one or more values from fsl_shw_sym_ctx_flags_t ORed together).
#define fsl_shw_scco_set_flags ( scobject,
scflags   )     (scobject)->flags |= (scflags)

Set the flags for a Symmetric Cipher Context.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
scobject The context object to operate on.
scflags The flags to reset (one or more values from fsl_shw_sym_ctx_flags_t ORed together).
#define fsl_shw_sko_calculate_wrapped_size ( wkeyinfo,
wkeylen   ) 
Value:
{                                                                       \
    register fsl_shw_sko_t* kp = wkeyinfo;                              \
    register uint32_t kl = kp->key_length;                              \
    int key_blocks = (kl + 15) / 16;                                    \
    int base_size = 35; /* ICV + T' + ALG + LEN + FLAGS */              \
                                                                        \
    *(wkeylen) = base_size + 16 * key_blocks;                           \
}

Determine the size of a wrapped key based upon the cleartext key's length.

This function can be used to calculate the number of octets that fsl_shw_extract_key() will write into the location at covered_key.

If zero is returned at length, this means that the key length in key_info is not supported.

Parameters:
wkeyinfo Information about a key to be wrapped.
wkeylen Location to store the length of a wrapped version of the key in key_info.
#define fsl_shw_sko_calculate_wrapped_size ( wkeyinfo,
wkeylen   ) 
Value:
{                                                                       \
    register fsl_shw_sko_t* kp = wkeyinfo;                              \
    register uint32_t kl = kp->key_length;                              \
    int key_blocks = (kl + 15) / 16;                                    \
    int base_size = 35; /* ICV + T' + ALG + LEN + FLAGS */              \
                                                                        \
    *(wkeylen) = base_size + 16 * key_blocks;                           \
}

Determine the size of a wrapped key based upon the cleartext key's length.

This function can be used to calculate the number of octets that fsl_shw_extract_key() will write into the location at covered_key.

If zero is returned at length, this means that the key length in key_info is not supported.

Parameters:
wkeyinfo Information about a key to be wrapped.
wkeylen Location to store the length of a wrapped version of the key in key_info.
#define fsl_shw_sko_clear_flags ( skobject,
skflags   )     (skobject)->flags &= ~(skflags)

Clear some flags in the key object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skflags (One or more) ORed members of fsl_shw_key_flags_t which are to be reset.
#define fsl_shw_sko_clear_flags ( skobject,
skflags   )     (skobject)->flags &= ~(skflags)

Clear some flags in the key object.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skflags (One or more) ORed members of fsl_shw_key_flags_t which are to be reset.
#define fsl_shw_sko_get_algorithm ( skobject,
skalgorithm   )     *(skalgorithm) = (skobject)->algorithm

Extract the algorithm from a key object.

Parameters:
skobject The Key Object to be queried.
[out] skalgorithm A pointer to the location to store the algorithm.
#define fsl_shw_sko_get_algorithm ( skobject,
skalgorithm   )     *(skalgorithm) = (skobject)->algorithm

Extract the algorithm from a key object.

Parameters:
skobject The Key Object to be queried.
[out] skalgorithm A pointer to the location to store the algorithm.
#define fsl_shw_sko_get_established_info ( skobject,
skhandle   )     *(skhandle) = (skobject)->handle

Retrieve the established-key handle from a key object.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skhandle The location to store the handle of the unwrapped key.
#define fsl_shw_sko_get_established_info ( skobject,
skhandle   )     *(skhandle) = (skobject)->handle

Retrieve the established-key handle from a key object.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skhandle The location to store the handle of the unwrapped key.
#define fsl_shw_sko_get_key ( skobject,
skkey   ) 
Value:
{                                                                             \
    fsl_shw_kso_t* keystore = (skobject)->keystore;                           \
    if (keystore != NULL) {                                                   \
        *(skkey) = keystore->slot_get_address(keystore->user_data,            \
                                              (skobject)->handle);            \
    } else {                                                                  \
        *(skkey) = NULL;                                                      \
    }                                                                         \
}

Retrieve the cleartext key from a key object that is stored in a user keystore.

Parameters:
skobject The Key Object to be queried.
[out] skkey A pointer to the location to store the key. NULL if the key is not stored in a user keystore.
#define fsl_shw_sko_get_key ( skobject,
skkey   ) 
Value:
{                                                                             \
    fsl_shw_kso_t* keystore = (skobject)->keystore;                           \
    if (keystore != NULL) {                                                   \
        *(skkey) = keystore->slot_get_address(keystore->user_data,            \
                                              (skobject)->handle);            \
    } else {                                                                  \
        *(skkey) = NULL;                                                      \
    }                                                                         \
}

Retrieve the cleartext key from a key object that is stored in a user keystore.

Parameters:
skobject The Key Object to be queried.
[out] skkey A pointer to the location to store the key. NULL if the key is not stored in a user keystore.
#define fsl_shw_sko_init ( skobject,
skalgorithm   ) 
Value:
{                                                                            \
       (skobject)->algorithm = skalgorithm;                                  \
       (skobject)->flags = 0;                                                \
       (skobject)->keystore = NULL;                                          \
}

Initialize a Secret Key Object.

This function must be called before performing any other operation with the Object.

Parameters:
skobject The Secret Key Object to be initialized.
skalgorithm DES, AES, etc.
#define fsl_shw_sko_init ( skobject,
skalgorithm   ) 
Value:
{                                                                            \
       (skobject)->algorithm = skalgorithm;                                  \
       (skobject)->flags = 0;                                                \
       (skobject)->keystore = NULL;                                          \
}

Initialize a Secret Key Object.

This function must be called before performing any other operation with the Object.

Parameters:
skobject The Secret Key Object to be initialized.
skalgorithm DES, AES, etc.
#define fsl_shw_sko_init_pf_key ( skobject,
skalgorithm,
skhwkey   ) 
Value:
{                                                                   \
    (skobject)->algorithm = -1;                                         \
    (skobject)->flags = -1;                                             \
    (skobject)->keystore = NULL;                                        \
}

Initialize a Secret Key Object to use a Platform Key register.

This function must be called before performing any other operation with the Object. INVALID on this platform.

Parameters:
skobject The Secret Key Object to be initialized.
skalgorithm DES, AES, etc.
skhwkey one of the fsl_shw_pf_key_t values.
#define fsl_shw_sko_init_pf_key ( skobject,
skalgorithm,
skhwkey   ) 
Value:
{                                                                   \
    (skobject)->algorithm = -1;                                         \
    (skobject)->flags = -1;                                             \
    (skobject)->keystore = NULL;                                        \
}

Initialize a Secret Key Object to use a Platform Key register.

This function must be called before performing any other operation with the Object. INVALID on this platform.

Parameters:
skobject The Secret Key Object to be initialized.
skalgorithm DES, AES, etc.
skhwkey one of the fsl_shw_pf_key_t values.
#define fsl_shw_sko_set_established_info ( skobject,
skuserid,
skhandle   ) 
Value:
{                                                                             \
       (skobject)->userid = (skuserid);                                       \
       (skobject)->handle = (skhandle);                                       \
       (skobject)->flags |= FSL_SKO_KEY_ESTABLISHED;                          \
       (skobject)->flags &=                                                   \
                       ~(FSL_SKO_KEY_PRESENT);   \
}

Set the establish key handle into a key object.

The userid field will be used to validate the access to the unwrapped key. This feature is not available for all platforms, nor for all algorithms and modes.

The FSL_SKO_KEY_ESTABLISHED will be set (and the FSL_SKO_KEY_PRESENT flag will be cleared).

Parameters:
skobject A variable of type fsl_shw_sko_t.
skuserid The User ID to verify this user is an authorized user of the key.
skhandle A handle from fsl_shw_sko_get_established_info.
#define fsl_shw_sko_set_established_info ( skobject,
skuserid,
skhandle   ) 
Value:
{                                                                             \
       (skobject)->userid = (skuserid);                                       \
       (skobject)->handle = (skhandle);                                       \
       (skobject)->flags |= FSL_SKO_KEY_ESTABLISHED;                          \
       (skobject)->flags &=                                                   \
                       ~(FSL_SKO_KEY_PRESENT);   \
}

Set the establish key handle into a key object.

The userid field will be used to validate the access to the unwrapped key. This feature is not available for all platforms, nor for all algorithms and modes.

The FSL_SKO_KEY_ESTABLISHED will be set (and the FSL_SKO_KEY_PRESENT flag will be cleared).

Parameters:
skobject A variable of type fsl_shw_sko_t.
skuserid The User ID to verify this user is an authorized user of the key.
skhandle A handle from fsl_shw_sko_get_established_info.
#define fsl_shw_sko_set_flags ( skobject,
skflags   )     (skobject)->flags |= (skflags)

Set some flags in the key object.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skflags (One or more) ORed members of fsl_shw_key_flags_t which are to be set.
#define fsl_shw_sko_set_flags ( skobject,
skflags   )     (skobject)->flags |= (skflags)

Set some flags in the key object.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skflags (One or more) ORed members of fsl_shw_key_flags_t which are to be set.
#define fsl_shw_sko_set_key ( skobject,
skkey,
skkeylen   ) 
Value:
{                                                                            \
       (skobject)->key_length = skkeylen;                                    \
       copy_bytes((skobject)->key, skkey, skkeylen);                         \
       (skobject)->flags |= FSL_SKO_KEY_PRESENT;                             \
       (skobject)->flags &= ~FSL_SKO_KEY_ESTABLISHED;                        \
}

Store a cleartext key in the key object.

This has the side effect of setting the FSL_SKO_KEY_PRESENT flag and resetting the FSL_SKO_KEY_ESTABLISHED flag.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skkey A pointer to the beginning of the key.
skkeylen The length, in octets, of the key. The value should be appropriate to the key size supported by the algorithm. 64 octets is the absolute maximum value allowed for this call.
#define fsl_shw_sko_set_key ( skobject,
skkey,
skkeylen   ) 
Value:
{                                                                            \
       (skobject)->key_length = skkeylen;                                    \
       copy_bytes((skobject)->key, skkey, skkeylen);                         \
       (skobject)->flags |= FSL_SKO_KEY_PRESENT;                             \
       (skobject)->flags &= ~FSL_SKO_KEY_ESTABLISHED;                        \
}

Store a cleartext key in the key object.

This has the side effect of setting the FSL_SKO_KEY_PRESENT flag and resetting the FSL_SKO_KEY_ESTABLISHED flag.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skkey A pointer to the beginning of the key.
skkeylen The length, in octets, of the key. The value should be appropriate to the key size supported by the algorithm. 64 octets is the absolute maximum value allowed for this call.
#define fsl_shw_sko_set_key_length ( skobject,
skkeylen   )     (skobject)->key_length = skkeylen;

Set a size for the key.

This function would normally be used when the user wants the key to be generated from a random source.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skkeylen The length, in octets, of the key. The value should be appropriate to the key size supported by the algorithm. 64 octets is the absolute maximum value allowed for this call.
#define fsl_shw_sko_set_key_length ( skobject,
skkeylen   )     (skobject)->key_length = skkeylen;

Set a size for the key.

This function would normally be used when the user wants the key to be generated from a random source.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skkeylen The length, in octets, of the key. The value should be appropriate to the key size supported by the algorithm. 64 octets is the absolute maximum value allowed for this call.
#define fsl_shw_sko_set_keystore ( skobject,
user_keystore   )     (skobject)->keystore = (user_keystore)

Establish a user Keystore to hold the key.

#define fsl_shw_sko_set_keystore ( skobject,
user_keystore   )     (skobject)->keystore = (user_keystore)

Establish a user Keystore to hold the key.

#define fsl_shw_sko_set_user_id ( skobject,
skuserid   )     (skobject)->userid = (skuserid)

Set the User ID associated with the key.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skuserid The User ID to identify authorized users of the key.
#define fsl_shw_sko_set_user_id ( skobject,
skuserid   )     (skobject)->userid = (skuserid)

Set the User ID associated with the key.

Parameters:
skobject A variable of type fsl_shw_sko_t.
skuserid The User ID to identify authorized users of the key.
#define fsl_shw_uco_clear_flags ( ucontext,
uflags   )     (ucontext)->flags &= ~(uflags)

Clear flags in the User Context.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
ucontext The User Context object to operate on.
uflags ORed values from fsl_shw_user_ctx_flags_t.
#define fsl_shw_uco_clear_flags ( ucontext,
uflags   )     (ucontext)->flags &= ~(uflags)

Clear flags in the User Context.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
ucontext The User Context object to operate on.
uflags ORed values from fsl_shw_user_ctx_flags_t.
#define fsl_shw_uco_init ( ucontext,
usize   ) 
Value:
{                                                                             \
      (ucontext)->pool_size = usize;                                          \
      (ucontext)->flags = FSL_UCO_BLOCKING_MODE;                              \
      (ucontext)->sahara_openfd = -1;                                         \
      (ucontext)->mem_util = NULL;                                            \
      (ucontext)->callback = NULL;                                            \
}

Initialize a User Context Object.

This function must be called before performing any other operation with the Object. It sets the User Context Object to initial values, and set the size of the results pool. The mode will be set to a default of FSL_UCO_BLOCKING_MODE.

When using non-blocking operations, this sets the maximum number of operations which can be outstanding. This number includes the counts of operations waiting to start, operation(s) being performed, and results which have not been retrieved.

Changes to this value are ignored once user registration has completed. It should be set to 1 if only blocking operations will ever be performed.

Parameters:
ucontext The User Context object to operate on.
usize The maximum number of operations which can be outstanding.
#define fsl_shw_uco_init ( ucontext,
usize   ) 
Value:
{                                                                             \
      (ucontext)->pool_size = usize;                                          \
      (ucontext)->flags = FSL_UCO_BLOCKING_MODE;                              \
      (ucontext)->sahara_openfd = -1;                                         \
      (ucontext)->mem_util = NULL;                                            \
      (ucontext)->callback = NULL;                                            \
}

Initialize a User Context Object.

This function must be called before performing any other operation with the Object. It sets the User Context Object to initial values, and set the size of the results pool. The mode will be set to a default of FSL_UCO_BLOCKING_MODE.

When using non-blocking operations, this sets the maximum number of operations which can be outstanding. This number includes the counts of operations waiting to start, operation(s) being performed, and results which have not been retrieved.

Changes to this value are ignored once user registration has completed. It should be set to 1 if only blocking operations will ever be performed.

Parameters:
ucontext The User Context object to operate on.
usize The maximum number of operations which can be outstanding.
#define fsl_shw_uco_set_callback ( ucontext,
ucallback   )     (ucontext)->callback = ucallback

Set the User Reference for the User Context.

Parameters:
ucontext The User Context object to operate on.
ucallback The function the API will invoke when an operation completes.
#define fsl_shw_uco_set_callback ( ucontext,
ucallback   )     (ucontext)->callback = ucallback

Set the User Reference for the User Context.

Parameters:
ucontext The User Context object to operate on.
ucallback The function the API will invoke when an operation completes.
#define fsl_shw_uco_set_flags ( ucontext,
uflags   )     (ucontext)->flags |= (uflags)

Set flags in the User Context.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
ucontext The User Context object to operate on.
uflags ORed values from fsl_shw_user_ctx_flags_t.
#define fsl_shw_uco_set_flags ( ucontext,
uflags   )     (ucontext)->flags |= (uflags)

Set flags in the User Context.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
ucontext The User Context object to operate on.
uflags ORed values from fsl_shw_user_ctx_flags_t.
#define fsl_shw_uco_set_reference ( ucontext,
uref   )     (ucontext)->user_ref = uref

Set the User Reference for the User Context.

Parameters:
ucontext The User Context object to operate on.
uref A value which will be passed back with a result.
#define fsl_shw_uco_set_reference ( ucontext,
uref   )     (ucontext)->user_ref = uref

Set the User Reference for the User Context.

Parameters:
ucontext The User Context object to operate on.
uref A value which will be passed back with a result.
#define SAH_IN_USER_KEYSTORE   0x100

The Data field points to the location of the key, which is in a secure partition held by the user. The memory address needs to be converted to kernel space manually, by looking through the partitions that the user holds.

#define SAH_IN_USER_KEYSTORE   0x100

The Data field points to the location of the key, which is in a secure partition held by the user. The memory address needs to be converted to kernel space manually, by looking through the partitions that the user holds.

Referenced by sah_DePhysicalise_Links(), sah_Make_Links(), and sah_Physicalise_Links().

#define SAH_KEY_IS_HIDDEN   0x08

The ptr and length in this link are really 'established key' info. They are to be converted to ptr/length before putting on request queue.

#define SAH_KEY_IS_HIDDEN   0x08

The ptr and length in this link are really 'established key' info. They are to be converted to ptr/length before putting on request queue.

#define SAH_LINK_INSERTED_LINK   0x80

The link was inserted during the Physicalise procedure. It is tagged so it can be removed during DePhysicalise, thereby returning to the caller an intact chain.

#define SAH_LINK_INSERTED_LINK   0x80

The link was inserted during the Physicalise procedure. It is tagged so it can be removed during DePhysicalise, thereby returning to the caller an intact chain.

Referenced by sah_DePhysicalise_Links(), and sah_Physicalise_Links().

#define SAH_OUTPUT_LINK   0x04

The data in this link will change when the descriptor gets executed.

#define SAH_OUTPUT_LINK   0x04
#define SAH_OWNS_LINK_DATA   0x01

This flag indicates that the data in a link is owned by the security function component and this memory will be freed by the security function component. To be used as part of the flag field of the sah_Link structure.

#define SAH_OWNS_LINK_DATA   0x01

This flag indicates that the data in a link is owned by the security function component and this memory will be freed by the security function component. To be used as part of the flag field of the sah_Link structure.

Referenced by add_assoc_preamble(), process_assoc_from_nist_params(), and sah_Physicalise_Links().

#define SAH_PREPHYS_DATA   0x40

The Data field points to a physical address, and does not need to be processed by the driver. Honored only in Kernel API.

#define SAH_PREPHYS_DATA   0x40

The Data field points to a physical address, and does not need to be processed by the driver. Honored only in Kernel API.

Referenced by sah_DePhysicalise_Links(), sah_Make_Links(), and sah_Physicalise_Links().

#define SAH_REWORKED_LINK   0x10

The link structure has been appended to the previous one by the driver. It needs to be removed before leaving the driver (and returning to API).

#define SAH_REWORKED_LINK   0x10

The link structure has been appended to the previous one by the driver. It needs to be removed before leaving the driver (and returning to API).

#define SAH_STORED_KEY_INFO   0x20

The length and data fields of this link contain the slot and user id used to access the SCC stored key

#define SAH_STORED_KEY_INFO   0x20

The length and data fields of this link contain the slot and user id used to access the SCC stored key

Referenced by sah_DePhysicalise_Links(), sah_Make_Links(), and sah_Physicalise_Links().

#define SAH_USES_LINK_DATA   0x02

The data in a link is not owned by the security function component and therefore it will not attempt to free this memory. To be used as part of the flag field of the sah_Link structure.

#define SAH_USES_LINK_DATA   0x02

The data in a link is not owned by the security function component and therefore it will not attempt to free this memory. To be used as part of the flag field of the sah_Link structure.

Referenced by add_assoc_preamble(), process_assoc_from_nist_params(), sah_add_in_key_desc(), sah_add_in_keyout_desc(), sah_add_in_out_desc(), sah_add_key_out_desc(), sah_add_out_in_desc(), sah_add_two_d_desc(), sah_add_two_in_desc(), and sah_add_two_out_desc().


Typedef Documentation

typedef struct fsl_sho_ibo_t fsl_sho_ibo_t

Initialization Object

typedef struct fsl_sho_ibo_t fsl_sho_ibo_t

Initialization Object

The type of Authentication-Cipher function which will be performed.

The type of Authentication-Cipher function which will be performed.

Authenticate-Cipher Context Object

An object for controlling the function of, and holding information about, data for the authenticate-cipher functions, fsl_shw_gen_encrypt() and fsl_shw_auth_decrypt().

Authenticate-Cipher Context Object

An object for controlling the function of, and holding information about, data for the authenticate-cipher functions, fsl_shw_gen_encrypt() and fsl_shw_auth_decrypt().

Flags which describe the state of the fsl_shw_acco_t.

The FSL_ACCO_CTX_INIT and FSL_ACCO_CTX_FINALIZE flags, when used together, provide for a one-shot operation.

Flags which describe the state of the fsl_shw_acco_t.

The FSL_ACCO_CTX_INIT and FSL_ACCO_CTX_FINALIZE flags, when used together, provide for a one-shot operation.

Modulus Selector for CTR modes.

The incrementing of the Counter value may be modified by a modulus. If no modulus is needed or desired for AES, use FSL_CTR_MOD_128.

Modulus Selector for CTR modes.

The incrementing of the Counter value may be modified by a modulus. If no modulus is needed or desired for AES, use FSL_CTR_MOD_128.

Algorithm selector for Cryptographic Hash functions.

Selection of algorithm determines how large the context and digest will be. Context is the same size as the digest (resulting hash), unless otherwise specified.

Algorithm selector for Cryptographic Hash functions.

Selection of algorithm determines how large the context and digest will be. Context is the same size as the digest (resulting hash), unless otherwise specified.

Flags which control a Hash operation.

Flags which control a Hash operation.

typedef struct fsl_shw_hco_t fsl_shw_hco_t

Hash Context Object

typedef struct fsl_shw_hco_t fsl_shw_hco_t

Hash Context Object

Flags which control an HMAC operation.

These may be combined by ORing them together. See fsl_shw_hmco_set_flags() and fsl_shw_hmco_clear_flags().

Flags which control an HMAC operation.

These may be combined by ORing them together. See fsl_shw_hmco_set_flags() and fsl_shw_hmco_clear_flags().

HMAC Context Object

HMAC Context Object

Algorithm Identifier.

Selection of algorithm will determine how large the block size of the algorithm is. Context size is the same length unless otherwise specified. Selection of algorithm also affects the allowable key length.

Algorithm Identifier.

Selection of algorithm will determine how large the block size of the algorithm is. Context size is the same length unless otherwise specified. Selection of algorithm also affects the allowable key length.

Flags which describe the state of the fsl_shw_sko_t.

These may be ORed together to get the desired effect. See fsl_shw_sko_set_flags() and fsl_shw_sko_clear_flags()

Flags which describe the state of the fsl_shw_sko_t.

These may be ORed together to get the desired effect. See fsl_shw_sko_set_flags() and fsl_shw_sko_clear_flags()

The operation which controls the behavior of fsl_shw_establish_key().

These values are passed to fsl_shw_establish_key().

The operation which controls the behavior of fsl_shw_establish_key().

These values are passed to fsl_shw_establish_key().

typedef struct fsl_shw_kso_t fsl_shw_kso_t

Keystore Object

typedef struct fsl_shw_kso_t fsl_shw_kso_t

Keystore Object

Partition status information.

Partition status information.

typedef struct fsl_shw_pco_t fsl_shw_pco_t

Platform Capability Object.

typedef struct fsl_shw_pco_t fsl_shw_pco_t

Platform Capability Object.

Permissions flags for Secure Partitions

Permissions flags for Secure Partitions

Result object

Result object

Return code for FSL_SHW library.

These codes may be returned from a function call. In non-blocking mode, they will appear as the status in a Result Object.

Return code for FSL_SHW library.

These codes may be returned from a function call. In non-blocking mode, they will appear as the status in a Result Object.

Symmetric Crypto Context Object Context Object

Symmetric Crypto Context Object Context Object

typedef struct fsl_shw_sko_t fsl_shw_sko_t

Secret Key Context Object

typedef struct fsl_shw_sko_t fsl_shw_sko_t

Secret Key Context Object

typedef struct fsl_shw_spo_t fsl_shw_spo_t

Secure Partition information

This holds the context to a single secure partition owned by the user. It is only available in the kernel version of the User Context Object.

typedef struct fsl_shw_spo_t fsl_shw_spo_t

Secure Partition information

This holds the context to a single secure partition owned by the user. It is only available in the kernel version of the User Context Object.

Flags to control use of the fsl_shw_scco_t.

These may be ORed together to get the desired effect. See fsl_shw_scco_set_flags() and fsl_shw_scco_clear_flags()

Flags to control use of the fsl_shw_scco_t.

These may be ORed together to get the desired effect. See fsl_shw_scco_set_flags() and fsl_shw_scco_clear_flags()

Mode selector for Symmetric Ciphers.

The selection of mode determines how a cryptographic algorithm will be used to process the plaintext or ciphertext.

For all modes which are run block-by-block (that is, all but FSL_SYM_MODE_STREAM), any partial operations must be performed on a text length which is multiple of the block size. Except for FSL_SYM_MODE_CTR, these block-by-block algorithms must also be passed a total number of octets which is a multiple of the block size.

In modes which require that the total number of octets of data be a multiple of the block size (FSL_SYM_MODE_ECB and FSL_SYM_MODE_CBC), and the user has a total number of octets which are not a multiple of the block size, the user must perform any necessary padding to get to the correct data length.

Mode selector for Symmetric Ciphers.

The selection of mode determines how a cryptographic algorithm will be used to process the plaintext or ciphertext.

For all modes which are run block-by-block (that is, all but FSL_SYM_MODE_STREAM), any partial operations must be performed on a text length which is multiple of the block size. Except for FSL_SYM_MODE_CTR, these block-by-block algorithms must also be passed a total number of octets which is a multiple of the block size.

In modes which require that the total number of octets of data be a multiple of the block size (FSL_SYM_MODE_ECB and FSL_SYM_MODE_CBC), and the user has a total number of octets which are not a multiple of the block size, the user must perform any necessary padding to get to the correct data length.

typedef struct fsl_shw_uco_t fsl_shw_uco_t

User Context Object

typedef struct fsl_shw_uco_t fsl_shw_uco_t

User Context Object

Flags for the state of the User Context Object (fsl_shw_uco_t).

Flags for the state of the User Context Object (fsl_shw_uco_t).

typedef uint64_t key_userid_t

Type of value which is associated with an established key.

typedef uint64_t key_userid_t

Type of value which is associated with an established key.

typedef struct sah_Desc sah_Desc

Structure type for descriptors.

The first five fields are passed to the hardware.

typedef struct sah_Desc sah_Desc

Structure type for descriptors.

The first five fields are passed to the hardware.

typedef struct sah_Head_Desc sah_Head_Desc

The first descriptor in a chain.

typedef struct sah_Head_Desc sah_Head_Desc

The first descriptor in a chain.

typedef uint8_t* sah_Int

Indefinite precision integer used for security operations on SAHARA accelerator. The data will always be in little Endian format.

typedef uint8_t* sah_Int

Indefinite precision integer used for security operations on SAHARA accelerator. The data will always be in little Endian format.

typedef struct sah_Link sah_Link

Structure type for links.

The first three fields are used by hardware.

typedef struct sah_Link sah_Link

Structure type for links.

The first three fields are used by hardware.

typedef uint32_t sah_Link_Flags

typedef for flags field of sah_Link

sah_Link_Flags

Type to be used for flags associated with a Link in security function. These flags are used internally by the security function component only.

Values defined at Link Flags

typedef uint32_t sah_Link_Flags

typedef for flags field of sah_Link

sah_Link_Flags

Type to be used for flags associated with a Link in security function. These flags are used internally by the security function component only.

Values defined at Link Flags

typedef struct sah_Mem_Util sah_Mem_Util

Structure for API memory utilities.

FIELDS

void * ref - parameter to be passed into the memory function calls

void * (*malloc)(void *ref, size_t n) - pointer to user's malloc function

void (*free)(void *ref, void *ptr) - pointer to user's free function

void * (*memcpy)(void *ref, void *dest, const void *src, size_t n) - pointer to user's memcpy function

void * (*memset)(void *ref, void *ptr, int ch, size_t n) - pointer to user's memset function

typedef struct sah_Mem_Util sah_Mem_Util

Structure for API memory utilities.

FIELDS

void * ref - parameter to be passed into the memory function calls

void * (*malloc)(void *ref, size_t n) - pointer to user's malloc function

void (*free)(void *ref, void *ptr) - pointer to user's free function

void * (*memcpy)(void *ref, void *dest, const void *src, size_t n) - pointer to user's memcpy function

void * (*memset)(void *ref, void *ptr, int ch, size_t n) - pointer to user's memset function

typedef uint8_t* sah_Oct_Str

Byte array used for block cipher and hash digest/MAC operations on SAHARA accelerator. The Endian format will be as specified by the function using the sah_Oct_Str.

typedef uint8_t* sah_Oct_Str

Byte array used for block cipher and hash digest/MAC operations on SAHARA accelerator. The Endian format will be as specified by the function using the sah_Oct_Str.

typedef struct sah_Queue sah_Queue

A queue of descriptor heads -- used to hold requests waiting for user to pick up the results.

typedef struct sah_Queue sah_Queue

A queue of descriptor heads -- used to hold requests waiting for user to pick up the results.

typedef struct sah_results sah_results

Used by Sahara API to retrieve completed non-blocking results.

typedef struct sah_results sah_results

Used by Sahara API to retrieve completed non-blocking results.


Enumeration Type Documentation

The type of Authentication-Cipher function which will be performed.

Enumerator:
FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

The type of Authentication-Cipher function which will be performed.

Enumerator:
FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

FSL_ACC_MODE_CCM 

CBC-MAC for Counter. Requires context and modulus. Final operation may be non-multiple of block size. This mode may be used for AES.

FSL_ACC_MODE_SSL 

SSL mode. Not supported. Combines HMAC and encrypt (or decrypt). Needs one key object for encryption, another for the HMAC. The usual hashing and symmetric encryption algorithms are supported.

Flags which describe the state of the fsl_shw_acco_t.

The FSL_ACCO_CTX_INIT and FSL_ACCO_CTX_FINALIZE flags, when used together, provide for a one-shot operation.

Enumerator:
FSL_ACCO_CTX_INIT 

Initialize Context(s)

FSL_ACCO_CTX_LOAD 

Load intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_SAVE 

Save intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_FINALIZE 

Create MAC during this operation.

FSL_ACCO_NIST_CCM 

Formatting of CCM input data is performed by calls to fsl_shw_ccm_nist_format_ctr_and_iv() and fsl_shw_ccm_nist_update_ctr_and_iv().

FSL_ACCO_CTX_INIT 

Initialize Context(s)

FSL_ACCO_CTX_LOAD 

Load intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_SAVE 

Save intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_FINALIZE 

Create MAC during this operation.

FSL_ACCO_NIST_CCM 

Formatting of CCM input data is performed by calls to fsl_shw_ccm_nist_format_ctr_and_iv() and fsl_shw_ccm_nist_update_ctr_and_iv().

FSL_ACCO_CTX_INIT 

Initialize Context(s)

FSL_ACCO_CTX_LOAD 

Load intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_SAVE 

Save intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_FINALIZE 

Create MAC during this operation.

FSL_ACCO_NIST_CCM 

Formatting of CCM input data is performed by calls to fsl_shw_ccm_nist_format_ctr_and_iv() and fsl_shw_ccm_nist_update_ctr_and_iv().

FSL_ACCO_CTX_INIT 

Initialize Context(s)

FSL_ACCO_CTX_LOAD 

Load intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_SAVE 

Save intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_FINALIZE 

Create MAC during this operation.

FSL_ACCO_NIST_CCM 

Formatting of CCM input data is performed by calls to fsl_shw_ccm_nist_format_ctr_and_iv() and fsl_shw_ccm_nist_update_ctr_and_iv().

Flags which describe the state of the fsl_shw_acco_t.

The FSL_ACCO_CTX_INIT and FSL_ACCO_CTX_FINALIZE flags, when used together, provide for a one-shot operation.

Enumerator:
FSL_ACCO_CTX_INIT 

Initialize Context(s)

FSL_ACCO_CTX_LOAD 

Load intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_SAVE 

Save intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_FINALIZE 

Create MAC during this operation.

FSL_ACCO_NIST_CCM 

Formatting of CCM input data is performed by calls to fsl_shw_ccm_nist_format_ctr_and_iv() and fsl_shw_ccm_nist_update_ctr_and_iv().

FSL_ACCO_CTX_INIT 

Initialize Context(s)

FSL_ACCO_CTX_LOAD 

Load intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_SAVE 

Save intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_FINALIZE 

Create MAC during this operation.

FSL_ACCO_NIST_CCM 

Formatting of CCM input data is performed by calls to fsl_shw_ccm_nist_format_ctr_and_iv() and fsl_shw_ccm_nist_update_ctr_and_iv().

FSL_ACCO_CTX_INIT 

Initialize Context(s)

FSL_ACCO_CTX_LOAD 

Load intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_SAVE 

Save intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_FINALIZE 

Create MAC during this operation.

FSL_ACCO_NIST_CCM 

Formatting of CCM input data is performed by calls to fsl_shw_ccm_nist_format_ctr_and_iv() and fsl_shw_ccm_nist_update_ctr_and_iv().

FSL_ACCO_CTX_INIT 

Initialize Context(s)

FSL_ACCO_CTX_LOAD 

Load intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_SAVE 

Save intermediate context(s). This flag is unsupported.

FSL_ACCO_CTX_FINALIZE 

Create MAC during this operation.

FSL_ACCO_NIST_CCM 

Formatting of CCM input data is performed by calls to fsl_shw_ccm_nist_format_ctr_and_iv() and fsl_shw_ccm_nist_update_ctr_and_iv().

Modulus Selector for CTR modes.

The incrementing of the Counter value may be modified by a modulus. If no modulus is needed or desired for AES, use FSL_CTR_MOD_128.

Enumerator:
FSL_CTR_MOD_8 

Run counter with modulus of 2^8.

FSL_CTR_MOD_16 

Run counter with modulus of 2^16.

FSL_CTR_MOD_24 

Run counter with modulus of 2^24.

FSL_CTR_MOD_32 

Run counter with modulus of 2^32.

FSL_CTR_MOD_40 

Run counter with modulus of 2^40.

FSL_CTR_MOD_48 

Run counter with modulus of 2^48.

FSL_CTR_MOD_56 

Run counter with modulus of 2^56.

FSL_CTR_MOD_64 

Run counter with modulus of 2^64.

FSL_CTR_MOD_72 

Run counter with modulus of 2^72.

FSL_CTR_MOD_80 

Run counter with modulus of 2^80.

FSL_CTR_MOD_88 

Run counter with modulus of 2^88.

FSL_CTR_MOD_96 

Run counter with modulus of 2^96.

FSL_CTR_MOD_104 

Run counter with modulus of 2^104.

FSL_CTR_MOD_112 

Run counter with modulus of 2^112.

FSL_CTR_MOD_120 

Run counter with modulus of 2^120.

FSL_CTR_MOD_128 

Run counter with modulus of 2^128.

FSL_CTR_MOD_8 

Run counter with modulus of 2^8.

FSL_CTR_MOD_16 

Run counter with modulus of 2^16.

FSL_CTR_MOD_24 

Run counter with modulus of 2^24.

FSL_CTR_MOD_32 

Run counter with modulus of 2^32.

FSL_CTR_MOD_40 

Run counter with modulus of 2^40.

FSL_CTR_MOD_48 

Run counter with modulus of 2^48.

FSL_CTR_MOD_56 

Run counter with modulus of 2^56.

FSL_CTR_MOD_64 

Run counter with modulus of 2^64.

FSL_CTR_MOD_72 

Run counter with modulus of 2^72.

FSL_CTR_MOD_80 

Run counter with modulus of 2^80.

FSL_CTR_MOD_88 

Run counter with modulus of 2^88.

FSL_CTR_MOD_96 

Run counter with modulus of 2^96.

FSL_CTR_MOD_104 

Run counter with modulus of 2^104.

FSL_CTR_MOD_112 

Run counter with modulus of 2^112.

FSL_CTR_MOD_120 

Run counter with modulus of 2^120.

FSL_CTR_MOD_128 

Run counter with modulus of 2^128.

FSL_CTR_MOD_8 

Run counter with modulus of 2^8.

FSL_CTR_MOD_16 

Run counter with modulus of 2^16.

FSL_CTR_MOD_24 

Run counter with modulus of 2^24.

FSL_CTR_MOD_32 

Run counter with modulus of 2^32.

FSL_CTR_MOD_40 

Run counter with modulus of 2^40.

FSL_CTR_MOD_48 

Run counter with modulus of 2^48.

FSL_CTR_MOD_56 

Run counter with modulus of 2^56.

FSL_CTR_MOD_64 

Run counter with modulus of 2^64.

FSL_CTR_MOD_72 

Run counter with modulus of 2^72.

FSL_CTR_MOD_80 

Run counter with modulus of 2^80.

FSL_CTR_MOD_88 

Run counter with modulus of 2^88.

FSL_CTR_MOD_96 

Run counter with modulus of 2^96.

FSL_CTR_MOD_104 

Run counter with modulus of 2^104.

FSL_CTR_MOD_112 

Run counter with modulus of 2^112.

FSL_CTR_MOD_120 

Run counter with modulus of 2^120.

FSL_CTR_MOD_128 

Run counter with modulus of 2^128.

FSL_CTR_MOD_8 

Run counter with modulus of 2^8.

FSL_CTR_MOD_16 

Run counter with modulus of 2^16.

FSL_CTR_MOD_24 

Run counter with modulus of 2^24.

FSL_CTR_MOD_32 

Run counter with modulus of 2^32.

FSL_CTR_MOD_40 

Run counter with modulus of 2^40.

FSL_CTR_MOD_48 

Run counter with modulus of 2^48.

FSL_CTR_MOD_56 

Run counter with modulus of 2^56.

FSL_CTR_MOD_64 

Run counter with modulus of 2^64.

FSL_CTR_MOD_72 

Run counter with modulus of 2^72.

FSL_CTR_MOD_80 

Run counter with modulus of 2^80.

FSL_CTR_MOD_88 

Run counter with modulus of 2^88.

FSL_CTR_MOD_96 

Run counter with modulus of 2^96.

FSL_CTR_MOD_104 

Run counter with modulus of 2^104.

FSL_CTR_MOD_112 

Run counter with modulus of 2^112.

FSL_CTR_MOD_120 

Run counter with modulus of 2^120.

FSL_CTR_MOD_128 

Run counter with modulus of 2^128.

Modulus Selector for CTR modes.

The incrementing of the Counter value may be modified by a modulus. If no modulus is needed or desired for AES, use FSL_CTR_MOD_128.

Enumerator:
FSL_CTR_MOD_8 

Run counter with modulus of 2^8.

FSL_CTR_MOD_16 

Run counter with modulus of 2^16.

FSL_CTR_MOD_24 

Run counter with modulus of 2^24.

FSL_CTR_MOD_32 

Run counter with modulus of 2^32.

FSL_CTR_MOD_40 

Run counter with modulus of 2^40.

FSL_CTR_MOD_48 

Run counter with modulus of 2^48.

FSL_CTR_MOD_56 

Run counter with modulus of 2^56.

FSL_CTR_MOD_64 

Run counter with modulus of 2^64.

FSL_CTR_MOD_72 

Run counter with modulus of 2^72.

FSL_CTR_MOD_80 

Run counter with modulus of 2^80.

FSL_CTR_MOD_88 

Run counter with modulus of 2^88.

FSL_CTR_MOD_96 

Run counter with modulus of 2^96.

FSL_CTR_MOD_104 

Run counter with modulus of 2^104.

FSL_CTR_MOD_112 

Run counter with modulus of 2^112.

FSL_CTR_MOD_120 

Run counter with modulus of 2^120.

FSL_CTR_MOD_128 

Run counter with modulus of 2^128.

FSL_CTR_MOD_8 

Run counter with modulus of 2^8.

FSL_CTR_MOD_16 

Run counter with modulus of 2^16.

FSL_CTR_MOD_24 

Run counter with modulus of 2^24.

FSL_CTR_MOD_32 

Run counter with modulus of 2^32.

FSL_CTR_MOD_40 

Run counter with modulus of 2^40.

FSL_CTR_MOD_48 

Run counter with modulus of 2^48.

FSL_CTR_MOD_56 

Run counter with modulus of 2^56.

FSL_CTR_MOD_64 

Run counter with modulus of 2^64.

FSL_CTR_MOD_72 

Run counter with modulus of 2^72.

FSL_CTR_MOD_80 

Run counter with modulus of 2^80.

FSL_CTR_MOD_88 

Run counter with modulus of 2^88.

FSL_CTR_MOD_96 

Run counter with modulus of 2^96.

FSL_CTR_MOD_104 

Run counter with modulus of 2^104.

FSL_CTR_MOD_112 

Run counter with modulus of 2^112.

FSL_CTR_MOD_120 

Run counter with modulus of 2^120.

FSL_CTR_MOD_128 

Run counter with modulus of 2^128.

FSL_CTR_MOD_8 

Run counter with modulus of 2^8.

FSL_CTR_MOD_16 

Run counter with modulus of 2^16.

FSL_CTR_MOD_24 

Run counter with modulus of 2^24.

FSL_CTR_MOD_32 

Run counter with modulus of 2^32.

FSL_CTR_MOD_40 

Run counter with modulus of 2^40.

FSL_CTR_MOD_48 

Run counter with modulus of 2^48.

FSL_CTR_MOD_56 

Run counter with modulus of 2^56.

FSL_CTR_MOD_64 

Run counter with modulus of 2^64.

FSL_CTR_MOD_72 

Run counter with modulus of 2^72.

FSL_CTR_MOD_80 

Run counter with modulus of 2^80.

FSL_CTR_MOD_88 

Run counter with modulus of 2^88.

FSL_CTR_MOD_96 

Run counter with modulus of 2^96.

FSL_CTR_MOD_104 

Run counter with modulus of 2^104.

FSL_CTR_MOD_112 

Run counter with modulus of 2^112.

FSL_CTR_MOD_120 

Run counter with modulus of 2^120.

FSL_CTR_MOD_128 

Run counter with modulus of 2^128.

FSL_CTR_MOD_8 

Run counter with modulus of 2^8.

FSL_CTR_MOD_16 

Run counter with modulus of 2^16.

FSL_CTR_MOD_24 

Run counter with modulus of 2^24.

FSL_CTR_MOD_32 

Run counter with modulus of 2^32.

FSL_CTR_MOD_40 

Run counter with modulus of 2^40.

FSL_CTR_MOD_48 

Run counter with modulus of 2^48.

FSL_CTR_MOD_56 

Run counter with modulus of 2^56.

FSL_CTR_MOD_64 

Run counter with modulus of 2^64.

FSL_CTR_MOD_72 

Run counter with modulus of 2^72.

FSL_CTR_MOD_80 

Run counter with modulus of 2^80.

FSL_CTR_MOD_88 

Run counter with modulus of 2^88.

FSL_CTR_MOD_96 

Run counter with modulus of 2^96.

FSL_CTR_MOD_104 

Run counter with modulus of 2^104.

FSL_CTR_MOD_112 

Run counter with modulus of 2^112.

FSL_CTR_MOD_120 

Run counter with modulus of 2^120.

FSL_CTR_MOD_128 

Run counter with modulus of 2^128.

Enumerator:
FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

Enumerator:
FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

FSL_SHW_CYPHER_MODE_ECB 

ECB mode

FSL_SHW_CYPHER_MODE_CBC 

CBC mode

Algorithm selector for Cryptographic Hash functions.

Selection of algorithm determines how large the context and digest will be. Context is the same size as the digest (resulting hash), unless otherwise specified.

Enumerator:
FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

Algorithm selector for Cryptographic Hash functions.

Selection of algorithm determines how large the context and digest will be. Context is the same size as the digest (resulting hash), unless otherwise specified.

Enumerator:
FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

FSL_HASH_ALG_MD5 

MD5 algorithm. Digest is 16 octets.

FSL_HASH_ALG_SHA1 

SHA-1 (aka SHA or SHA-160) algorithm. Digest is 20 octets.

FSL_HASH_ALG_SHA224 

SHA-224 algorithm. Digest is 28 octets, though context is 32 octets.

FSL_HASH_ALG_SHA256 

SHA-256 algorithm. Digest is 32 octets.

Flags which control a Hash operation.

Enumerator:
FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

Flags which control a Hash operation.

Enumerator:
FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

FSL_HASH_FLAGS_INIT 

Context is empty. Hash is started from scratch, with a message-processed count of zero.

FSL_HASH_FLAGS_SAVE 

Retrieve context from hardware after hashing. If used with the FSL_HASH_FLAGS_FINALIZE flag, the final digest value will be saved in the object.

FSL_HASH_FLAGS_LOAD 

Place context into hardware before hashing.

FSL_HASH_FLAGS_FINALIZE 

PAD message and perform final digest operation. If user message is pre-padded, this flag should not be used.

Flags which control an HMAC operation.

These may be combined by ORing them together. See fsl_shw_hmco_set_flags() and fsl_shw_hmco_clear_flags().

Enumerator:
FSL_HMAC_FLAGS_INIT 

Message context is empty. HMAC is started from scratch (with key) or from precompute of inner hash, depending on whether FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT is set.

FSL_HMAC_FLAGS_SAVE 

Retrieve ongoing context from hardware after hashing. If used with the FSL_HMAC_FLAGS_FINALIZE flag, the final digest value (HMAC) will be saved in the object.

FSL_HMAC_FLAGS_LOAD 

Place ongoing context into hardware before hashing.

FSL_HMAC_FLAGS_FINALIZE 

PAD message and perform final HMAC operations of inner and outer hashes.

FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT 

This means that the context contains precomputed inner and outer hash values.

FSL_HMAC_FLAGS_INIT 

Message context is empty. HMAC is started from scratch (with key) or from precompute of inner hash, depending on whether FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT is set.

FSL_HMAC_FLAGS_SAVE 

Retrieve ongoing context from hardware after hashing. If used with the FSL_HMAC_FLAGS_FINALIZE flag, the final digest value (HMAC) will be saved in the object.

FSL_HMAC_FLAGS_LOAD 

Place ongoing context into hardware before hashing.

FSL_HMAC_FLAGS_FINALIZE 

PAD message and perform final HMAC operations of inner and outer hashes.

FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT 

This means that the context contains precomputed inner and outer hash values.

FSL_HMAC_FLAGS_INIT 

Message context is empty. HMAC is started from scratch (with key) or from precompute of inner hash, depending on whether FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT is set.

FSL_HMAC_FLAGS_SAVE 

Retrieve ongoing context from hardware after hashing. If used with the FSL_HMAC_FLAGS_FINALIZE flag, the final digest value (HMAC) will be saved in the object.

FSL_HMAC_FLAGS_LOAD 

Place ongoing context into hardware before hashing.

FSL_HMAC_FLAGS_FINALIZE 

PAD message and perform final HMAC operations of inner and outer hashes.

FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT 

This means that the context contains precomputed inner and outer hash values.

FSL_HMAC_FLAGS_INIT 

Message context is empty. HMAC is started from scratch (with key) or from precompute of inner hash, depending on whether FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT is set.

FSL_HMAC_FLAGS_SAVE 

Retrieve ongoing context from hardware after hashing. If used with the FSL_HMAC_FLAGS_FINALIZE flag, the final digest value (HMAC) will be saved in the object.

FSL_HMAC_FLAGS_LOAD 

Place ongoing context into hardware before hashing.

FSL_HMAC_FLAGS_FINALIZE 

PAD message and perform final HMAC operations of inner and outer hashes.

FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT 

This means that the context contains precomputed inner and outer hash values.

Flags which control an HMAC operation.

These may be combined by ORing them together. See fsl_shw_hmco_set_flags() and fsl_shw_hmco_clear_flags().

Enumerator:
FSL_HMAC_FLAGS_INIT 

Message context is empty. HMAC is started from scratch (with key) or from precompute of inner hash, depending on whether FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT is set.

FSL_HMAC_FLAGS_SAVE 

Retrieve ongoing context from hardware after hashing. If used with the FSL_HMAC_FLAGS_FINALIZE flag, the final digest value (HMAC) will be saved in the object.

FSL_HMAC_FLAGS_LOAD 

Place ongoing context into hardware before hashing.

FSL_HMAC_FLAGS_FINALIZE 

PAD message and perform final HMAC operations of inner and outer hashes.

FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT 

This means that the context contains precomputed inner and outer hash values.

FSL_HMAC_FLAGS_INIT 

Message context is empty. HMAC is started from scratch (with key) or from precompute of inner hash, depending on whether FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT is set.

FSL_HMAC_FLAGS_SAVE 

Retrieve ongoing context from hardware after hashing. If used with the FSL_HMAC_FLAGS_FINALIZE flag, the final digest value (HMAC) will be saved in the object.

FSL_HMAC_FLAGS_LOAD 

Place ongoing context into hardware before hashing.

FSL_HMAC_FLAGS_FINALIZE 

PAD message and perform final HMAC operations of inner and outer hashes.

FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT 

This means that the context contains precomputed inner and outer hash values.

FSL_HMAC_FLAGS_INIT 

Message context is empty. HMAC is started from scratch (with key) or from precompute of inner hash, depending on whether FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT is set.

FSL_HMAC_FLAGS_SAVE 

Retrieve ongoing context from hardware after hashing. If used with the FSL_HMAC_FLAGS_FINALIZE flag, the final digest value (HMAC) will be saved in the object.

FSL_HMAC_FLAGS_LOAD 

Place ongoing context into hardware before hashing.

FSL_HMAC_FLAGS_FINALIZE 

PAD message and perform final HMAC operations of inner and outer hashes.

FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT 

This means that the context contains precomputed inner and outer hash values.

FSL_HMAC_FLAGS_INIT 

Message context is empty. HMAC is started from scratch (with key) or from precompute of inner hash, depending on whether FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT is set.

FSL_HMAC_FLAGS_SAVE 

Retrieve ongoing context from hardware after hashing. If used with the FSL_HMAC_FLAGS_FINALIZE flag, the final digest value (HMAC) will be saved in the object.

FSL_HMAC_FLAGS_LOAD 

Place ongoing context into hardware before hashing.

FSL_HMAC_FLAGS_FINALIZE 

PAD message and perform final HMAC operations of inner and outer hashes.

FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT 

This means that the context contains precomputed inner and outer hash values.

Algorithm Identifier.

Selection of algorithm will determine how large the block size of the algorithm is. Context size is the same length unless otherwise specified. Selection of algorithm also affects the allowable key length.

Enumerator:
FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_PK_PRIVATE 

Private key of a public-private key-pair. Max is 512 bits...

FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_PK_PRIVATE 

Private key of a public-private key-pair. Max is 512 bits...

Algorithm Identifier.

Selection of algorithm will determine how large the block size of the algorithm is. Context size is the same length unless otherwise specified. Selection of algorithm also affects the allowable key length.

Enumerator:
FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_PK_PRIVATE 

Private key of a public-private key-pair. Max is 512 bits...

FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_ALG_HMAC 

Key will be used to perform an HMAC. Key size is 1 to 64 octets. Block size is 64 octets.

FSL_KEY_ALG_AES 

Advanced Encryption Standard (Rijndael). Block size is 16 octets. Key size is 16 octets. (The single choice of key size is a Sahara platform limitation.)

FSL_KEY_ALG_DES 

Data Encryption Standard. Block size is 8 octets. Key size is 8 octets.

FSL_KEY_ALG_TDES 

2- or 3-key Triple DES. Block size is 8 octets. Key size is 16 octets for 2-key Triple DES, and 24 octets for 3-key.

FSL_KEY_ALG_ARC4 

ARC4. No block size. Context size is 259 octets. Allowed key size is 1-16 octets. (The choices for key size are a Sahara platform limitation.)

FSL_KEY_PK_PRIVATE 

Private key of a public-private key-pair. Max is 512 bits...

Flags which describe the state of the fsl_shw_sko_t.

These may be ORed together to get the desired effect. See fsl_shw_sko_set_flags() and fsl_shw_sko_clear_flags()

Enumerator:
FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_USE_SECRET_KEY 

Use device-unique key. Not always available.

FSL_SKO_KEY_SW_KEY 

Clear key can be provided to the user

FSL_SKO_KEY_SELECT_PF_KEY 

Internal flag to show that this key references one of the hardware keys, and its value is in pf_key.

FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_KEY_SW_KEY 

This key is for software use, and can be copied out of a keystore by its owner. The default is that they key is available only for hardware (or security driver) use.

FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_KEY_SW_KEY 

Key intended for user (software) use; can be read cleartext from the keystore.

FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_KEY_SW_KEY 

This key is for software use, and can be copied out of a keystore by its owner. The default is that they key is available only for hardware (or security driver) use.

FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_KEY_SW_KEY 

Key intended for user (software) use; can be read cleartext from the keystore.

Flags which describe the state of the fsl_shw_sko_t.

These may be ORed together to get the desired effect. See fsl_shw_sko_set_flags() and fsl_shw_sko_clear_flags()

Enumerator:
FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_USE_SECRET_KEY 

Use device-unique key. Not always available.

FSL_SKO_KEY_SW_KEY 

Clear key can be provided to the user

FSL_SKO_KEY_SELECT_PF_KEY 

Internal flag to show that this key references one of the hardware keys, and its value is in pf_key.

FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_KEY_SW_KEY 

This key is for software use, and can be copied out of a keystore by its owner. The default is that they key is available only for hardware (or security driver) use.

FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_KEY_SW_KEY 

Key intended for user (software) use; can be read cleartext from the keystore.

FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_KEY_SW_KEY 

This key is for software use, and can be copied out of a keystore by its owner. The default is that they key is available only for hardware (or security driver) use.

FSL_SKO_KEY_IGNORE_PARITY 

If algorithm is DES or 3DES, do not validate the key parity bits.

FSL_SKO_KEY_PRESENT 

Clear key is present in the object.

FSL_SKO_KEY_ESTABLISHED 

Key has been established for use. This feature is not available for all platforms, nor for all algorithms and modes.

FSL_SKO_KEY_SW_KEY 

Key intended for user (software) use; can be read cleartext from the keystore.

The operation which controls the behavior of fsl_shw_establish_key().

These values are passed to fsl_shw_establish_key().

Enumerator:
FSL_KEY_WRAP_CREATE 

Generate a key from random values.

FSL_KEY_WRAP_ACCEPT 

Use the provided clear key.

FSL_KEY_WRAP_UNWRAP 

Unwrap a previously wrapped key.

FSL_KEY_WRAP_CREATE 

Generate a key from random values.

FSL_KEY_WRAP_ACCEPT 

Use the provided clear key.

FSL_KEY_WRAP_UNWRAP 

Unwrap a previously wrapped key.

FSL_KEY_WRAP_CREATE 

Generate a key from random values.

FSL_KEY_WRAP_ACCEPT 

Use the provided clear key.

FSL_KEY_WRAP_UNWRAP 

Unwrap a previously wrapped key.

FSL_KEY_WRAP_CREATE 

Generate a key from random values.

FSL_KEY_WRAP_ACCEPT 

Use the provided clear key.

FSL_KEY_WRAP_UNWRAP 

Unwrap a previously wrapped key.

The operation which controls the behavior of fsl_shw_establish_key().

These values are passed to fsl_shw_establish_key().

Enumerator:
FSL_KEY_WRAP_CREATE 

Generate a key from random values.

FSL_KEY_WRAP_ACCEPT 

Use the provided clear key.

FSL_KEY_WRAP_UNWRAP 

Unwrap a previously wrapped key.

FSL_KEY_WRAP_CREATE 

Generate a key from random values.

FSL_KEY_WRAP_ACCEPT 

Use the provided clear key.

FSL_KEY_WRAP_UNWRAP 

Unwrap a previously wrapped key.

FSL_KEY_WRAP_CREATE 

Generate a key from random values.

FSL_KEY_WRAP_ACCEPT 

Use the provided clear key.

FSL_KEY_WRAP_UNWRAP 

Unwrap a previously wrapped key.

FSL_KEY_WRAP_CREATE 

Generate a key from random values.

FSL_KEY_WRAP_ACCEPT 

Use the provided clear key.

FSL_KEY_WRAP_UNWRAP 

Unwrap a previously wrapped key.

Partition status information.

Enumerator:
FSL_PART_S_UNUSABLE 

Partition not implemented

FSL_PART_S_UNAVAILABLE 

Partition owned by other host

FSL_PART_S_AVAILABLE 

Partition available

FSL_PART_S_ALLOCATED 

Partition owned by host but not engaged

FSL_PART_S_ENGAGED 

Partition owned by host and engaged

FSL_PART_S_UNUSABLE 

Partition not implemented

FSL_PART_S_UNAVAILABLE 

Partition owned by other host

FSL_PART_S_AVAILABLE 

Partition available

FSL_PART_S_ALLOCATED 

Partition owned by host but not engaged

FSL_PART_S_ENGAGED 

Partition owned by host and engaged

FSL_PART_S_UNUSABLE 

Partition not implemented

FSL_PART_S_UNAVAILABLE 

Partition owned by other host

FSL_PART_S_AVAILABLE 

Partition available

FSL_PART_S_ALLOCATED 

Partition owned by host but not engaged

FSL_PART_S_ENGAGED 

Partition owned by host and engaged

Partition status information.

Enumerator:
FSL_PART_S_UNUSABLE 

Partition not implemented

FSL_PART_S_UNAVAILABLE 

Partition owned by other host

FSL_PART_S_AVAILABLE 

Partition available

FSL_PART_S_ALLOCATED 

Partition owned by host but not engaged

FSL_PART_S_ENGAGED 

Partition owned by host and engaged

FSL_PART_S_UNUSABLE 

Partition not implemented

FSL_PART_S_UNAVAILABLE 

Partition owned by other host

FSL_PART_S_AVAILABLE 

Partition available

FSL_PART_S_ALLOCATED 

Partition owned by host but not engaged

FSL_PART_S_ENGAGED 

Partition owned by host and engaged

FSL_PART_S_UNUSABLE 

Partition not implemented

FSL_PART_S_UNAVAILABLE 

Partition owned by other host

FSL_PART_S_AVAILABLE 

Partition available

FSL_PART_S_ALLOCATED 

Partition owned by host but not engaged

FSL_PART_S_ENGAGED 

Partition owned by host and engaged

Permissions flags for Secure Partitions

Enumerator:
FSL_PERM_NO_ZEROIZE 

SCM Access Permission: Do not zeroize/deallocate partition on SMN Fail state

FSL_PERM_TRUSTED_KEY_READ 

SCM Access Permission: Enforce trusted key read in

FSL_PERM_HD_S 

SCM Access Permission: Ignore Supervisor/User mode in permission determination

FSL_PERM_HD_R 

SCM Access Permission: Allow Read Access to Host Domain

FSL_PERM_HD_W 

SCM Access Permission: Allow Write Access to Host Domain

FSL_PERM_HD_X 

SCM Access Permission: Allow Execute Access to Host Domain

FSL_PERM_TH_R 

SCM Access Permission: Allow Read Access to Trusted Host Domain

FSL_PERM_TH_W 

SCM Access Permission: Allow Write Access to Trusted Host Domain

FSL_PERM_OT_R 

SCM Access Permission: Allow Read Access to Other/World Domain

FSL_PERM_OT_W 

SCM Access Permission: Allow Write Access to Other/World Domain

FSL_PERM_OT_X 

SCM Access Permission: Allow Execute Access to Other/World Domain

FSL_PERM_NO_ZEROIZE 

SCM Access Permission: Do not zeroize/deallocate partition on SMN Fail state

FSL_PERM_TRUSTED_KEY_READ 

SCM Access Permission: Enforce trusted key read in

FSL_PERM_HD_S 

SCM Access Permission: Ignore Supervisor/User mode in permission determination

FSL_PERM_HD_R 

SCM Access Permission: Allow Read Access to Host Domain

FSL_PERM_HD_W 

SCM Access Permission: Allow Write Access to Host Domain

FSL_PERM_HD_X 

SCM Access Permission: Allow Execute Access to Host Domain

FSL_PERM_TH_R 

SCM Access Permission: Allow Read Access to Trusted Host Domain

FSL_PERM_TH_W 

SCM Access Permission: Allow Write Access to Trusted Host Domain

FSL_PERM_OT_R 

SCM Access Permission: Allow Read Access to Other/World Domain

FSL_PERM_OT_W 

SCM Access Permission: Allow Write Access to Other/World Domain

FSL_PERM_OT_X 

SCM Access Permission: Allow Execute Access to Other/World Domain

FSL_PERM_NO_ZEROIZE 

SCM Access Permission: Do not zeroize/deallocate partition on SMN Fail state

FSL_PERM_TRUSTED_KEY_READ 

SCM Access Permission: Enforce trusted key read in

FSL_PERM_HD_S 

SCM Access Permission: Ignore Supervisor/User mode in permission determination

FSL_PERM_HD_R 

SCM Access Permission: Allow Read Access to Host Domain

FSL_PERM_HD_W 

SCM Access Permission: Allow Write Access to Host Domain

FSL_PERM_HD_X 

SCM Access Permission: Allow Execute Access to Host Domain

FSL_PERM_TH_R 

SCM Access Permission: Allow Read Access to Trusted Host Domain

FSL_PERM_TH_W 

SCM Access Permission: Allow Write Access to Trusted Host Domain

FSL_PERM_OT_R 

SCM Access Permission: Allow Read Access to Other/World Domain

FSL_PERM_OT_W 

SCM Access Permission: Allow Write Access to Other/World Domain

FSL_PERM_OT_X 

SCM Access Permission: Allow Execute Access to Other/World Domain

FSL_PERM_NO_ZEROIZE 

SCM Access Permission: Do not zeroize/deallocate partition on SMN Fail state

FSL_PERM_TRUSTED_KEY_READ 

SCM Access Permission: Enforce trusted key read in

FSL_PERM_HD_S 

SCM Access Permission: Ignore Supervisor/User mode in permission determination

FSL_PERM_HD_R 

SCM Access Permission: Allow Read Access to Host Domain

FSL_PERM_HD_W 

SCM Access Permission: Allow Write Access to Host Domain

FSL_PERM_HD_X 

SCM Access Permission: Allow Execute Access to Host Domain

FSL_PERM_TH_R 

SCM Access Permission: Allow Read Access to Trusted Host Domain

FSL_PERM_TH_W 

SCM Access Permission: Allow Write Access to Trusted Host Domain

FSL_PERM_OT_R 

SCM Access Permission: Allow Read Access to Other/World Domain

FSL_PERM_OT_W 

SCM Access Permission: Allow Write Access to Other/World Domain

FSL_PERM_OT_X 

SCM Access Permission: Allow Execute Access to Other/World Domain

Permissions flags for Secure Partitions

Enumerator:
FSL_PERM_NO_ZEROIZE 

SCM Access Permission: Do not zeroize/deallocate partition on SMN Fail state

FSL_PERM_TRUSTED_KEY_READ 

SCM Access Permission: Enforce trusted key read in

FSL_PERM_HD_S 

SCM Access Permission: Ignore Supervisor/User mode in permission determination

FSL_PERM_HD_R 

SCM Access Permission: Allow Read Access to Host Domain

FSL_PERM_HD_W 

SCM Access Permission: Allow Write Access to Host Domain

FSL_PERM_HD_X 

SCM Access Permission: Allow Execute Access to Host Domain

FSL_PERM_TH_R 

SCM Access Permission: Allow Read Access to Trusted Host Domain

FSL_PERM_TH_W 

SCM Access Permission: Allow Write Access to Trusted Host Domain

FSL_PERM_OT_R 

SCM Access Permission: Allow Read Access to Other/World Domain

FSL_PERM_OT_W 

SCM Access Permission: Allow Write Access to Other/World Domain

FSL_PERM_OT_X 

SCM Access Permission: Allow Execute Access to Other/World Domain

FSL_PERM_NO_ZEROIZE 

SCM Access Permission: Do not zeroize/deallocate partition on SMN Fail state

FSL_PERM_TRUSTED_KEY_READ 

SCM Access Permission: Enforce trusted key read in

FSL_PERM_HD_S 

SCM Access Permission: Ignore Supervisor/User mode in permission determination

FSL_PERM_HD_R 

SCM Access Permission: Allow Read Access to Host Domain

FSL_PERM_HD_W 

SCM Access Permission: Allow Write Access to Host Domain

FSL_PERM_HD_X 

SCM Access Permission: Allow Execute Access to Host Domain

FSL_PERM_TH_R 

SCM Access Permission: Allow Read Access to Trusted Host Domain

FSL_PERM_TH_W 

SCM Access Permission: Allow Write Access to Trusted Host Domain

FSL_PERM_OT_R 

SCM Access Permission: Allow Read Access to Other/World Domain

FSL_PERM_OT_W 

SCM Access Permission: Allow Write Access to Other/World Domain

FSL_PERM_OT_X 

SCM Access Permission: Allow Execute Access to Other/World Domain

FSL_PERM_NO_ZEROIZE 

SCM Access Permission: Do not zeroize/deallocate partition on SMN Fail state

FSL_PERM_TRUSTED_KEY_READ 

SCM Access Permission: Enforce trusted key read in

FSL_PERM_HD_S 

SCM Access Permission: Ignore Supervisor/User mode in permission determination

FSL_PERM_HD_R 

SCM Access Permission: Allow Read Access to Host Domain

FSL_PERM_HD_W 

SCM Access Permission: Allow Write Access to Host Domain

FSL_PERM_HD_X 

SCM Access Permission: Allow Execute Access to Host Domain

FSL_PERM_TH_R 

SCM Access Permission: Allow Read Access to Trusted Host Domain

FSL_PERM_TH_W 

SCM Access Permission: Allow Write Access to Trusted Host Domain

FSL_PERM_OT_R 

SCM Access Permission: Allow Read Access to Other/World Domain

FSL_PERM_OT_W 

SCM Access Permission: Allow Write Access to Other/World Domain

FSL_PERM_OT_X 

SCM Access Permission: Allow Execute Access to Other/World Domain

FSL_PERM_NO_ZEROIZE 

SCM Access Permission: Do not zeroize/deallocate partition on SMN Fail state

FSL_PERM_TRUSTED_KEY_READ 

SCM Access Permission: Enforce trusted key read in

FSL_PERM_HD_S 

SCM Access Permission: Ignore Supervisor/User mode in permission determination

FSL_PERM_HD_R 

SCM Access Permission: Allow Read Access to Host Domain

FSL_PERM_HD_W 

SCM Access Permission: Allow Write Access to Host Domain

FSL_PERM_HD_X 

SCM Access Permission: Allow Execute Access to Host Domain

FSL_PERM_TH_R 

SCM Access Permission: Allow Read Access to Trusted Host Domain

FSL_PERM_TH_W 

SCM Access Permission: Allow Write Access to Trusted Host Domain

FSL_PERM_OT_R 

SCM Access Permission: Allow Read Access to Other/World Domain

FSL_PERM_OT_W 

SCM Access Permission: Allow Write Access to Other/World Domain

FSL_PERM_OT_X 

SCM Access Permission: Allow Execute Access to Other/World Domain

Enumerator:
FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

Enumerator:
FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

FSL_SHW_PF_KEY_IIM 

Present fused IIM key

FSL_SHW_PF_KEY_PRG 

Present Program key

FSL_SHW_PF_KEY_IIM_PRG 

Present IIM ^ Program key

FSL_SHW_PF_KEY_IIM_RND 

Present Random key

FSL_SHW_PF_KEY_RND 

Present IIM ^ Random key

Return code for FSL_SHW library.

These codes may be returned from a function call. In non-blocking mode, they will appear as the status in a Result Object.

Enumerator:
FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

Return code for FSL_SHW library.

These codes may be returned from a function call. In non-blocking mode, they will appear as the status in a Result Object.

Enumerator:
FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

FSL_RETURN_OK_S 

No error. As a function return code in Non-blocking mode, this may simply mean that the operation was accepted for eventual execution.

FSL_RETURN_ERROR_S 

Failure for non-specific reason.

FSL_RETURN_NO_RESOURCE_S 

Operation failed because some resource was not able to be allocated.

FSL_RETURN_BAD_ALGORITHM_S 

Crypto algorithm unrecognized or improper.

FSL_RETURN_BAD_MODE_S 

Crypto mode unrecognized or improper.

FSL_RETURN_BAD_FLAG_S 

Flag setting unrecognized or inconsistent.

FSL_RETURN_BAD_KEY_LENGTH_S 

Improper or unsupported key length for algorithm.

FSL_RETURN_BAD_KEY_PARITY_S 

Improper parity in a (DES, TDES) key.

FSL_RETURN_BAD_DATA_LENGTH_S 

Improper or unsupported data length for algorithm or internal buffer.

FSL_RETURN_AUTH_FAILED_S 

Authentication / Integrity Check code check failed.

FSL_RETURN_MEMORY_ERROR_S 

A memory error occurred.

FSL_RETURN_INTERNAL_ERROR_S 

An error internal to the hardware occurred.

FSL_RETURN_POINT_AT_INFINITY_S 

ECC detected Point at Infinity

FSL_RETURN_POINT_NOT_AT_INFINITY_S 

ECC detected No Point at Infinity

FSL_RETURN_GCD_IS_ONE_S 

GCD is One

FSL_RETURN_GCD_IS_NOT_ONE_S 

GCD is not One

FSL_RETURN_PRIME_S 

Candidate is Prime

FSL_RETURN_NOT_PRIME_S 

Candidate is not Prime

FSL_RETURN_EVEN_MODULUS_ERROR_S 

N register loaded improperly with even value

FSL_RETURN_DIVIDE_BY_ZERO_ERROR_S 

Divisor is zero.

FSL_RETURN_BAD_EXPONENT_ERROR_S 

Bad Exponent or Scalar value for Point Multiply

FSL_RETURN_OSCILLATOR_ERROR_S 

RNG hardware problem.

FSL_RETURN_STATISTICS_ERROR_S 

RNG hardware problem.

Flags to control use of the fsl_shw_scco_t.

These may be ORed together to get the desired effect. See fsl_shw_scco_set_flags() and fsl_shw_scco_clear_flags()

Enumerator:
FSL_SYM_CTX_INIT 

Context is empty. In ARC4, this means that the S-Box needs to be generated from the key. In FSL_SYM_MODE_CBC mode, this allows an IV of zero to be specified. In FSL_SYM_MODE_CTR mode, it means that an initial CTR value of zero is desired.

FSL_SYM_CTX_LOAD 

Load context from object into hardware before running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_SAVE 

Save context from hardware into object after running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_PROTECT 

Context (SBox) is to be unwrapped and wrapped on each use. This flag is unsupported.

FSL_SYM_CTX_INIT 

Context is empty. In ARC4, this means that the S-Box needs to be generated from the key. In FSL_SYM_MODE_CBC mode, this allows an IV of zero to be specified. In FSL_SYM_MODE_CTR mode, it means that an initial CTR value of zero is desired.

FSL_SYM_CTX_LOAD 

Load context from object into hardware before running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_SAVE 

Save context from hardware into object after running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_PROTECT 

Context (SBox) is to be unwrapped and wrapped on each use. This flag is unsupported.

FSL_SYM_CTX_INIT 

Context is empty. In ARC4, this means that the S-Box needs to be generated from the key. In FSL_SYM_MODE_CBC mode, this allows an IV of zero to be specified. In FSL_SYM_MODE_CTR mode, it means that an initial CTR value of zero is desired.

FSL_SYM_CTX_LOAD 

Load context from object into hardware before running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_SAVE 

Save context from hardware into object after running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_PROTECT 

Context (SBox) is to be unwrapped and wrapped on each use. This flag is unsupported.

FSL_SYM_CTX_INIT 

Context is empty. In ARC4, this means that the S-Box needs to be generated from the key. In FSL_SYM_MODE_CBC mode, this allows an IV of zero to be specified. In FSL_SYM_MODE_CTR mode, it means that an initial CTR value of zero is desired.

FSL_SYM_CTX_LOAD 

Load context from object into hardware before running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_SAVE 

Save context from hardware into object after running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_PROTECT 

Context (SBox) is to be unwrapped and wrapped on each use. This flag is unsupported.

Flags to control use of the fsl_shw_scco_t.

These may be ORed together to get the desired effect. See fsl_shw_scco_set_flags() and fsl_shw_scco_clear_flags()

Enumerator:
FSL_SYM_CTX_INIT 

Context is empty. In ARC4, this means that the S-Box needs to be generated from the key. In FSL_SYM_MODE_CBC mode, this allows an IV of zero to be specified. In FSL_SYM_MODE_CTR mode, it means that an initial CTR value of zero is desired.

FSL_SYM_CTX_LOAD 

Load context from object into hardware before running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_SAVE 

Save context from hardware into object after running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_PROTECT 

Context (SBox) is to be unwrapped and wrapped on each use. This flag is unsupported.

FSL_SYM_CTX_INIT 

Context is empty. In ARC4, this means that the S-Box needs to be generated from the key. In FSL_SYM_MODE_CBC mode, this allows an IV of zero to be specified. In FSL_SYM_MODE_CTR mode, it means that an initial CTR value of zero is desired.

FSL_SYM_CTX_LOAD 

Load context from object into hardware before running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_SAVE 

Save context from hardware into object after running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_PROTECT 

Context (SBox) is to be unwrapped and wrapped on each use. This flag is unsupported.

FSL_SYM_CTX_INIT 

Context is empty. In ARC4, this means that the S-Box needs to be generated from the key. In FSL_SYM_MODE_CBC mode, this allows an IV of zero to be specified. In FSL_SYM_MODE_CTR mode, it means that an initial CTR value of zero is desired.

FSL_SYM_CTX_LOAD 

Load context from object into hardware before running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_SAVE 

Save context from hardware into object after running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_PROTECT 

Context (SBox) is to be unwrapped and wrapped on each use. This flag is unsupported.

FSL_SYM_CTX_INIT 

Context is empty. In ARC4, this means that the S-Box needs to be generated from the key. In FSL_SYM_MODE_CBC mode, this allows an IV of zero to be specified. In FSL_SYM_MODE_CTR mode, it means that an initial CTR value of zero is desired.

FSL_SYM_CTX_LOAD 

Load context from object into hardware before running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_SAVE 

Save context from hardware into object after running cipher. In FSL_SYM_MODE_CTR mode, this would refer to the Counter Value.

FSL_SYM_CTX_PROTECT 

Context (SBox) is to be unwrapped and wrapped on each use. This flag is unsupported.

Mode selector for Symmetric Ciphers.

The selection of mode determines how a cryptographic algorithm will be used to process the plaintext or ciphertext.

For all modes which are run block-by-block (that is, all but FSL_SYM_MODE_STREAM), any partial operations must be performed on a text length which is multiple of the block size. Except for FSL_SYM_MODE_CTR, these block-by-block algorithms must also be passed a total number of octets which is a multiple of the block size.

In modes which require that the total number of octets of data be a multiple of the block size (FSL_SYM_MODE_ECB and FSL_SYM_MODE_CBC), and the user has a total number of octets which are not a multiple of the block size, the user must perform any necessary padding to get to the correct data length.

Enumerator:
FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

Mode selector for Symmetric Ciphers.

The selection of mode determines how a cryptographic algorithm will be used to process the plaintext or ciphertext.

For all modes which are run block-by-block (that is, all but FSL_SYM_MODE_STREAM), any partial operations must be performed on a text length which is multiple of the block size. Except for FSL_SYM_MODE_CTR, these block-by-block algorithms must also be passed a total number of octets which is a multiple of the block size.

In modes which require that the total number of octets of data be a multiple of the block size (FSL_SYM_MODE_ECB and FSL_SYM_MODE_CBC), and the user has a total number of octets which are not a multiple of the block size, the user must perform any necessary padding to get to the correct data length.

Enumerator:
FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

FSL_SYM_MODE_STREAM 

Stream. There is no associated block size. Any request to process data may be of any length. This mode is only for ARC4 operations, and is also the only mode used for ARC4.

FSL_SYM_MODE_ECB 

Electronic Codebook. Each block of data is encrypted/decrypted. The length of the data stream must be a multiple of the block size. This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CBC 

Cipher-Block Chaining. Each block of data is encrypted/decrypted and then "chained" with the previous block by an XOR function. Requires context to start the XOR (previous block). This mode may be used for DES, 3DES, and AES. The block size is determined by the algorithm.

FSL_SYM_MODE_CTR 

Counter. The counter is encrypted, then XORed with a block of data. The counter is then incremented (using modulus arithmetic) for the next block. The final operation may be non-multiple of block size. This mode may be used for AES. The block size is determined by the algorithm.

Enumerator:
FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

Enumerator:
FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

FSL_SHW_TAMPER_NONE 

No error detected

FSL_SHW_TAMPER_WTD 

wire-mesh tampering det

FSL_SHW_TAMPER_ETBD 

ext tampering det: input B

FSL_SHW_TAMPER_ETAD 

ext tampering det: input A

FSL_SHW_TAMPER_EBD 

external boot detected

FSL_SHW_TAMPER_SAD 

security alarm detected

FSL_SHW_TAMPER_TTD 

temperature tampering det

FSL_SHW_TAMPER_CTD 

clock tampering det

FSL_SHW_TAMPER_VTD 

voltage tampering det

FSL_SHW_TAMPER_MCO 

monotonic counter overflow

FSL_SHW_TAMPER_TCO 

time counter overflow

Flags for the state of the User Context Object (fsl_shw_uco_t).

Enumerator:
FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

Flags for the state of the User Context Object (fsl_shw_uco_t).

Enumerator:
FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.

FSL_UCO_BLOCKING_MODE 

API will block the caller until operation completes. The result will be available in the return code. If this is not set, user will have to get results using fsl_shw_get_results().

FSL_UCO_CALLBACK_MODE 

User wants callback (at the function specified with fsl_shw_uco_set_callback()) when the operation completes. This flag is valid only if FSL_UCO_BLOCKING_MODE is not set.

FSL_UCO_SAVE_DESC_CHAIN 

Do not free descriptor chain after driver (adaptor) finishes

FSL_UCO_CALLBACK_SETUP_COMPLETE 

User has made at least one request with callbacks requested, so API is ready to handle others.

FSL_UCO_CHAIN_PREPHYSICALIZED 

(virtual) pointer to descriptor chain is completely linked with physical (DMA) addresses, ready for the hardware. This flag should not be used by FSL SHW API programs.

FSL_UCO_CONTEXT_CHANGED 

The user has changed the context but the changes have not been copied to the kernel driver.

FSL_UCO_USERMODE_USER 

Internal Use. This context belongs to a user-mode API user.


Function Documentation

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 
)

Decrypt a region of secure memory using the hardware secret key.

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

References FSL_RETURN_ERROR_S, FSL_RETURN_OK_S, and os_cache_flush_range.

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 
)

Encrypt a region of secure memory using the hardware secret key.

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

References FSL_RETURN_ERROR_S, FSL_RETURN_OK_S, os_cache_flush_range, and os_cache_inv_range.

fsl_shw_return_t fsl_shw_add_entropy ( fsl_shw_uco_t user_ctx,
uint32_t  length,
uint8_t *  data 
)

Add entropy to random number generator.

Parameters:
user_ctx A user context from fsl_shw_register_user().
length Number of bytes at data.
data Entropy to add to random number generator.
Returns:
A return code of type fsl_shw_return_t.

Add entropy to a random number generator

Parameters:
user_ctx 
length 
data 
Returns:
A return code of type fsl_shw_return_t.

References DESC_IN_IN, FSL_RETURN_ERROR_S, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_OK_S, os_alloc_memory, os_free_memory, RNG_ADD_ENTROPY, rng_availability, RNG_STATUS_OK, SAH_HDR_RNG_GENERATE, and sah_validate_uco().

Referenced by add_entropy(), and rng_test_add_entropy().

fsl_shw_return_t fsl_shw_auth_decrypt ( fsl_shw_uco_t user_ctx,
fsl_shw_acco_t auth_ctx,
fsl_shw_sko_t cipher_key_info,
fsl_shw_sko_t auth_key_info,
uint32_t  auth_data_length,
const uint8_t *  auth_data,
uint32_t  payload_length,
const uint8_t *  ct,
const uint8_t *  auth_value,
uint8_t *  payload 
)

Authenticate and decrypt a (CCM) stream.

Parameters:
user_ctx The user's context
auth_ctx Info on this Auth operation
cipher_key_info Key to encrypt payload
auth_key_info (unused - same key in CCM)
auth_data_length Length in bytes of auth_data
auth_data Any auth-only data
payload_length Length in bytes of payload
ct The encrypted data
auth_value The authentication code to validate
[out] payload The location to store decrypted data
Returns:
A return code of type fsl_shw_return_t.

References add_assoc_preamble(), block_zeros, fsl_shw_acco_t::CCM_ctx_info, fsl_shw_acco_t::cipher_ctx_info, DESC_IN_IN, DESC_IN_KEY, DESC_IN_OUT, DESC_OUT_OUT, fsl_shw_acco_t::flags, fsl_shw_uco_t::flags, FSL_ACC_MODE_CCM, FSL_RETURN_AUTH_FAILED_S, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_BAD_MODE_S, FSL_RETURN_ERROR_S, FSL_RETURN_OK_S, FSL_UCO_BLOCKING_MODE, fsl_shw_acco_t::mac_length, fsl_shw_acco_t::mode, SAH_HDR_SKHA_ENC_DEC, SAH_HDR_SKHA_READ_CONTEXT_IV, SAH_HDR_SKHA_SET_MODE_ENC_DEC, SAH_HDR_SKHA_SET_MODE_IV_KEY, sah_insert_skha_modulus_128, and fsl_shw_acco_t::unencrypted_mac.

fsl_shw_return_t fsl_shw_deregister_user ( fsl_shw_uco_t user_ctx  ) 

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.

References FSL_RETURN_ERROR_S, FSL_RETURN_OK_S, fsl_shw_spo_t::kernel_base, OS_ERROR_OK_S, os_free_memory, os_lock_save_context, os_unlock_restore_context, sah_deregister(), shw_queue_lock, SHW_REMOVE_USER(), unmap_user_memory(), and fsl_shw_spo_t::user_base.

fsl_shw_return_t fsl_shw_diminish_perms ( fsl_shw_uco_t user_ctx,
void *  address,
uint32_t  permissions 
)

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.

References FSL_RETURN_ERROR_S, and FSL_RETURN_OK_S.

fsl_shw_return_t fsl_shw_establish_key ( fsl_shw_uco_t user_ctx,
fsl_shw_sko_t key_info,
fsl_shw_key_wrap_t  establish_type,
const uint8_t *  key 
)

Establish the key in a protected location, which can be the system keystore, user keystore, or (on platforms that support it) as a Platform Key.

By default, keys initialized with fsl_shw_sko_init() will be placed into the system keystore. The user can cause the key to be established in a user keystore by first calling fsl_shw_sko_set_keystore() on the key. Normally, keys in the system keystore can only be used for hardware encrypt or decrypt operations, however if the FSL_SKO_KEY_SW_KEY flag is applied using fsl_shw_sko_set_flags(), the key will be established as a software key, which can then be read out using fsl_shw_read_key().

Keys initialized with fsl_shw_sko_init_pf_key() are established as a Platform Key. Their use is covered in Hardware key-select extensions - DryIce.

This function only needs to be used when unwrapping a key, setting up a key which could be wrapped with a later call to fsl_shw_extract_key(), or setting up a key as a Platform Key. Normal cleartext keys can simply be placed into fsl_shw_sko_t key objects with fsl_shw_sko_set_key() and used directly.

The maximum key size supported for wrapped/unwrapped keys is 32 octets. (This is the maximum reasonable key length on Sahara - 32 octets for an HMAC key based on SHA-256.) The key size is determined by the key_info. The expected length of key can be determined by fsl_shw_sko_calculate_wrapped_size()

The protected key will not be available for use until this operation successfully completes.

This feature is not available for all platforms, nor for all algorithms and modes.

Parameters:
user_ctx A user context from fsl_shw_register_user().
[in,out] key_info The information about the key to be which will be established. In the create case, the key length must be set.
establish_type How key will be interpreted to establish a key for use.
key If establish_type is FSL_KEY_WRAP_UNWRAP, this is the location of a wrapped key. If establish_type is FSL_KEY_WRAP_CREATE, this parameter can be NULL. If establish_type is FSL_KEY_WRAP_ACCEPT, this is the location of a plaintext key.

Place a key into a protected location for use only by cryptographic algorithms.

This only needs to be used to a) unwrap a key, or b) set up a key which could be wrapped with a later call to fsl_shw_extract_key(). Normal cleartext keys can simply be placed into fsl_shw_sko_t key objects with fsl_shw_sko_set_key() and used directly.

The maximum key size supported for wrapped/unwrapped keys is 32 octets. (This is the maximum reasonable key length on Sahara - 32 octets for an HMAC key based on SHA-256.) The key size is determined by the key_info. The expected length of key can be determined by fsl_shw_sko_calculate_wrapped_size()

The protected key will not be available for use until this operation successfully completes.

This feature is not available for all platforms, nor for all algorithms and modes.

Parameters:
user_ctx A user context from fsl_shw_register_user().
[in,out] key_info The information about the key to be which will be established. In the create case, the key length must be set.
establish_type How key will be interpreted to establish a key for use.
key If establish_type is FSL_KEY_WRAP_UNWRAP, this is the location of a wrapped key. If establish_type is FSL_KEY_WRAP_CREATE, this parameter can be NULL. If establish_type is FSL_KEY_WRAP_ACCEPT, this is the location of a plaintext key.
Returns:
A return code of type fsl_shw_return_t.

References DESC_KEY_OUT, fsl_shw_uco_t::flags, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_ERROR_S, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_OK_S, FSL_SKO_KEY_ESTABLISHED, FSL_UCO_BLOCKING_MODE, fsl_shw_sko_t::keystore, keystore_slot_alloc(), keystore_slot_dealloc(), keystore_slot_load(), LOG_DIAG, and SAH_HDR_RNG_GENERATE.

Referenced by create_key(), extract_reestablish_key(), run_user_wrap(), run_wrap(), and test_software_key().

fsl_shw_return_t fsl_shw_extract_key ( fsl_shw_uco_t user_ctx,
fsl_shw_sko_t key_info,
uint8_t *  covered_key 
)

Wrap a key and retrieve the wrapped value.

A wrapped key is a key that has been cryptographically obscured. It is only able to be used with keys that have been established by fsl_shw_establish_key().

For keys established in the system or user keystore, this function will also release the key (see fsl_shw_release_key()) so that it must be re- established before reuse. This function will not release keys that are established as a Platform Key, so a call to fsl_shw_release_key() is necessary to release those keys.

This feature is not available for all platforms, nor for all algorithms and modes.

Parameters:
user_ctx A user context from fsl_shw_register_user().
key_info The information about the key to be deleted.
[out] covered_key The location to store the wrapped key. (This size is based upon the maximum key size of 32 octets).
Returns:
A return code of type fsl_shw_return_t.

Wrap a key and retrieve the wrapped value.

A wrapped key is a key that has been cryptographically obscured. It is only able to be used with fsl_shw_establish_key().

This function will also release the key (see fsl_shw_release_key()) so that it must be re-established before reuse.

This feature is not available for all platforms, nor for all algorithms and modes.

Parameters:
user_ctx A user context from fsl_shw_register_user().
key_info The information about the key to be deleted.
[out] covered_key The location to store the 48-octet wrapped key. (This size is based upon the maximum key size of 32 octets).
Returns:
A return code of type fsl_shw_return_t.

References fsl_shw_uco_t::flags, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_OK_S, FSL_SKO_KEY_ESTABLISHED, FSL_SKO_KEY_PRESENT, FSL_SKO_KEY_SW_KEY, FSL_UCO_BLOCKING_MODE, fsl_shw_sko_t::keystore, and keystore_slot_dealloc().

Referenced by extract_reestablish_key(), run_user_wrap(), run_wrap(), and test_software_key().

fsl_shw_return_t fsl_shw_gen_encrypt ( fsl_shw_uco_t user_ctx,
fsl_shw_acco_t auth_ctx,
fsl_shw_sko_t cipher_key_info,
fsl_shw_sko_t auth_key_info,
uint32_t  auth_data_length,
const uint8_t *  auth_data,
uint32_t  payload_length,
const uint8_t *  payload,
uint8_t *  ct,
uint8_t *  auth_value 
)

Generate a (CCM) auth code and encrypt the payload.

Perform Generation-Encryption by doing a Cipher and a Hash.

Generate the authentication value auth_value as well as encrypt the payload into ct (the ciphertext). This is a one-shot function, so all of the auth_data and the total message payload must passed in one call. This also means that the flags in the auth_ctx must be FSL_ACCO_CTX_INIT and FSL_ACCO_CTX_FINALIZE.

Parameters:
user_ctx A user context from fsl_shw_register_user().
auth_ctx Controlling object for Authenticate-decrypt.
cipher_key_info The key being used for the cipher part of this operation. In CCM mode, this key is used for both parts.
auth_key_info The key being used for the authentication part of this operation. In CCM mode, this key is ignored and may be NULL.
auth_data_length Length, in octets, of auth_data.
auth_data Data to be authenticated but not encrypted.
payload_length Length, in octets, of payload.
payload Pointer to the plaintext to be encrypted.
[out] ct Pointer to the where the encrypted payload will be stored. Must be payload_length octets long.
[out] auth_value Pointer to where the generated authentication field will be stored. Must be as many octets as indicated by MAC length in the function_ctx.
Returns:
A return code of type fsl_shw_return_t.

This is a very complicated function. Seven (or eight) descriptors are required to perform a CCM calculation.

First: Load CTR0 and key.

Second: Run an octet of data through to bump to CTR1. (This could be done in software, but software will have to bump and later decrement - or copy and bump.

Third: (in Virtio) Load a descriptor with data of zeros for CBC IV.

Fourth: Run any (optional) "additional data" through the CBC-mode portion of the algorithm.

Fifth: Run the payload through in CCM mode.

Sixth: Extract the unencrypted MAC.

Seventh: Load CTR0.

Eighth: Encrypt the MAC.

Parameters:
user_ctx The user's context
auth_ctx Info on this Auth operation
cipher_key_info Key to encrypt payload
auth_key_info (unused - same key in CCM)
auth_data_length Length in bytes of auth_data
auth_data Any auth-only data
payload_length Length in bytes of payload
payload The data to encrypt
[out] ct The location to store encrypted data
[out] auth_value The location to store authentication code
Returns:
A return code of type fsl_shw_return_t.

References add_assoc_preamble(), block_zeros, fsl_shw_acco_t::CCM_ctx_info, fsl_shw_acco_t::cipher_ctx_info, DESC_IN_IN, DESC_IN_KEY, DESC_IN_OUT, DESC_OUT_OUT, fsl_shw_acco_t::flags, FSL_ACC_MODE_CCM, FSL_ACC_MODE_SSL, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_BAD_MODE_S, FSL_RETURN_ERROR_S, FSL_RETURN_OK_S, garbage_output, fsl_shw_acco_t::mac_length, fsl_shw_acco_t::mode, SAH_HDR_SKHA_ENC_DEC, SAH_HDR_SKHA_READ_CONTEXT_IV, SAH_HDR_SKHA_SET_MODE_ENC_DEC, SAH_HDR_SKHA_SET_MODE_IV_KEY, sah_insert_skha_modulus_128, and fsl_shw_acco_t::unencrypted_mac.

fsl_shw_pco_t* fsl_shw_get_capabilities ( fsl_shw_uco_t user_ctx  ) 

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.

References FSL_RETURN_OK_S, and get_capabilities().

fsl_shw_return_t fsl_shw_get_random ( fsl_shw_uco_t user_ctx,
uint32_t  length,
uint8_t *  data 
)

Get random data.

Parameters:
user_ctx A user context from fsl_shw_register_user().
length The number of octets of data being requested.
[out] data A pointer to a location of length octets to where random data will be returned.
Returns:
A return code of type fsl_shw_return_t.

Get random data.

Parameters:
user_ctx A user context from fsl_shw_register_user().
length The number of octets of data being requested.
data A pointer to a location of length octets to where random data will be returned.
Returns:
FSL_RETURN_NO_RESOURCE_S A return code of type fsl_shw_return_t. FSL_RETURN_OK_S

Get random data.

Parameters:
user_ctx A user context from fsl_shw_register_user().
length The number of octets of data being requested.
[out] data A pointer to a location of length octets to where random data will be returned.
Returns:
A return code of type fsl_shw_return_t.

Get random data.

Parameters:
user_ctx A user context from fsl_shw_register_user().
length The number of octets of data being requested.
data A pointer to a location of length octets to where random data will be returned.
Returns:
FSL_RETURN_NO_RESOURCE_S A return code of type fsl_shw_return_t. FSL_RETURN_OK_S

Get a random number

Parameters:
user_ctx 
length 
data 
Returns:
A return code of type fsl_shw_return_t.

References fsl_shw_uco_t::callback, rng_work_entry::completed, rng_work_entry::data_local, rng_work_entry::data_user, DESC_OUT_OUT, finish_random(), fsl_shw_uco_t::flags, FSL_RETURN_ERROR_S, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_OK_S, FSL_UCO_BLOCKING_MODE, rng_work_entry::hdr, rng_work_entry::length, os_alloc_memory, os_free_memory, os_sleep, RNG_ADD_WORK_ENTRY(), rng_availability, RNG_STATUS_OK, SAH_HDR_RNG_GENERATE, sah_validate_uco(), and fsl_shw_uco_t::user_ref.

Referenced by get_random(), and rng_test_get_random().

fsl_shw_return_t fsl_shw_get_results ( fsl_shw_uco_t user_ctx,
unsigned  result_size,
fsl_shw_result_t  results[],
unsigned *  result_count 
)

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.

References sah_results::actual, FSL_RETURN_OK_S, os_free_memory, os_lock_save_context, os_unlock_restore_context, sah_results::requested, sah_results::results, sah_get_results(), sah_validate_uco(), and shw_queue_lock.

fsl_shw_return_t fsl_shw_hash ( fsl_shw_uco_t user_ctx,
fsl_shw_hco_t hash_ctx,
const uint8_t *  msg,
uint32_t  length,
uint8_t *  result,
uint32_t  result_len 
)

Hash a stream of data with a cryptographic hash algorithm.

The flags in the hash_ctx control the operation of this function.

Hashing functions work on 64 octets of message at a time. Therefore, when any partial hashing of a long message is performed, the message length of each segment must be a multiple of 64. When ready to FSL_HASH_FLAGS_FINALIZE the hash, the length may be any value.

With the FSL_HASH_FLAGS_INIT and FSL_HASH_FLAGS_FINALIZE flags on, a one-shot complete hash, including padding, will be performed. The length may be any value.

The first octets of a data stream can be hashed by setting the FSL_HASH_FLAGS_INIT and FSL_HASH_FLAGS_SAVE flags. The length must be a multiple of 64.

The flag FSL_HASH_FLAGS_LOAD is used to load a context previously saved by FSL_HASH_FLAGS_SAVE. The two in combination will allow a (multiple-of-64 octets) 'middle sequence' of the data stream to be hashed with the beginning. The length must again be a multiple of 64.

Since the flag FSL_HASH_FLAGS_LOAD is used to load a context previously saved by FSL_HASH_FLAGS_SAVE, the FSL_HASH_FLAGS_LOAD and FSL_HASH_FLAGS_FINALIZE flags, used together, can be used to finish the stream. The length may be any value.

If the user program wants to do the padding for the hash, it can leave off the FSL_HASH_FLAGS_FINALIZE flag. The length must then be a multiple of 64 octets.

Parameters:
user_ctx A user context from fsl_shw_register_user().
[in,out] hash_ctx Hashing algorithm and state of the cipher.
msg Pointer to the data to be hashed.
length Length, in octets, of the msg.
[out] result If not null, pointer to where to store the hash digest.
result_len Number of octets to store in result.
Returns:
A return code of type fsl_shw_return_t.

References DESC_IN_IN, DESC_IN_OUT, FSL_HASH_FLAGS_FINALIZE, FSL_HASH_FLAGS_INIT, FSL_HASH_FLAGS_LOAD, FSL_HASH_FLAGS_SAVE, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_ERROR_S, SAH_HDR_MDHA_HASH, SAH_HDR_MDHA_SET_MODE_HASH, SAH_HDR_MDHA_SET_MODE_MD_KEY, and SAH_HDR_MDHA_STORE_DIGEST.

fsl_shw_return_t fsl_shw_hmac ( fsl_shw_uco_t user_ctx,
fsl_shw_sko_t key_info,
fsl_shw_hmco_t hmac_ctx,
const uint8_t *  msg,
uint32_t  length,
uint8_t *  result,
uint32_t  result_len 
)

Get the hmac

Parameters:
user_ctx Info for acquiring memory
key_info 
hmac_ctx 
msg 
length 
result 
result_len 
Returns:
A return code of type fsl_shw_return_t.

Continue, finalize, or one-shot an HMAC operation.

There are a number of ways to use this function. The flags in the hmac_ctx object will determine what operations occur.

If FSL_HMAC_FLAGS_INIT is set, then the hash will be started either from the key_info, or from the precomputed inner hash value in the hmac_ctx, depending on the value of FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT.

If, instead, FSL_HMAC_FLAGS_LOAD is set, then the hash will be continued from the ongoing inner hash computation in the hmac_ctx.

If FSL_HMAC_FLAGS_FINALIZE are set, then the msg will be padded, hashed, the outer hash will be performed, and the result will be generated.

If the FSL_HMAC_FLAGS_SAVE flag is set, then the (ongoing or final) digest value will be stored in the ongoing inner hash computation field of the hmac_ctx.

Parameters:
user_ctx A user context from fsl_shw_register_user().
key_info If FSL_HMAC_FLAGS_INIT is set in the hmac_ctx, this is the key being used in this operation, and the IPAD. If FSL_HMAC_FLAGS_INIT is set in the hmac_ctx and key_info is NULL, then fsl_shw_hmac_precompute() has been used to populate the inner_precompute and outer_precompute contexts. If FSL_HMAC_FLAGS_INIT is not set, this parameter is ignored.
[in,out] hmac_ctx The context which controls, by its flags and algorithm, the operation of this function.
msg Pointer to the message to be hashed.
length Length, in octets, of the msg.
[out] result Pointer, of result_len octets, to where to store the HMAC.
result_len Length of result buffer.
Returns:
A return code of type fsl_shw_return_t.

Get the hmac

Parameters:
user_ctx Info for acquiring memory
key_info 
hmac_ctx 
msg 
length 
result 
result_len 
Returns:
A return code of type fsl_shw_return_t.

References fsl_shw_hmco_t::context_length, fsl_shw_hmco_t::context_register_length, DESC_IN_IN, DESC_IN_KEY, DESC_IN_OUT, FSL_KEY_ALG_HMAC, FSL_RETURN_BAD_ALGORITHM_S, FSL_RETURN_BAD_DATA_LENGTH_S, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_BAD_KEY_LENGTH_S, FSL_RETURN_ERROR_S, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_OK_S, fsl_shw_hmco_t::inner_precompute, fsl_shw_hmco_t::ongoing_context, fsl_shw_hmco_t::outer_precompute, SAH_HDR_MDHA_HASH, SAH_HDR_MDHA_SET_MODE_MD_KEY, and SAH_HDR_MDHA_STORE_DIGEST.

fsl_shw_return_t fsl_shw_hmac_precompute ( fsl_shw_uco_t user_ctx,
fsl_shw_sko_t key_info,
fsl_shw_hmco_t hmac_ctx 
)

Get the precompute information

Parameters:
user_ctx 
key_info 
hmac_ctx 
Returns:
A return code of type fsl_shw_return_t.

Precompute the Key hashes for an HMAC operation.

This function may be used to calculate the inner and outer precomputes, which are the hash contexts resulting from hashing the XORed key for the 'inner hash' and the 'outer hash', respectively, of the HMAC function.

After execution of this function, the hmac_ctx will contain the precomputed inner and outer contexts, so that they may be used by fsl_shw_hmac(). The flags of hmac_ctx will be updated with FSL_HMAC_FLAGS_PRECOMPUTES_PRESENT to mark their presence. In addition, the FSL_HMAC_FLAGS_INIT flag will be set.

Parameters:
user_ctx A user context from fsl_shw_register_user().
key_info The key being used in this operation. Key must be 1 to 64 octets long.
[in,out] hmac_ctx The context which controls, by its flags and algorithm, the operation of this function.
Returns:
A return code of type fsl_shw_return_t.

Get the precompute information

Parameters:
user_ctx 
key_info 
hmac_ctx 
Returns:
A return code of type fsl_shw_return_t.

References fsl_shw_hmco_t::context_register_length, DESC_KEY_OUT, FSL_KEY_ALG_HMAC, FSL_RETURN_BAD_ALGORITHM_S, FSL_RETURN_BAD_KEY_LENGTH_S, FSL_RETURN_ERROR_S, FSL_RETURN_OK_S, fsl_shw_hmco_t::inner_precompute, fsl_shw_hmco_t::outer_precompute, and SAH_HDR_MDHA_SET_MODE_HASH.

fsl_shw_return_t fsl_shw_read_key ( fsl_shw_uco_t user_ctx,
fsl_shw_sko_t key_info,
uint8_t *  key 
)

Read the key value from a key object.

Only a key marked as a software key (FSL_SKO_KEY_SW_KEY) can be read with this call. It has no effect on the status of the key store.

Parameters:
user_ctx A user context from fsl_shw_register_user().
key_info The referenced key.
[out] key The location to store the key value.
Returns:
A return code of type fsl_shw_return_t.

References FSL_RETURN_BAD_FLAG_S, FSL_RETURN_NO_RESOURCE_S, FSL_SKO_KEY_ESTABLISHED, FSL_SKO_KEY_SW_KEY, fsl_shw_sko_t::keystore, and keystore_slot_read().

Referenced by test_software_key().

fsl_shw_return_t fsl_shw_register_user ( fsl_shw_uco_t user_ctx  ) 

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.

References fsl_shw_uco_t::flags, FSL_RETURN_BAD_FLAG_S, FSL_RETURN_INTERNAL_ERROR_S, FSL_RETURN_NO_RESOURCE_S, FSL_RETURN_OK_S, FSL_UCO_BLOCKING_MODE, FSL_UCO_CALLBACK_MODE, fsl_shw_uco_t::pool_size, sah_register(), and SHW_ADD_USER().

fsl_shw_return_t fsl_shw_release_key ( fsl_shw_uco_t user_ctx,
fsl_shw_sko_t key_info 
)

De-establish a key so that it can no longer be accessed.

The key will need to be re-established before it can again be used.

This feature is not available for all platforms, nor for all algorithms and modes.

Parameters:
user_ctx A user context from fsl_shw_register_user().
key_info The information about the key to be deleted.
Returns:
A return code of type fsl_shw_return_t.

References FSL_RETURN_NO_RESOURCE_S, FSL_SKO_KEY_ESTABLISHED, FSL_SKO_KEY_PRESENT, fsl_shw_sko_t::keystore, and keystore_slot_dealloc().

Referenced by extract_reestablish_key(), run_user_wrap(), run_wrap(), and test_software_key().

fsl_shw_return_t fsl_shw_sfree ( fsl_shw_uco_t user_ctx,
void *  address 
)

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.

References FSL_RETURN_ERROR_S, and FSL_RETURN_OK_S.

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.

References scc_configuration, and scc_get_configuration().

fsl_shw_return_t fsl_shw_symmetric_decrypt ( fsl_shw_uco_t user_ctx,
fsl_shw_sko_t key_info,
fsl_shw_scco_t sym_ctx,
uint32_t  length,
const uint8_t *  ct,
uint8_t *  pt 
)

Decrypt a stream of data with a symmetric-key algorithm.

In ARC4, and also in FSL_SYM_MODE_CBC and FSL_SYM_MODE_CTR modes, the flags of the sym_ctx object will control part of the operation of this function. The FSL_SYM_CTX_INIT flag means that there is no context info in the object. The FSL_SYM_CTX_LOAD means to use information in the sym_ctx at the start of the operation, and the FSL_SYM_CTX_SAVE flag means to update the object's context information after the operation has been performed.

All of the data for an operation can be run through at once using the FSL_SYM_CTX_INIT or FSL_SYM_CTX_LOAD flags, as appropriate, and then using a length for the whole of the data.

If a FSL_SYM_CTX_SAVE flag were added, an additional call to the function would "pick up" where the previous call left off, allowing the user to perform the larger function in smaller steps.

In FSL_SYM_MODE_CBC and FSL_SYM_MODE_ECB modes, the length must always be a multiple of the block size for the algorithm being used. For proper operation in FSL_SYM_MODE_CTR mode, the length must be a multiple of the block size until the last operation on the total octet stream.

Some users of ARC4 may want to compute the context (S-Box and pointers) from the key before any data is available. This may be done by running this function with a length of zero, with the FSL_SYM_CTX_INIT & FSL_SYM_CTX_SAVE flags on in the sym_ctx. Subsequent operations would then run as normal with the load & save flags. Note that they key object is still required.

Parameters:
user_ctx A user context from fsl_shw_register_user().
key_info The key and algorithm being used in this operation.
[in,out] sym_ctx Info on cipher mode, state of the cipher.
length Length, in octets, of the ct (and pt).
ct pointer to ciphertext to be decrypted.
[out] pt pointer to where to store the resulting plaintext.
Returns:
A return code of type fsl_shw_return_t

Compute symmetric decryption

Parameters:
user_ctx 
key_info 
sym_ctx 
length 
pt 
ct 
Returns:
A return code of type fsl_shw_return_t.

References FSL_RETURN_ERROR_S.

Referenced by create_key(), extract_reestablish_key(), run_user_wrap(), and run_wrap().

fsl_shw_return_t fsl_shw_symmetric_encrypt ( fsl_shw_uco_t user_ctx,
fsl_shw_sko_t key_info,
fsl_shw_scco_t sym_ctx,
uint32_t  length,
const uint8_t *  pt,
uint8_t *  ct 
)

Encrypt a stream of data with a symmetric-key algorithm.

In ARC4, and also in FSL_SYM_MODE_CBC and FSL_SYM_MODE_CTR modes, the flags of the sym_ctx object will control part of the operation of this function. The FSL_SYM_CTX_INIT flag means that there is no context info in the object. The FSL_SYM_CTX_LOAD means to use information in the sym_ctx at the start of the operation, and the FSL_SYM_CTX_SAVE flag means to update the object's context information after the operation has been performed.

All of the data for an operation can be run through at once using the FSL_SYM_CTX_INIT or FSL_SYM_CTX_LOAD flags, as appropriate, and then using a length for the whole of the data.

If a FSL_SYM_CTX_SAVE flag were added, an additional call to the function would "pick up" where the previous call left off, allowing the user to perform the larger function in smaller steps.

In FSL_SYM_MODE_CBC and FSL_SYM_MODE_ECB modes, the length must always be a multiple of the block size for the algorithm being used. For proper operation in FSL_SYM_MODE_CTR mode, the length must be a multiple of the block size until the last operation on the total octet stream.

Some users of ARC4 may want to compute the context (S-Box and pointers) from the key before any data is available. This may be done by running this function with a length of zero, with the init & save flags flags on in the sym_ctx. Subsequent operations would then run as normal with the load and save flags. Note that they key object is still required.

Parameters:
user_ctx A user context from fsl_shw_register_user().
key_info Key and algorithm being used for this operation.
[in,out] sym_ctx Info on cipher mode, state of the cipher.
length Length, in octets, of the pt (and ct).
pt pointer to plaintext to be encrypted.
[out] ct pointer to where to store the resulting ciphertext.
Returns:
A return code of type fsl_shw_return_t.

Compute symmetric encryption

Parameters:
user_ctx 
key_info 
sym_ctx 
length 
pt 
ct 
Returns:
A return code of type fsl_shw_return_t.

References FSL_RETURN_ERROR_S.

Referenced by create_key(), run_user_wrap(), and run_wrap().


Variable Documentation

unsigned * actual [inherited]
union { ... } auth_info [inherited]

"auth" info struct

union { ... } auth_info [inherited]

"auth" info struct

int black_ram_size_blocks [inherited]

Number of blocks of Black RAM

int black_ram_size_blocks [inherited]

Number of blocks of Black RAM

int block_size_bytes [inherited]

Number of bytes per block of RAM; also block size of the crypto algorithm.

Referenced by OS_DEV_INIT().

void(* callback)(struct fsl_shw_uco_t *uco) [inherited]
fsl_shw_scco_t CCM_ctx_info [inherited]

For running the CBC in AES-CCM.

fsl_shw_scco_t CCM_ctx_info [inherited]

For running the CBC in AES-CCM.

fsl_shw_scco_t cipher_ctx_info [inherited]

For running encrypt/decrypt.

Referenced by fsl_shw_auth_decrypt(), and fsl_shw_gen_encrypt().

uint8_t context_length [inherited]

in bytes

Referenced by fsl_shw_hmac().

uint8_t context_register_length [inherited]

in bytes

Referenced by fsl_shw_hmac(), and fsl_shw_hmac_precompute().

uint8_t * data [inherited]
uint8_t digest_length [inherited]

in bytes

uint32_t error_status [inherited]

If error, register from Sahara

Referenced by sah_Handle_Interrupt(), and sah_process_finished_request().

uint32_t fault_address [inherited]

If error, register from Sahara

Referenced by sah_get_results_from_pool(), sah_Handle_Interrupt(), and sah_process_finished_request().

uint32_t flags [inherited]
sah_Link_Flags flags [inherited]

indicates the component that created the data buffer. Security Function internal information

Referenced by sah_add_in_keyout_desc(), sah_Alloc_Link(), sah_Make_Links(), and sah_Physicalise_Links().

fsl_shw_hco_t hash_ctx_info [inherited]

For running the hash

fsl_shw_hco_t hash_ctx_info [inherited]

For running the hash

fsl_shw_hco_t hash_ctx_info [inherited]

For running the hash

struct sah_Head_Desc * head [inherited]
uint32_t inner_precompute [inherited]

largest digest + msg size

Referenced by fsl_shw_hmac(), and fsl_shw_hmac_precompute().

void * kernel_base [inherited]

Base address (kernel virtual)

Referenced by fsl_shw_deregister_user(), and sah_handle_deregistration().

struct fsl_shw_kso_t * keystore [inherited]

If present, key is in keystore

Referenced by fsl_shw_establish_key(), fsl_shw_extract_key(), fsl_shw_read_key(), and fsl_shw_release_key().

uint32_t len1 [inherited]

number of data bytes in 'ptr1' buffer

Referenced by sah_Destroy_Descriptors(), sah_Free_Chained_Descriptors(), and sah_HW_Reset().

uint32_t len2 [inherited]

number of data bytes in 'ptr2' buffer

Referenced by sah_Destroy_Descriptors(), sah_Free_Chained_Descriptors(), and sah_HW_Reset().

uint8_t mac_length [inherited]

User's value for length

Referenced by fsl_shw_auth_decrypt(), and fsl_shw_gen_encrypt().

sah_Mem_Util * mem_util [inherited]
fsl_shw_acc_mode_t mode [inherited]

CCM only

Referenced by fsl_shw_auth_decrypt(), and fsl_shw_gen_encrypt().

sah_Head_Desc *(* mu_alloc_head_desc)(void *ref) [inherited]

Acquire a sah_Head_Desc

void(* mu_free)(void *ref, void *ptr) [inherited]

Free buffer at ptr

void(* mu_free_desc)(void *ref, sah_Desc *ptr) [inherited]

Free sah_Desc at ptr

void(* mu_free_head_desc)(void *ref, sah_Head_Desc *ptr) [inherited]

Free sah_Head_Desc at ptr

void(* mu_free_link)(void *ref, sah_Link *ptr) [inherited]

Free sah_Link at ptr

void *(* mu_malloc)(void *ref, size_t n) [inherited]

Acquire buffer of size n bytes

Referenced by add_assoc_preamble().

void *(* mu_memcpy)(void *ref, void *dest, const void *src, size_t n) [inherited]

Funciton which will copy n bytes from src to dest

void *(* mu_memset)(void *ref, void *ptr, int ch, size_t n) [inherited]

Set all n bytes of ptr to ch

struct fsl_shw_uco_t * next [inherited]

To allow user-mode chaining of contexts, for signalling.

Referenced by SHW_ADD_USER(), and SHW_REMOVE_USER().

struct fsl_shw_spo_t * next [inherited]

Pointer to the next partition owned by the user. NULL if this is the last partition.

struct sah_Link * next [inherited]
struct sah_Head_Desc * next [inherited]
struct sah_Desc * next [inherited]
uint32_t ongoing_context [inherited]

largest digest + msg size

Referenced by fsl_shw_hmac().

uint32_t op_status [inherited]

If error, register from Sahara

Referenced by sah_Handle_Interrupt().

void * out1_ptr [inherited]

For async post-processing

Referenced by sah_Copy_Descriptors().

void * out2_ptr [inherited]

For async post-processing

uint32_t out_len [inherited]

For async post-processing

uint32_t outer_precompute [inherited]

largest digest + msg size

Referenced by fsl_shw_hmac(), and fsl_shw_hmac_precompute().

key_userid_t ownerid [inherited]

Auth code for established key

Referenced by sah_Free_Chained_Links(), and sah_Make_Links().

int partition_count [inherited]

Number of partitions on this platform

int partition_count [inherited]

Number of partitions on this platform

int partition_count [inherited]

Number of partitions on this platform

int partition_size_bytes [inherited]

Number of bytes in each partition

int partition_size_bytes [inherited]

Number of bytes in each partition

unsigned pool_size [inherited]

maximum size of user pool

Referenced by fsl_shw_register_user(), and sah_validate_uco().

struct sah_Head_Desc * prev [inherited]

previous in queue

Referenced by sah_Queue_Append_Entry(), and sah_Queue_Remove_Any_Entry().

void * ptr1 [inherited]
void * ptr2 [inherited]
unsigned q_length [inherited]

NIST parameter -

int red_ram_size_blocks [inherited]

Number of blocks of Red RAM

int red_ram_size_blocks [inherited]

Number of blocks of Red RAM

int red_ram_size_blocks [inherited]

Number of blocks of Red RAM

fsl_shw_return_t result [inherited]
fsl_shw_result_t * results [inherited]

pointer to memory to hold results

Referenced by fsl_shw_get_results(), sah_get_results_from_pool(), and sah_get_results_pointers().

int scm_version [inherited]

Version from SCM Configuration register

Referenced by OS_DEV_INIT().

uint32_t slot [inherited]

Location of the the established key

Referenced by sah_Make_Links().

int smn_version [inherited]

Version from SMN Status register

Referenced by OS_DEV_INIT().

uint32_t status [inherited]
struct sah_Head_Desc * tail [inherited]
uint32_t uco_flags [inherited]
uint8_t unencrypted_mac [inherited]

max block size...

Referenced by fsl_shw_auth_decrypt(), and fsl_shw_gen_encrypt().

struct sah_Head_Desc * user_desc [inherited]
struct fsl_shw_uco_t * user_info [inherited]
uint32_t user_ref [inherited]

User's reference

Referenced by fsl_shw_get_random(), and process_hdr().

uint32_t user_ref [inherited]

at time of request

Referenced by sah_Copy_Descriptors(), and sah_get_results_from_pool().

footer
©  Freescale Semiconductor, Inc., 2007.  All rights reserved.
Freescale Confidential Proprietary
NDA Required
doxygen